Copy your data to PostgreSQL, Supabase or Neon
A nightly copy of your daily marketing data in your own PostgreSQL database.
1. Make a user just for this export
In your database's SQL editor, run these two lines (choose your own strong password). The user can only create and fill tables in one schema.
create user marketing_export with password 'CHOOSE-A-LONG-PASSWORD';
grant usage, create on schema public to marketing_export;
2. Copy the connection string
- Supabase: Project, Connect, "Session pooler". The user name there looks like marketing_export.yourprojectref. Put your password in place of [YOUR-PASSWORD]. Also download the CA certificate under Database settings, "SSL configuration", and paste its text in the form.
- Neon: Dashboard, Connect, pick the database and copy the string. It already has sslmode=require.
- Other providers: any address that is reachable from the internet and offers TLS (encryption).
3. Add it in the app
- Open Destinations and fill in "Add PostgreSQL". Paste the connection string.
- Click "Add and test". We connect, check the schema and create the table marketing_daily.
- The first copy runs tonight, or click Run now.
Good to know
- We only connect with TLS and check the server's certificate. We never connect to private or internal network addresses.
- Each night the last days are copied again. A day is replaced in one transaction, so rows are never doubled.
- row_key is unique for each day, account and mix of dimensions. Rates are not stored: CTR = sum(clicks) / sum(impressions).
- Money columns are in the row's currency. Never add different currencies together.
- Deleting the destination removes our saved login. Your table stays in your database.