Link a source

Last updated:

|Edit this page

The PostHog data warehouse enables you to link your most important data into PostHog from sources like your CRM, payment processor, or database. Once linked, you can combine this data with the product analytics data already in PostHog and query across all of it.

The data warehouse is currently in beta. To access it, enable the feature preview in your instance. It is free to use during the beta period.

To link a source, go to the data warehouse tab, and click Link source in the top right. On the new source page, you have an option to choose a pre-built connector or create a custom source. These include:

You can find the set up instructions in-app or in the source specific docs.

Linking a custom source

The data warehouse can link to data in your object storage system. To do this, you'll need to:

  1. Create a bucket in your object storage system like S3, GCS, or Cloudflare R2
  2. Set up an access key and secret
  3. Add data to the bucket (potentially using a tool like Airbyte, Fivetran, Stitch, or others)
  4. Link the table in PostHog

See an example in our S3 setup docs.

Incremental vs full table

On some sources and tables, you can choose the sync method. The options are incremental replication or full table replication.

Incremental

With incremental replication, you only sync new or updated data. This reduces the total number of rows synced and how long it takes to sync.

When choosing incremental replication, you must select a field to identify new or updated data. This is often something like a updated_at or created_at timestamp, or an autoincrementing ID. Not all fields are suitable to be used to identify new and updated data, and so we only support the following types as replication keys:

  • integer (including bigint and smallint)
  • datetime
  • date
  • timestamp
  • numeric (for Snowflake)

The one downside to incremental syncing is that deletions of data won't be synced to your PostHog data warehouse. You need to use full table refreshes for this.

Full table

This reloads the whole table on every sync. This is great for tables with common data deletions or ones without an incrementing field (such as a updated_at timestamp).

Syncing

Once you add a source, you can see its status, sync frequency, and last successful run in the data warehouse settings page. You can also reload or delete sources here.

When you expand each source, you can see:

  • Schema name
  • Enable or disable syncing for that table
  • Synced table name in PostHog
  • Time the table was last synced
Data warehouse settings in PostHog

Questions?

Was this page useful?

Next article

Link a source

The PostHog data warehouse enables you to link your most important data into PostHog from sources like your CRM, payment processor, or database. Once linked, you can combine this data with the product analytics data already in PostHog and query across all of it. The data warehouse is currently in beta. To access it, enable the feature preview in your instance. It is free to use during the beta period. To link a source, go to the data warehouse tab, and click Link source in the top right. On…

Read next article