Skip to content

eurostat/PowerBI-connector

Repository files navigation

Eurostat-API-custom-connector

Power BI custom connector for Eurostat API.

The connector delivered by this project allows for access to Eurostat’s REST API, which delivers data in JSON-stat format. Although it is possible to load data in JSON-stat format to Power BI, it is not straightforward (you can try to do it using this guide )

Installation

To use a Custom Connector, put Eurostat API.mez file in the [Documents]\Power BI Desktop\Custom Connectors folder, and adjust the security settings as described on this website.

How to use

Power BI uses star schema model to connect datasets. Data returned from Eurostat’s API have many dimensions ( Year, Geo, Sex, …). The connector splits every dimension into separate tables and create common id which connects all tables. There are three steps necessary to load data from the Eurostat’s API to Power Bi:

  1. Find a dataset
  2. Create an URL
  3. Load data

Step 1. Finding a dataset

Datasets can be found in Eurostat’s database.

Eurostat's database
Eurostat's database

Each dataset has its unique code (like nama_10_gdp). This code is necessary in the next step.

Step 2. Creating an URL

In order to get data from Eurostat, connector needs properly formated URL to Eurostat's API. The best way to create this URL is to use Query Builder.

Query builder
Query builder

Building an URL is quite an easy task. The process in explaind well on the Eurostat's website.

Query generator
Query generator

The only caveat is that there is a limit to the number of categories - 50. If this limit is exceeded, no data is returned. The Connector will show this error:

Error
Error

The output generated by the Query Builder will be like this:

Query generator - output
Query generator - output

Step 3. Loading data

The URL generated in the Quey Builder (step 2) is the only paramater which has to be passed to the connector. The connector has only one field - it is enough to paste the URL into this field.

Connector
Connector

If the URL entered into the connector is properly formated, Power BI will show the Navigator window with all dimensions/tables. It might be used to preview data before transferring it from Eurostat.

Navigator
Navigator

The Connector creates tables for all dimensions. Two additional tables are created : Relations and Information. The table Relations store relations between all dimensions(tables). The table Information shows information about query.

Table with information on the query
Table with information on the query

One relation – between tables Relations and values - must be created manually:

Create relationship
Cretae reltionship

The final model should look like this:

Model
Model

About

status since 2020
contributors
license EUPL

About

PowerBI custom connector for Eurostat API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published