Tools and notebook
Tabular Data endpoints tool integrations and Python notebook
Integration with tools
The Tabular Data Endpoints can be integrated into various tools to enable automated, repeatable data retrieval and analysis workflows. See examples below.
Don’t see your tool listed but want help? Let us know by emailing hdx@un.org!
Power BI
Follow this section to connect HDX’s Tabular Data endpoints to PowerBI as a data source. This can also be used as a Power Query in other Microsoft tools, such as Fabric
Open PowerBI Desktop. Within the PowerBI Desktop application (not the web version), go to Home → Get data. Select “Blank Query”. This will open the Power Query Editor window.

Blank Query Open Blank Query. Click “Advanced Editor” in the top rail.

Advanced Editor Paste PowerQuery with Custom Fields. In the editor, copy and paste this PowerQuery M script. You must replace the following with your own information.
BaseUrl(Endpoint)ResourceIDApiToken(Your own HDX API token)

PowerQuery Set the connection to Anonymous. If prompted for credentials, choose “Anonymous”. If no prompt appears but there is an error, ensure you go to File → Options and settings → Data source settings. Find the entry for your data and clear permissions. Re-run the query which should prompt you to choose Anonymous.
Apply the Query. Once the preview loads in the Power Query Editor, click “Close & Apply”. Power BI should fetch the full dataset using the pagination logic and filters.

Apply Query [Optional] Add a Filter. If you would like to apply a filter, you need to update the PowerQuery to include the filter in the config. See example here for an organization filter to IOM. Note this will need to be configured per the resource schema.
OrgFilter(Param filter)
Python notebook
We provide a ready-to-run Python ipynb notebook showing how to query the Tabular Data endpoints (schema information, native and SQL) for Python scripts and pipelines. You can open it directly in your browser via GitHub and test queries without needing to install anything locally.
Open the Python notebook here.
Important:
You must provide your own HDX API token in the notebook.
Never commit your token or share it publicly! Treat it like a password.
The notebook covers:
Searching for resources using the HDX metadata API (
package_searchendpoint)Making a minimal native query “probe” call with
limit=1Use SQL query to join two resources with a common column
Filter in both native and SQL queries
Fetching data with filters and pagination
Last updated
Was this helpful?
