Linking DataHub as a source
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.

The DataHub connector syncs your metadata catalog – datasets, dashboards, charts, pipelines, owners, domains, glossary, tags, incidents, queries, ML metadata (models, model groups, features, feature tables, primary keys, and model deployments), and data platform instances – 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 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
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- 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 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_attimestamp). 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 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 | — | — |
data_process_instances | A single run of a data job or data flow, such as one Airflow task instance or DAG run, with the assets it read and wrote. | Full refresh | — | — |
assertions | A data quality assertion defined against a dataset, data job or column, such as a freshness, volume, column value or custom SQL check. | Full refresh | — | — |
schema_fields | A dataset column that carries its own metadata in DataHub. Only fields materialized as entities appear here; the full column list of a dataset is in its schemaMetadata aspect on the datasets table. | Full refresh | — | — |
incidents | A data incident raised against one or more assets, such as a broken pipeline or a failed freshness check, with its status, priority and assignees. | Full refresh | — | — |
queries | A SQL query known to DataHub, either saved by a user or extracted from a platform's query log, with the datasets and columns it reads and writes. | Full refresh | — | — |
ml_models | A trained machine learning model, with its hyperparameters, metrics, features, groups and deployments. | Full refresh | — | — |
ml_model_groups | A group of related machine learning models, such as the versions of one model. | Full refresh | — | — |
ml_features | An individual feature that machine learning models consume, with its data type and the datasets it is computed from. | Full refresh | — | — |
ml_feature_tables | A collection of machine learning features and primary keys in a feature store. | Full refresh | — | — |
ml_primary_keys | A key that identifies the entity a feature table's features describe, such as a user or order id. | Full refresh | — | — |
ml_model_deployments | A deployment of a machine learning model to a serving endpoint, with its status and version. | Full refresh | — | — |
data_platform_instances | A named instance of a data platform, such as one Snowflake account or one Kafka cluster. Lookup for the platform instance urns that datasets, charts and dashboards carry. | Full refresh | — | — |
data_process_instance_run_events | Execution history of data job and data flow runs: one row per recorded state change, with status, attempt number and result. | Incremental, Full refresh | timestampMillis | — |
assertion_run_events | Pass and fail history of data quality assertions: one row per assertion evaluation, with its status and result. | Incremental, Full refresh | timestampMillis | — |
dataset_profiles | Profiling snapshots of datasets: row count, column count, storage size and per-column statistics at a point in time. | Incremental, Full refresh | timestampMillis | — |
dataset_usage_statistics | Usage of datasets per time bucket: how many queries ran, how many distinct users read them, and which users, queries and columns were involved. | Incremental, Full refresh | timestampMillis | — |
dataset_operations | Write operations recorded against datasets: inserts, updates, deletes and custom operations, with when they happened and how many rows they touched. | Incremental, Full refresh | timestampMillis | — |
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 a sync fails because a single DataHub entity is larger than PostHog can read in one response, that entity exceeds the 64 MiB response limit. This is most likely in the
queriestable, since each row holds a full SQL statement. Turn that table off, or remove the oversized entity in DataHub, then sync again.
If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.





