> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # PlanetScale Postgres source Canonical URL: https://posthog.com/docs/data-pipelines/sources/planetscale > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://us.posthog.com` or `https://app.posthog.com` (app host for links). ## On this page - [Configuration](#configuration) - [Linking PlanetScale Postgres to PostHog](#linking-planetscale-postgres-to-posthog) - [Supported tables](#supported-tables) ![PlanetScale Postgres](https://us.posthog.com/static/services/planetscale.svg)# PlanetScale Postgres source ![](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` ![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 Connect PlanetScale Postgres to PostHog to sync your data into the PostHog data warehouse for analysis and modeling. Enter your PlanetScale Postgres credentials to pull your data into the PostHog Data warehouse. ## Configuration | Option | Description | | --- | --- | | `Connection string (optional)` **Type:** text **Required:** False | | | `Host` **Type:** text **Required:** True | In the PlanetScale dashboard, open your database and click **Connect** to create a role and read its connection details. Use the host it shows, which looks like `xxxxxxxxxx-useast1-1.horizon.psdb.cloud`. PlanetScale always connects over TLS, which PostHog uses by default. A read-only role is enough for syncing. | | `Port` **Type:** number **Required:** True | Use `5432` for a direct connection. Port `6432` goes through PSBouncer, which works for standard syncs but not for **change data capture (CDC)**. PSBouncer pools in transaction mode, and logical replication can't run over it. | | `Database` **Type:** text **Required:** True | | | `User` **Type:** text **Required:** True | PlanetScale usernames carry the branch id, so they look like `postgres.xxxxxxxxxx`. | | `Password` **Type:** password **Required:** True | | | `Schema` **Type:** text **Required:** False | | ## Linking PlanetScale Postgres to PostHog 1. Go to the [Data pipeline page](https://us.posthog.com/pipeline/new/source) in PostHog 2. Click **New source** and select **PlanetScale Postgres** 3. Fill in the required configuration fields 4. Click **Next**, select the tables you want to sync, and then press **Import** ## Supported tables The tables available from this source are discovered from your account when you connect it, so the exact list depends on your data. Once connected, you can pick which tables to sync from the [sources tab](https://app.posthog.com/data-management/sources).