Introduction
GitHub is a leading platform for source control, CI/CD workflows, and team collaboration. Many organizations need GitHub data in Power BI to monitor engineering performance, repository health, pull request velocity, and issue resolution trends.
Using ZappySys ODBC Driver for REST APIs, you can connect to GitHub and query GitHub data with SQL, then load it directly into Power BI dashboards without writing custom integration code.
This tutorial shows how to create an ODBC DSN for the GitHub API, preview data, connect Power BI, and build analytics using custom SQL queries.
Prerequisites
- A GitHub account with access to target repositories or organisation data.
- Power BI Desktop is installed on your machine.
- Basic understanding of SQL and Power BI data modelling.
- Finally, install the ZappySys ODBC Driver.
Steps
Create a GitHub Personal Access Token
- Sign in to your GitHub account.
- Go to Settings, then find the Developer settings at the bottom of the page.
- Now go to Personal access tokens and create a new token (fine-grained or classic, depending on your security policy).
- Select permissions required for your extraction scenario (for example, repository metadata, issues, or pull requests), owner, expiration date and more.
- Generate the token and copy it to a secure location.
Create a new ODBC DSN using ZappySys JSON Driver
- Search for ODBC in the Windows Start menu and open ODBC Data Source Administrator.

- In the User DSN or System DSN tab, click Add.
- Select ZappySys JSON Driver and click Continue.

Configure the Connection and API Settings
- Enter the base URL:
https://api.github.com/user - In Connection Type, select HTTP and click Configure.
- Select Static Token/API Key as the Credential type.
- Paste your GitHub token in the authentication field.
- Click OK to save the configuration.
- Set HTTP Request Method to GET.
- Set the following values in the HTTP headers:
- Accept: application/vnd.github+json
- X-GitHub-Api-Version: 2022-11-28
- Set JSON Path Filter to extract the object array.
- Click Test Connection to verify connectivity, then click OK to save the DSN.
Preview GitHub data in ODBC Driver
- Go to the Preview tab.
- Generate a query, then click Preview Data to confirm that rows are returned.
- If no data is returned, verify your organisation name, token scope, and JSON Path Filter.
Connect Power BI to GitHub via ODBC
- Open Power BI Desktop.
- Click Get Data from the Home ribbon.
- Click More…, search for ODBC, and click Connect.
- Select your GitHub ODBC DSN from the dropdown list.
- Optionally, enter a custom SQL query in Advanced options.
- Click OK, then click Load to import data.
- Verify the result and click Load.
- In the Navigator window, select the columns you want to load.
Query GitHub Data with SQL
For advanced analytics, use custom SQL queries in Power BI or the ODBC tool.
Example 1: List Repositories
|
1 2 3 4 5 6 7 8 9 |
SELECT id, name, nameWithOwner, isPrivate, stargazerCount, forkCount, updatedAt FROM data.organization.repositories.nodes |
Example 2: Public Repositories Only
|
1 2 3 4 5 6 7 |
SELECT name, nameWithOwner, stargazerCount, forkCount FROM data.organization.repositories.nodes WHERE isPrivate = false |
Example 3: Most Starred Repositories
|
1 2 3 4 5 6 |
SELECT nameWithOwner, stargazerCount, forkCount FROM data.organization.repositories.nodes ORDER BY stargazerCount DESC |
Example 4: Recently Updated Repositories
|
1 2 3 4 5 6 |
SELECT nameWithOwner, updatedAt, createdAt FROM data.organization.repositories.nodes WHERE updatedAt >= DATEADD(DAY, -30, GETDATE()) |
Example 5: Repository Count by Visibility
|
1 2 3 4 5 |
SELECT CASE WHEN isPrivate = true THEN 'Private' ELSE 'Public' END AS RepoVisibility, COUNT(*) AS RepoCount FROM data.organization.repositories.nodes GROUP BY CASE WHEN isPrivate = true THEN 'Private' ELSE 'Public' END |
Example 6: Language-Based Distribution
|
1 2 3 4 5 6 7 |
SELECT primaryLanguage_name AS Language, COUNT(*) AS RepoCount, AVG(stargazerCount) AS AvgStars FROM data.organization.repositories.nodes GROUP BY primaryLanguage_name ORDER BY RepoCount DESC |
Create Useful Power BI Measures
Use DAX measures after loading the GitHub dataset:
Total Repositories
|
1 |
TotalRepos = COUNTROWS('nodes') |
Total Stars
|
1 |
TotalStars = SUM('nodes'[stargazerCount]) |
Average Forks per Repository
|
1 |
AvgForks = AVERAGE('nodes'[forkCount]) |
Private Repository %
|
1 2 3 4 5 |
PrivateRepoPct = DIVIDE( CALCULATE(COUNTROWS('nodes'), 'nodes'[isPrivate] = TRUE()), COUNTROWS('nodes') ) |
Conclusion
Connecting GitHub to Power BI using ZappySys ODBC Driver makes it easy to build engineering analytics without writing custom connector code. With SQL-based access to GitHub API responses, you can monitor repository activity, contribution trends, and governance metrics in one place.
Explore the full capabilities of the Zappysys ODBC Drivers to integrate multiple data sources and build comprehensive Power BI dashboards. By combining GitHub data with other sources, you can create unified views of your operational data.
Need Help?
If you encounter any issues, our support team is here to help:
- Live Chat — Use the chat widget (bottom-right corner of this page)
- Email — support@zappysys.com
- Support Center — Visit the ZappySys Support Portal








