Strange Assignee names coming from Assignee column in jiraissue table - jira

I am using Jira backend database to pull some columns for reporting. Assignee column in jiraissue table stores the Webkey ID/usernames of all the employees. I join this with cwd_user to get the full name of the assignee. But I also see some weird values like the ones below. I don't have a clue about how to get the display names of these users. They are not Webkey ID/usernames.
Any thoughts on what I might be missing?

The app_user table has the current userid in the lower_user_name column

If you're running a recent version of Jira, there was a GDPR-related change that causes all newly-created users to have a key starting with JIRAUSER instead of their username. Users can also be anonymized through this feature.
You can get a mapping of JIRAUSER keys to usernames through the JIRA API's Get User endpoint -- not sure where to look in the database for this mapping yet.

Related

Connecting to People Search through Tableau?

We are creating a report that would need employee information. We have the employee ID, but we are also looking for the name and office location. Is it possible to have tableau hit people search to pull this information?
You can use Wildcard Match Filter Function to do so.
Then, when you type employee ID in the search box, it will filter it out to dashboard.

PowerBI - Join DirectQuery and Imported tables in DAX

I have a DirectQuery table (Weather) which is sourced from an Azure SQL server. I would like to join this with an Imported table (Buckles) from an Excel sheet sourced from SharePoint Online.
Both tables have a UID field that is made up of a concatenation between a SiteID and timestamp. The UID field is named differently for each table.
I have created a One-To-Many relationship between the two tables.
I have tried to create a new DAX table using a NATURALINNERJOIN on Weather and Buckles but I get this error:
"No common join columns detected. The join function 'NATURALINNERJOIN' requires at-least one common join column."
I am confident it is not a problem with the underlying data because I've created a new imported Excel table (Test) with a selection of the data from Weather and I'm able to successfully create the join on Test and Buckles.
Is the joining of DirectQuery and Imported tables supported? I feel like this may be a type casting issue, but as far as I can see, both UID fields are set as Text.
The UID field is named differently for each table.
I suspect this may be the issue. NATURALINNERJOIN looks for matching column names
and if the two tables have no common column names, an error is returned.
Note that if you create a calculated DAX table using a DirectQuery source, I don't think that table will still act like DirectQuery. If I understand correctly, it will materialize the calculated table into your model and DAX that references that calculated table no longer points back to the SQL server (and consequently will only update when the calculated table gets rebuilt).

Sage50 OBDC [RECORD_DELETED] field isn't working

I am trying to import invoices from Sage 50 UK using MS access. The problem I am facing is that sometimes, the invoices on sage might have had a product on it before but, has since been removed. Unfortunately, using a select * query on [INVOICE_ITEM] will include all items on the invoice, including deleted records.
Judging by the database schema on here, sage seems to use a RECORD_DELETED field in order to keep track of items (products) that are no longer supposed to be on the invoice. Obviously, the next step is to use a WHERE in the query to exclude the deleted records. Well, unfortunately, my RECORD_DELETED field is always showing the default "0" value - even for actual deleted items on the invoice!
Example, highlighted record is actually supposed to be deleted.
Would appreciate any help here!
Late answer but, as it turns out, the RECORD_DELETED field doesn't actually work - or at least is not available via the ODBC connection.
The solution for this issue is to change the SQL query. Instead of getting data directly from the INVOICE_ITEM table, we have to use a join from the INVOICE table to the INVOICE_ITEM table. This solves the issue and only produces items that are actually on the invoice.
I do not know why this works, would love if anyone can shed some light.
Query:
SELECT INVOICE.INVOICE_NUMBER, INVOICE_ITEM.STOCK_CODE, INVOICE_ITEM.DESCRIPTION, INVOICE_ITEM.QUANTITY
FROM INVOICE
JOIN INVOICE_ITEM ON INVOICE.INVOICE_NUMBER = INVOICE_ITEM.INVOICE_NUMBER
You can add the optional where clause:
WHERE INVOICE.INVOICE_OR_CREDIT <> 'Credit Note'
To exclude credit notes. You can also do where invoice_number = 'number' (don't forget the the apostrophe) to get a particular invoice.

Apache Cassandra - Follow/Unfollow relationship on Twissandra example

I'm trying to learn Cassandra modeling by looking at the Twissandra project.
It seems that when user unfollows one of his followers only friendship/follower relationship is removed from the tables, but tweets of the unfollowed user remain in the timeline of the user that has just unfollowed him.
Also, with very basic knowledge of Cassandra modeling that I have currently, it seems to me that it is practically impossible to remove tweets from the timeline. Here is the model from Twissandra:
CREATE TABLE timeline (
username text,
time timeuuid,
tweet_id uuid,
PRIMARY KEY (username, time)
) WITH CLUSTERING ORDER BY (time DESC)
Since tweet_id is neither a partition key nor a clustering column it is impossible to query by it and delete the record.
Further, can someone please suggest a model where it would be possible to remove tweets of the unfollowed users from the timeline.
I've been busting my head around this problem for a day and it seems as this is not very easy thing to do in Cassandra. I'm coming from relational world, so maybe my point of view is wrong also.
Since tweet_id neither a partition key nor a clustering column it is impossible to query by it and delete the record.
CREATE TABLE timeline (
username text,
tweet_id timeuuid,
tweet_content text
PRIMARY KEY (username, tweet_id)
) WITH CLUSTERING ORDER BY (tweet_id DESC)
The above data model should do the trick
Further, can someone please suggest a model where it would be possible to remove tweets of the unfollowed users from the timeline.
You'll have to denormalize and create another table
CREATE TABLE followed_users_tweets(
username text,
followed_user text,
tweet_id timeuuid,
tweet_content text
PRIMARY KEY ((username,followed_user) tweet_id)
) WITH CLUSTERING ORDER BY (tweet_id DESC);
When you unfollow "John DOE" and your username is "Helen SUE":
DELETE FROM followed_users_tweets WHERE username='Helen SUE' AND followed_user='John DOE'

How does Github make issues for each repo start from id=1?

I really like how Github starts the ids for issues from 1 for each repo.
How do you model that info using ActiveRecord?
I want to support the following URL scheme /profile/:username/posts/:post_id
I'd like for posts for each user to start at 1 and then increment from there.
Rails doesn't do this easily, but you can use composite keys to accomplish this, where the key is (repo id, issue id). This gem will add support for them to Rails 3. You would need a generator to generate incrementing IDs per repo.
If you don't want to go full-on compound keys, you can fake it in your code. You just want something like #repo.issues.find(params[:issue_id]), where issues contains both a repo_id and issue_id key, in addition to the normal incrementing PK.
You should instead let each post have a unique global id. In threads or in the context of a user, numbering can start at 1 as a convenience -- that is, it will not be a number stored in the database, but when you request /users/someuser/posts/1 it will actually look up the first post for that user of all of their posts ordered by ascending creation date, regardless of what the post ID actually is.
Example: user requested /users/someuser/posts/3, SQL might be something like SELECT * FROM posts WHERE username = :username ORDER BY date ASC LIMIT 1 OFFSET 2

Resources