# Getting started with data warehouse - Docs

## Link your first source

Data warehouse lets you store, query, and analyze your data in a unified platform, so you can build better products and make data-driven decisions.

You can query any of the data you've [already sent to PostHog](/docs/data-warehouse/sources/posthog.md) like `events`, `persons`, and `sessions`, but you can also link external sources to build a single source of truth for your customer data.

### Platforms

-   [![](https://us.posthog.com/static/services/attio.png)Attio](/docs/data-warehouse/sources/attio.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/azure_blob_storage_a5110351f6.svg)Azure Blob](/docs/data-warehouse/sources/azure-blob.md)

-   [![](https://us.posthog.com/static/services/bigquery.png)BigQuery](/docs/data-warehouse/sources/bigquery.md)

-   [![](https://us.posthog.com/static/services/bing-ads.svg)Bing Ads](/docs/data-warehouse/sources/bing-ads.md)

-   [![](https://us.posthog.com/static/services/buildbetter.png)BuildBetter](/docs/data-warehouse/sources/buildbetter.md)

-   [![](https://us.posthog.com/static/services/chargebee.png)Chargebee](/docs/data-warehouse/sources/chargebee.md)

-   [![](https://us.posthog.com/static/services/clerk.png)Clerk](/docs/data-warehouse/sources/clerk.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/r2_0d79d88d1f.svg)Cloudflare R2](/docs/data-warehouse/sources/r2.md)

-   [![](https://us.posthog.com/static/services/convex.png)Convex](/docs/data-warehouse/sources/convex.md)

-   [![](https://us.posthog.com/static/services/doit.svg)DoIt](/docs/data-warehouse/sources/doit.md)

-   [![](https://us.posthog.com/static/services/github.png)GitHub](/docs/data-warehouse/sources/github.md)

-   [![](https://us.posthog.com/static/services/google-ads.png)Google Ads](/docs/data-warehouse/sources/google-ads.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/Google_Cloud_14ebf7693d.svg)Google Cloud Storage](/docs/data-warehouse/sources/gcs.md)

-   [![](https://us.posthog.com/static/services/Google_Sheets.svg)Google Sheets](/docs/data-warehouse/sources/google-sheets.md)

-   [![](https://us.posthog.com/static/services/hubspot.png)Hubspot](/docs/data-warehouse/sources/hubspot.md)

-   [![](https://us.posthog.com/static/services/klaviyo.png)Klaviyo](/docs/data-warehouse/sources/klaviyo.md)

-   [![](https://us.posthog.com/static/services/linear.png)Linear](/docs/data-warehouse/sources/linear.md)

-   [![](https://us.posthog.com/static/services/linkedin.png)LinkedIn Ads](/docs/data-warehouse/sources/linkedin-ads.md)

-   [![](https://us.posthog.com/static/services/mailchimp.png)Mailchimp](/docs/data-warehouse/sources/mailchimp.md)

-   [![](https://us.posthog.com/static/services/meta-ads.png)Meta Ads](/docs/data-warehouse/sources/meta-ads.md)

-   [![](https://us.posthog.com/static/services/sql-azure.png)Microsoft SQL Server](/docs/data-warehouse/sources/microsoft-sql-server.md)

-   [![](https://us.posthog.com/static/services/Mongodb.svg)MongoDB](/docs/data-warehouse/sources/mongodb.md)

-   [![](https://us.posthog.com/static/services/mysql.png)MySQL](/docs/data-warehouse/sources/mysql.md)

-   [![](https://us.posthog.com/static/services/pinterest_ads.png)Pinterest Ads](/docs/data-warehouse/sources/pinterest-ads.md)

-   [![](https://us.posthog.com/static/services/postgres.png)Postgres](/docs/data-warehouse/sources/postgres.md)

-   [![](https://us.posthog.com/static/services/reddit.png)Reddit Ads](/docs/data-warehouse/sources/reddit-ads.md)

-   [![](https://us.posthog.com/static/services/redshift.png)Redshift](/docs/data-warehouse/sources/redshift.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/s3_8f86e011ce.svg)S3](/docs/data-warehouse/sources/s3.md)

-   [![](https://us.posthog.com/static/services/salesforce.png)Salesforce](/docs/data-warehouse/sources/salesforce.md)

-   [![](https://us.posthog.com/static/services/sentry.png)Sentry](/docs/data-warehouse/sources/sentry.md)

-   [![](https://us.posthog.com/static/services/shopify.png)Shopify](/docs/data-warehouse/sources/shopify.md)

-   [![](https://us.posthog.com/static/services/snapchat.png)Snapchat Ads](/docs/data-warehouse/sources/snapchat-ads.md)

-   [![](https://us.posthog.com/static/services/snowflake.png)Snowflake](/docs/data-warehouse/sources/snowflake.md)

-   [![](https://us.posthog.com/static/services/stripe.png)Stripe](/docs/data-warehouse/sources/stripe.md)

-   [![](https://us.posthog.com/static/services/supabase.png)Supabase](/docs/data-warehouse/sources/supabase.md)

-   [![](https://us.posthog.com/static/services/temporal.png)Temporal.io](/docs/data-warehouse/sources/temporalio.md)

-   [![](https://us.posthog.com/static/services/tiktok.png)TikTok Ads](/docs/data-warehouse/sources/tiktok-ads.md)

-   [![](https://us.posthog.com/static/services/typeform.png)Typeform](/docs/data-warehouse/sources/typeform.md)

-   [![](https://us.posthog.com/static/services/vitally.png)Vitally](/docs/data-warehouse/sources/vitally.md)

-   [![](https://us.posthog.com/static/services/zendesk.png)Zendesk](/docs/data-warehouse/sources/zendesk.md)

[Link your first source](/docs/data-warehouse/sources.md)

## Query your data with SQL

You can use SQL to query data from your sources and PostHog. We provide all sorts of [commands](/docs/data-warehouse/sql.md#commands) and [functions](/docs/data-warehouse/sql/useful-functions.md) to help you with this.

After you've got the data you want, the SQL editor also provides a bunch of [visualizations](/docs/data-warehouse/query.md#sql-visualizations) for you to use too.

![Visualize your data](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/Clean_Shot_2025_08_26_at_11_34_23_2x_a36e4b0bea.png)![Visualize your data](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/Clean_Shot_2025_08_26_at_11_34_05_2x_50d26bf304.png)

[Query your data with SQL](/docs/data-warehouse/query.md)

## Set up a join

The real power of the data warehouse is the ability to combine data from multiple tables in a single query.

[Joins](/docs/data-warehouse/join.md) enable you to do this by letting you choose fields that act as connections between PostHog and external sources.

![Create a join](https://res.cloudinary.com/dmukukwp6/image/upload/join_light_9b369cc72f.png)![Create a join](https://res.cloudinary.com/dmukukwp6/image/upload/join_dark_41d32574ec.png)

[Set up a join](/docs/data-warehouse/join.md)

## Create and materialize views

You can save your most used queries as [views](/docs/data-warehouse/views.md) and reference them in subsequent queries. This makes them composable and easy to reuse.

You can even [materialize views](/docs/data-warehouse/views/materialize.md) to improve query performance.

![Materialize view](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/Clean_Shot_2025_08_26_at_13_48_10_2x_88dc4ae252.png)![Materialize view](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/Clean_Shot_2025_08_26_at_13_48_31_2x_16e9dbe683.png)

[Create a view](/docs/data-warehouse/views.md)

## Unify customer data

The data warehouse can be used throughout PostHog as a single source of truth for your customer data. Of course, this means it can be used to power other PostHog products too.

### Product analytics

Once you've linked a source, you can use it as you would your other PostHog data in [trends](/docs/data-warehouse/insights.md). This makes setting up your first insights easy.

![Selecting a data warehouse table in a trend](https://res.cloudinary.com/dmukukwp6/image/upload/trend_light_9b29b1c254.png)![Selecting a data warehouse table in a trend](https://res.cloudinary.com/dmukukwp6/image/upload/trend_dark_77178b53cb.png)

### Revenue analytics

Sync Stripe to automatically generate a [revenue analytics dashboard](/docs/revenue-analytics/dashboard.md) in PostHog to track MRR, customer count, ARPU, LTV, growth rate, and more.

![Revenue analytics dashboard view](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2025_09_05_at_14_05_35_288e8e0d6c.png)![Revenue analytics dashboard view](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2025_09_05_at_14_06_29_e4fe61d678.png)

### Experiments

Run experiments and [calculate primary or secondary metrics](/docs/experiments/data-warehouse.md) using data warehouse tables.

![Screenshot of the form to assign a data warehouse table to an experiment metric](https://res.cloudinary.com/dmukukwp6/image/upload/experiment_goal_light_c767c4f794.png)![Screenshot of the form to assign a data warehouse table to an experiment metric](https://res.cloudinary.com/dmukukwp6/image/upload/experiment_goal_dark_7eedc50ffe.png)

## Use for free

PostHog's data warehouse is built to be cost-effective by default, with a generous free tier and transparent usage-based pricing. Our generous free tier means more than 90% of companies use PostHog for free.

### TL;DR 💸

-   No credit card required to start
-   First 1M rows per month are free
-   Above 1M we have usage-based pricing starting at $0.000015/row with discounts as volume increases
-   Set billing limits to avoid surprise charges
-   See our [pricing page](/data-warehouse.md#pricing) for more up-to-date details

---

That's it! You're ready to start building your data warehouse.

[Link a source](/docs/data-warehouse/sources.md)

1/6

[**Link your first source** ***Required***](#quest-item-link-your-first-source)[**Query your data with SQL** ***Required***](#quest-item-query-your-data-with-sql)[**Set up a join** ***Recommended***](#quest-item-set-up-a-join)[**Create and materialize views** ***Recommended***](#quest-item-create-and-materialize-views)[**Unify customer data** ***Recommended***](#quest-item-unify-customer-data)[**Use for free** ***Free 1M rows/mo***](#quest-item-use-for-free)

**Link your first source**

***Required***

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better