Forum Discussion
Get data from Jira Rest API
- 7 years ago
Hi Vitaliy,
I have found a performance issue in your code. Though I don't know if other parts like Jira API could influence the performance. It could run faster. I tested with 100 thousand rows this time. It even finished in seconds. Please give it a try.
let
//other parts are good without cahnges.
... ... #"Source"= Table.AddColumn(#"AddIndex", "Custom1", each Json.Document(Web.Contents([Custom]))), ... ... in #"Filtered Rows1"Why? The old code invoked a table which should be avoided in Power Query.
Best Regards,
Dale
Hi Vitaliy,
I tested like your scenario. It took only several minutes for 10 thousand rows. You can check it out in the attachment. Maybe you can try Python or R scripts. If you need more support, please provide the complete Power Query code.
Best Regards,
Dale
- Vitaliy7 years agoHelper I
Hi!
thanks for the time spent and your response.
hmm..due to this fact, I don't understand what is the matter ((
perhaps, part of my code will help clarify the situation:I have query:
let S1 = P1_epics_only, #"Added Custom" = Table.AddColumn(#"S1", "first_part_of_url", each "https://jira.mycompany.com/rest/api/2/issue/"), #"Added Custom1" = Table.AddColumn(#"Added Custom", "third_part_of_url", each "/worklog"), #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom", each [first_part_of_url]&[key_main]&[third_part_of_url]), #"Filtered Rows" = Table.SelectRows(#"Added Custom2", each true), #"AddIndex" = Table.AddIndexColumn(#"Filtered Rows", "Index", 0, 1), #"Source"= Table.AddColumn(#"AddIndex", "Custom1", each Json.Document(Web.Contents(#"AddIndex"{[Index]}[Custom]))), #"ExpandWorklogs"= Table.ExpandRecordColumn(#"Source", "Custom1", {"worklogs"}), #"ExpandWorklogs1"= Table.ExpandListColumn(#"ExpandWorklogs", "worklogs"), #"Expand" = Table.ExpandRecordColumn(#"ExpandWorklogs1", "worklogs", {"self", "author", "updateAuthor", "comment", "created","updated","started","timeSpent","timeSpentSeconds","id"}, {"self", "author", "updateAuthor", "comment", "created","updated","started","timeSpent","timeSpentSeconds","id"}), #"ExpandWorklogsAuthor"= Table.ExpandRecordColumn(#"Expand", "author", {"name"}), #"Renamed Columns1" = Table.RenameColumns(ExpandWorklogsAuthor,{{"name", "name_author"}}), #"ExpandWorklogsUpdateAuthor"= Table.ExpandRecordColumn(#"Renamed Columns1", "updateAuthor", {"name"}), #"Filtered Rows1" = Table.SelectRows(ExpandWorklogsUpdateAuthor, each true) in #"Filtered Rows1"P1_epics_only - this is a table with one column (with "key_name" name), where stored the list of epic from jira (something like "variable")
So, on the 8th line of the code begins the same problem that I wrote about - lines are loaded at a rate of "one line per second" ((
__________________
I know Python a little, but he never used it for Power BI, which I started using 2 weeks ago)Maybe I'll turn to this solution if I do not solve my question more understandable variant at the moment.
- v-jiascu-msft7 years agoMicrosoft Employee
Hi Vitaliy,
I have found a performance issue in your code. Though I don't know if other parts like Jira API could influence the performance. It could run faster. I tested with 100 thousand rows this time. It even finished in seconds. Please give it a try.
let
//other parts are good without cahnges.
... ... #"Source"= Table.AddColumn(#"AddIndex", "Custom1", each Json.Document(Web.Contents([Custom]))), ... ... in #"Filtered Rows1"Why? The old code invoked a table which should be avoided in Power Query.
Best Regards,
Dale
- Vitaliy7 years agoHelper I
Thanks for your help, it's really great (and simple) solution.
Why I did not guess on my own.. :)
- antonstorozhuk3 years agoHelper V
Hello,
I’d like to propose and alternative solution for you, you might want to try out our app - Power BI Connector for Jira: https://marketplace.atlassian.com/apps/1221150/power-bi-connector-for-jira?hosting=cloud&tab=overview it's available for Jira Cloud / Server / Data Center.
We have a handy User/Admin Guide https://aserve.atlassian.net/wiki/spaces/PBCFJC/overview and fast/responsive support team at [email protected]. Please let us know if you need any assistance.
Cheers!
Anton
===
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.