Forum Discussion
Get content from github artifacts json file into PBI
Hi, Im trying to get data from github artifacts files into PBI. I have played a little with the PBI github connector and it works fine but I am not able to make it give me the data I am looking for, which is the data inside of the artifact files. With the connector I cannot get further than getting a list of all artifacts and artifacts urls related to the runs on my github account, but what I am looking for is to also fetch data from inside the artifact files (json files). Anyone know if this i possible, and how to?
Hi k_ha ,
The Power BI GitHub connector only gives you artifact metadata (names, URLs), not the actual contents of the files. To get the data inside the artifact JSON files, you’ll need to:
-
Use the GitHub REST API to download the artifact zip files.
-
Extract the zip files outside Power BI (since Power BI can’t unzip files natively).
-
Load the JSON files into Power BI using “Get Data > JSON.”
This process isn’t supported natively inside Power BI, so you’ll need an extra script or manual step to handle the download and extraction before loading your data.
-
PBI GitHub connector only gives artifact metadata & URLs, not the file contents.
Artifact files are usually zipped, PBI can’t unzip directly.
To use them:
Call GitHub REST API with a PAT to download artifact.
Unzip externally (Power Automate / Azure Function / script).
Connect PBI to the extracted JSON file.
👉 Direct read inside PBI isn’t poss
6 Replies
- burakkaragozSuper User
Hi k_ha ,
Honestly, I'm not sure the GitHub connector can dig into the actual artifact files. It sounds like it's just giving you the metadata and URLs, but not downloading and opening the JSON content inside.
GitHub artifacts are a bit tricky because they're usually zipped and need proper authentication to download. The Power BI connector probably isn't designed to handle that extra step.
Few ideas (though I'm not certain about any of them):
Try using the Web connector with those artifact URLs you're getting. Might work, might not - depends on how GitHub handles the authentication.
You could also try hitting GitHub's REST API directly through Power BI's Web connector, but you'd need to deal with tokens and all that auth stuff.
Realistic option: Set up something external that grabs those artifacts, extracts the JSON, and dumps it somewhere Power BI can easily read it. Not elegant but probably more reliable.
This feels like one of those edge cases where the connector just wasn't built for what you're trying to do. Have you checked if anyone else has figured this out? The Power BI community forums might have someone who's tackled this exact problem.
Pretty frustrating when the connector gets you 90% of the way there but stops short of what you actually need.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
- Sandip_PalitSuper User
Follow this solution using Power Query's web connector to download and parse the artifact file.
Step 1: Connect to the Artifact URL
In Power BI Desktop, go to Get data > Web.Select the Advanced option.
In the URL parts box, paste one of your artifact download URLs.
Under HTTP request header parameters, add a new header:
In the first box, type: Authorization
In the second box, type: Bearer (with a space at the end) and then concatenate your PAT parameter. The full entry should look like: Bearer <Your_PAT_Here> or if using a parameter: Bearer & GitHubPAT.
Click OK.
Step 2: Unzip and Parse the JSON
Power Query is smart enough to handle the downloaded .zip file.Open the Binary: The web connector will return a single file. In the Power Query editor, you will see a preview showing the file name and a link that says Binary. Click on the word "Binary".
See Contained Files: Power Query will automatically decompress the .zip archive and show you a table of the files contained within it.
Select Your JSON File: Find your JSON file in the list. Click on the Binary link in the Content column for that specific file's row.
Parse the JSON: Power Query will now show the raw JSON content. In the Transform tab on the ribbon, click Parse and then select JSON.
Expand to Table: Power Query will parse the JSON into a record or list structure. You can now use the Expand buttons in the column header to transform this nested structure into a flat table with columns and rows.
If this explanation and solution resolve your issue, please like and accept the solution.
- rohit1991Super User
Hi k_ha ,
The Power BI GitHub connector only gives you artifact metadata (names, URLs), not the actual contents of the files. To get the data inside the artifact JSON files, you’ll need to:
-
Use the GitHub REST API to download the artifact zip files.
-
Extract the zip files outside Power BI (since Power BI can’t unzip files natively).
-
Load the JSON files into Power BI using “Get Data > JSON.”
This process isn’t supported natively inside Power BI, so you’ll need an extra script or manual step to handle the download and extraction before loading your data.
-
- Shahid12523Community Champion
PBI GitHub connector only gives artifact metadata & URLs, not the file contents.
Artifact files are usually zipped, PBI can’t unzip directly.
To use them:
Call GitHub REST API with a PAT to download artifact.
Unzip externally (Power Automate / Azure Function / script).
Connect PBI to the extracted JSON file.
👉 Direct read inside PBI isn’t poss
- AnonymousNot applicable
Hi k_ha,
Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to burakkaragoz, rohit1991 , Sandip_Palit and Shahid12523, for prompt and helpful responses.
Just following up to see if the Response provided by community members were helpful in addressing the issue. If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.
Best regards,
Prasanna Kumar - AnonymousNot applicable
Hi k_ha,
Just following up to see if the Response provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.
Best regards,
Prasanna Kumar