> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt

# Linking DataHub as a source - Docs

Copy page

# Linking DataHub as a source - Docs

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70)

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d)

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

`npx @posthog/wizard warehouse`

[Learn more](/wizard.md)

![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)

![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you

**Alpha release**

This source is currently in **alpha**. The interface and available tables may change.

The DataHub connector syncs your metadata catalog – datasets, dashboards, charts, pipelines, owners, domains, glossary, and tags – into the PostHog Data warehouse, so you can build governance reports and lineage-coverage analytics alongside your product data. Lineage edges ride along on the entities themselves: datasets carry their upstream lineage and data jobs carry their input/output edges.

## Prerequisites

You need a DataHub instance (self-hosted or DataHub Cloud) with [Metadata Service Authentication](https://docs.datahub.com/docs/authentication/introducing-metadata-service-authentication) enabled, and a user who can generate access tokens. The token inherits its owner's view privileges, so the owner must be able to view the entity types you want to sync.

## Adding a data source

1.  In PostHog, go to the [Sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section.
2.  Click **\+ New source** and click **Link** next to this source.
3.  Enter your credentials (see [Configuration](#configuration) below) and click **Next**.
4.  Select the tables you want to sync, choose a sync method and frequency, then click **Import**.

Once the syncs are complete, you can start querying this data in PostHog.

When linking DataHub, you'll need:

-   **Instance URL** – where your DataHub API is served. For DataHub Cloud, that's `https://<your-tenant>.acryl.io/gms`. For self-hosted, it's your metadata service (GMS) URL, or the DataHub frontend URL, which proxies the API.
-   **Access token** – a [personal access token](https://docs.datahub.com/docs/authentication/personal-access-tokens) generated under **Settings → Access Tokens** in DataHub.

## Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

-   **Webhook** (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
-   **Incremental** – only new or updated rows are synced on each run, using a cursor field (such as an `updated_at` timestamp). Cheaper than a full refresh, but deletes aren't captured.
-   **Append only** – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
-   **Full refresh** – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See [sync methods](/docs/cdp/sources.md#sync-methods) for a full explanation of how each mode works and how to choose between them.

All DataHub tables are full refresh only: the entity list API has no reliable "updated since" filter, so each sync re-reads the catalog. Metadata catalogs are usually small enough that this is cheap.

## Configuration

| Option | Type | Required |
| --- | --- | --- |
| Instance URL | text | Yes |
| Access token | password | Yes |

## Supported tables

| Table | Description | Sync method | Incremental field | Primary key |
| --- | --- | --- | --- | --- |
| datasets | A collection of data such as a table, view, stream, or file, with its schema, ownership, tags, and upstream lineage aspects. | Full refresh | — | — |
| containers | A grouping of datasets such as a database, schema, project, or folder on a data platform. | Full refresh | — | — |
| dashboards | A dashboard in a BI tool, with the charts and datasets it is built from. | Full refresh | — | — |
| charts | A single visualization in a BI tool, with the source datasets it reads from. | Full refresh | — | — |
| data_flows | An orchestration pipeline (e.g. an Airflow DAG or dbt project) that groups data jobs. | Full refresh | — | — |
| data_jobs | A task within a data flow (e.g. an Airflow task), with the datasets it consumes and produces. | Full refresh | — | — |
| data_platforms | A data system type known to DataHub (e.g. Snowflake, BigQuery, Kafka) that other entities reference. | Full refresh | — | — |
| data_products | A curated data product grouping related data assets within a domain. | Full refresh | — | — |
| domains | A top-level business category (e.g. Marketing, Finance) used to organize data assets. | Full refresh | — | — |
| glossary_terms | A business glossary term that defines shared vocabulary and can be attached to data assets. | Full refresh | — | — |
| glossary_nodes | A folder-like grouping node in the business glossary hierarchy. | Full refresh | — | — |
| tags | A label that can be applied to any data asset or schema field for search and governance. | Full refresh | — | — |
| users | A person (or service account) known to DataHub, referenced as an owner of data assets. | Full refresh | — | — |
| groups | A group of users, referenced as an owner of data assets. | Full refresh | — | — |

## Troubleshooting

-   If you see an authentication error, your access token is invalid or has expired, or your instance doesn't have Metadata Service Authentication enabled. Enable it, generate a new token, then reconnect.
-   If you see a permissions error, the token's owner is missing the view privilege for that entity type. Check their DataHub policies, then reconnect.

If your sync is failing or data looks wrong, see the [Data warehouse troubleshooting guide](/docs/data-warehouse/troubleshooting.md). If that doesn't help, [contact support](https://us.posthog.com/#panel=support%3Asupport%3Adata_warehouse%3A%3Atrue) – we're happy to help.

### Was this page useful?

HelpfulCould be better