> For the complete documentation index, see [llms.txt](https://docs.humdata.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humdata.org/build/hdx-apis/tabular-data-endpoints/tools-and-notebook.md).

# 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.&#x20;

Don’t see your tool listed but want help? Let us know by emailing [hdx@un.org](mailto:undefined)!

### 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

1. **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.

   <div align="left" data-with-frame="true"><figure><img src="https://1756329736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYX6VfEjVd6ssH4AU60M%2Fuploads%2FsO9bQu6S7RDLAV1UXMMk%2FScreenshot%202026-01-22%20at%2011.55.07.png?alt=media&amp;token=fb4a00aa-f7b2-4b82-a028-04c025965055" alt="" width="563"><figcaption><p>Blank Query</p></figcaption></figure></div>
2. **Open Blank Query.** Click “Advanced Editor” in the top rail.

   <div align="left" data-with-frame="true"><figure><img src="https://1756329736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYX6VfEjVd6ssH4AU60M%2Fuploads%2FTe9NgcKFccFmWYQxTbnZ%2FScreenshot%202026-01-22%20at%2011.55.58.png?alt=media&amp;token=3dc88c4d-0d94-46c5-b537-2df2937385df" alt="" width="563"><figcaption><p>Advanced Editor</p></figcaption></figure></div>
3. **Paste PowerQuery with Custom Fields.** In the editor, copy and paste this[ PowerQuery](https://github.com/OCHA-DAP/hdx-tabular-data-endpoints-notebook/blob/main/power_query.txt) M script. You must replace the following with your own information.

   1. `BaseUrl` (Endpoint)
   2. `ResourceID`
   3. `ApiToken` (Your own HDX API token)

   <div align="left" data-with-frame="true"><figure><img src="https://1756329736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYX6VfEjVd6ssH4AU60M%2Fuploads%2Filk3oH5Bf0RrB9UeDlTG%2FScreenshot%202026-01-22%20at%2011.56.29.png?alt=media&amp;token=e04f3255-b1a1-4a76-902d-75333df2e011" alt="" width="563"><figcaption><p>PowerQuery</p></figcaption></figure></div>
4. **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.
5. **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.

   <div align="left" data-with-frame="true"><figure><img src="https://1756329736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPYX6VfEjVd6ssH4AU60M%2Fuploads%2FA8EWkTLsAknh8WRlDCqf%2FScreenshot%202026-01-22%20at%2011.57.20.png?alt=media&amp;token=7f55009a-0bc7-49e0-8f52-14adb8484ae0" alt="" width="563"><figcaption><p>Apply Query</p></figcaption></figure></div>
6. **\[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](https://gist.github.com/nadineisabel/4b624edb55763883c28149c795b58030) for an organization filter to IOM. Note this will need to be configured per the resource schema.&#x20;
   1. `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**](https://github.com/OCHA-DAP/hdx-tabular-data-endpoints-notebook/tree/main)**.**

**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_search` endpoint)
* Making a minimal native query “probe” call with  `limit=1`&#x20;
* Use SQL query to join two resources with a common column
* Filter in both native and SQL queries
* Fetching data with filters and pagination


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.humdata.org/build/hdx-apis/tabular-data-endpoints/tools-and-notebook.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
