Power BI Integration
Goal: Connect Power BI to your governed warm queries.
Prerequisites
- Power BI Desktop installed
- API token from OpenIndustrial
- At least one warm query deployed
Step 1: Get API Details
- In OpenIndustrial, go to APIs Menu
- Find your warm query
- Copy the endpoint URL
- Generate an API token
Step 2: Create Power BI Data Source
- Open Power BI Desktop
- Click Get Data → Web
- Select Advanced
- Enter:
- URL: Your query endpoint
- HTTP headers:
Authorization: Bearer YOUR_TOKEN
Step 3: Transform Data
Power Query will show your JSON response:
- Expand the
resultsarray - Set column types (datetime, numeric, etc.)
- Rename columns as needed
- Click Close & Apply
Step 4: Build Reports
Your data is now in Power BI:
- Create visualizations
- Add filters and slicers
- Build calculated measures
- Design dashboard layouts
Refresh Configuration
Manual Refresh
Click Refresh in Power BI to pull latest data.
Scheduled Refresh (Power BI Service)
- Publish report to Power BI Service
- Configure dataset settings
- Set refresh schedule (e.g., hourly)
- Store credentials in gateway
Thinking Tip:
For scheduled refresh, you'll need a Power BI Gateway to securely store your API token.
Best Practices
| Practice | Why |
|---|---|
| Use warm queries | Pre-aggregated, governed data |
| Match refresh to query | Don't refresh faster than data updates |
| Use parameters | Change queries without editing code |
| Handle errors | Show "No data" gracefully |
Troubleshooting
| Issue | Solution |
|---|---|
| Authentication error | Check token hasn't expired |
| No data | Verify query returns results in OI first |
| Timeout | Query may be too large; add filters |
| Stale data | Check refresh schedule |
Next Steps
| If you want to... | Go to... |
|---|---|
| Try Grafana instead | Grafana → |
| Manage tokens | Security → |