Limited availability: Azure Synapse import is currently in limited availability and is only enabled for select Klaviyo accounts. Features and behavior may change before general availability. If you don't see Microsoft Azure Synapse Analytics when you create a sync, reach out to your customer success manager (CSM) to request access.

Advanced KDP is not included in Klaviyo's standard marketing application, and a subscription is required to access the associated functionality. Head to our billing guide to learn about how to purchase this plan.

Overview

This guide walks Azure Synapse administrators through preparing a dedicated SQL pool for Klaviyo, granting the minimum required access, and completing the connection so you can import profile data on a schedule. You'll learn how to:

  1. Create the KLAVIYO_TMP and KLAVIYO_IMPORT_FROM_DWH schemas
  2. Create a dedicated SQL login and database user for Klaviyo
  3. Grant least-privilege permissions
  4. (Optional) Validate database permissions
  5. Allow Klaviyo through your Synapse workspace firewall
  6. Connect Azure Synapse to Klaviyo and create a scheduled profile sync

For background on how data warehouse import works, including supported objects and best practices for table structure, see Understanding data warehouse import in Klaviyo.

Before you begin

  • A dedicated SQL pool in a Synapse workspace. Klaviyo connects to the pool's server name, such as myworkspace.sql.azuresynapse.net, on port 1433. Serverless SQL pools and Spark pools aren't supported.
  • SQL authentication. Klaviyo signs in with a SQL login and password. Microsoft Entra ID authentication isn't supported.
  • The pool must be online when a sync runs. Klaviyo can't resume a paused pool. If you pause your pool to save costs, resume it before you test the connection and before each scheduled sync.
  • Admin access. You need the workspace SQL admin login (or a login with equivalent rights) to run the setup statements below, and permission to edit the workspace firewall in the Azure portal.

Create required schemas

Connect to your dedicated SQL pool as the workspace SQL admin and create 2 schemas:

text
-- Run in the dedicated SQL pool as the workspace SQL admin
IF SCHEMA_ID('KLAVIYO_TMP') IS NULL EXEC('CREATE SCHEMA KLAVIYO_TMP');
IF SCHEMA_ID('KLAVIYO_IMPORT_FROM_DWH') IS NULL EXEC('CREATE SCHEMA KLAVIYO_IMPORT_FROM_DWH');
  • KLAVIYO_IMPORT_FROM_DWH: Place your final, ready-to-sync tables or views here. During setup, Klaviyo lists objects in this schema for you to choose from, so include only the tables you plan to import.
  • KLAVIYO_TMP: Used exclusively by Klaviyo for temporary staging tables during sync jobs. Don't modify data here. Klaviyo manages and cleans up this schema automatically.

Create the Klaviyo login and user

In Synapse, a login lives in the master database and a user lives in the pool. Create both, with a strong password that you can rotate independently.

First, connect to master:

text
-- Run in master as the workspace SQL admin. Replace the password.
CREATE LOGIN KLAVIYO_IMPORT_USER WITH PASSWORD = '********';

Then connect to your dedicated SQL pool:

text
-- Run in the dedicated SQL pool as the workspace SQL admin
CREATE USER KLAVIYO_IMPORT_USER FOR LOGIN KLAVIYO_IMPORT_USER;

Store the username and password securely. You'll use them when connecting Klaviyo to Azure Synapse.

Grant required permissions (least privilege)

Run these statements as the workspace SQL admin in your dedicated SQL pool. Klaviyo builds each sync's staging table with CREATE TABLE AS SELECT in KLAVIYO_TMP, which needs the database-level CREATE TABLE permission plus ALTER on that schema.

text
-- 1) Staging schema Klaviyo manages
GRANT CREATE TABLE TO KLAVIYO_IMPORT_USER;
GRANT ALTER, SELECT, INSERT, DELETE ON SCHEMA::KLAVIYO_TMP TO KLAVIYO_IMPORT_USER;

-- 2) Read-only access to your import schema
GRANT SELECT ON SCHEMA::KLAVIYO_IMPORT_FROM_DWH TO KLAVIYO_IMPORT_USER;

A schema-level SELECT grant also covers tables and views you add to KLAVIYO_IMPORT_FROM_DWH later, so you don't need to re-grant for each new source.

(Optional) Verify your setup

Connect to your dedicated SQL pool as KLAVIYO_IMPORT_USER, then run these checks. Replace EXAMPLE_TABLE with a source table or view you plan to sync. These checks don't replace the Test connection step in Klaviyo.

text
-- 1) Confirm the permissions Klaviyo checks during Test connection (expect 1, 1, 1)
SELECT
    HAS_PERMS_BY_NAME(NULL, 'DATABASE', 'CREATE TABLE') AS can_create_table,
    HAS_PERMS_BY_NAME('KLAVIYO_TMP', 'SCHEMA', 'ALTER') AS can_alter_schema,
    HAS_PERMS_BY_NAME('KLAVIYO_TMP', 'SCHEMA', 'SELECT') AS can_select_schema;

-- 2) Confirm visibility of source tables and views
SELECT DISTINCT TOP 25 TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'KLAVIYO_IMPORT_FROM_DWH'
ORDER BY TABLE_NAME;

-- 3) Confirm SELECT on a source table or view
SELECT TOP 1 * FROM KLAVIYO_IMPORT_FROM_DWH.EXAMPLE_TABLE;

Network access

Klaviyo must be able to reach your Synapse workspace's public SQL endpoint on port 1433. A Synapse workspace refuses every client that isn't on its firewall, so this step is required even if your other tools already connect.

In the Azure portal, open your Synapse workspace, go to Networking, and add a firewall rule for each of Klaviyo's IP addresses (use the same address as the start and end IP):

text
184.72.183.187
52.206.71.52
3.227.146.32
44.198.39.11
35.172.58.121
3.228.37.244
54.88.219.8
3.214.211.176

If your Klaviyo account is hosted in the EU, add 1 rule for Klaviyo's EU range instead: start IP 207.186.206.0, end IP 207.186.206.255 (207.186.206.0/24).

Firewall changes can take up to 5 minutes to take effect.

Prepare your import tables (structure and performance)

Ensure that all tables you plan to import follow these conventions for accurate, efficient incremental syncs:

  • Timestamp column: Include a per-row creation or last-update timestamp (e.g., inserted_at, updated_at, modified_at). Use a DATETIME2, DATETIME, SMALLDATETIME, or DATETIMEOFFSET column with a value for each row. Text and DATE columns aren't available for change detection.
  • Monotonic updates: The timestamp should increase whenever a row changes.
  • Timezone: Store UTC (for example, set the column with SYSUTCDATETIME()), or use DATETIMEOFFSET. Klaviyo treats DATETIME2, DATETIME, and SMALLDATETIME values as UTC.
  • Consistent identifiers: Include at least 1 profile identifier (email, phone, external_id, etc.). Use consistent identifiers across import tables to avoid duplicate profiles.
  • Valid phone numbers: Phone numbers must be valid and in E.164 format (e.g., +16175550123). Rows with invalid numbers are skipped with an error.
  • Consent formats: When syncing consent data, follow the same valid values and formats as used in file or SFTP uploads.
  • Views: You can import from tables or views, as long as a simple SELECT works for the Klaviyo user.

Connect Azure Synapse and create a profile sync

Connect Azure Synapse

  1. In Klaviyo, navigate to Advanced > Data management > Syncing.
  2. If you already have a connection configured, click Create sync. If this is your first connection, continue to the next step.
  3. Select Import data from your data warehouse.
  4. Choose Microsoft Azure Synapse Analytics.
  5. Click the connect button and enter the following connection details:

Field

Description

Name

Enter a name, such as your dedicated SQL pool name.

Server name

Your workspace's dedicated SQL endpoint (e.g., myworkspace.sql.azuresynapse.net). Don't include a port or a tcp: prefix.

Database name

Your dedicated SQL pool, which contains KLAVIYO_TMP and KLAVIYO_IMPORT_FROM_DWH.

Username / Database password

The KLAVIYO_IMPORT_USER login and its password.

Click Next to open Test connection, then click Test. Klaviyo checks your connection, required schemas, and staging permissions, then lists accessible tables and views in KLAVIYO_IMPORT_FROM_DWH. At least 1 source must be available to continue. After the test succeeds, click Next.

Create a profile sync

  1. Enter a unique sync name in Name, select your table or view under Data source, and select Profiles under Data object types.
  2. Under Cadence, select Schedule run. Choose the interval under Every, then set Start Date, Start Time, and Timezone. Click Next.
  3. In Map properties, select your timestamp column under Change detection > New Row Detection. Map at least 1 profile identifier and the profile properties you want to import. Remove mappings for columns you don't want to import. You can't also map the change-detection column to a profile property.
  4. Click Done to save the connection and sync. Klaviyo returns you to Syncing, and the sync runs according to the schedule you selected.

Troubleshooting tips

Connection test fails with "Client with IP address ... is not allowed to access the server"

  • Add all 8 Klaviyo IP addresses (or the EU range) to your Synapse workspace firewall (see Network access), then wait up to 5 minutes and test again.

Connection test fails or times out

  • Confirm the dedicated SQL pool is online, not paused.
  • Confirm the server name is the dedicated SQL endpoint (myworkspace.sql.azuresynapse.net), not the serverless endpoint (myworkspace-ondemand.sql.azuresynapse.net), and has no port or tcp: prefix.

Login failed

  • Confirm the login exists in master, the user exists in the pool, and the password is current.

Missing schemas or permission errors

  • Confirm KLAVIYO_TMP and KLAVIYO_IMPORT_FROM_DWH exist in the pool named in Database name.
  • Re-run the verification SQL as KLAVIYO_IMPORT_USER and re-apply the grants if any check returns 0.

Tables don't appear

  • Ensure tables are in KLAVIYO_IMPORT_FROM_DWH.
  • Confirm the Klaviyo user has SELECT on the schema.

No new rows syncing

  • Verify your timestamp column updates on row changes and stores UTC.

Rows show as errored

  • Check identifier formats, especially phone numbers (valid, E.164).

Security and maintenance

  • Use a login that belongs to your team, not one tied to an individual employee.
  • Rotate the login's password regularly and after staff changes. After changing the password in Azure, update it in your Klaviyo connection's Configuration tab and click Save.
  • Limit the Klaviyo user to the 2 schemas above.
  • Keep a simple runbook documenting your exact GRANT statements and the firewall rules you've added.

FAQ

Can I import from multiple dedicated SQL pools?

Yes. Create the user, schemas, and grants in each pool, then create a separate Azure Synapse connection in Klaviyo for each pool. Add separate syncs for the source tables or views within each connection.

Can I use a serverless SQL pool?

No. Klaviyo stages each sync in a table in KLAVIYO_TMP, and serverless SQL pools can't create regular tables. Use a dedicated SQL pool.

Can I pause my dedicated SQL pool between syncs?

Yes. Klaviyo only needs the pool online while a sync runs, but it can't resume a paused pool for you. Resume the pool a few minutes before each scheduled sync, for example with an Azure automation that runs on the same schedule.

Appendix: Example DDL for a simple import table

text
CREATE TABLE KLAVIYO_IMPORT_FROM_DWH.PROFILE_BASE (
    EXTERNAL_ID  NVARCHAR(128),
    EMAIL        NVARCHAR(320),
    PHONE_NUMBER NVARCHAR(32),
    FIRST_NAME   NVARCHAR(128),
    LAST_NAME    NVARCHAR(128),
    COUNTRY      NVARCHAR(64),
    UPDATED_AT   DATETIME2
)
WITH (DISTRIBUTION = ROUND_ROBIN, HEAP);
-- Set UPDATED_AT = SYSUTCDATETIME() on every insert and update in your ETL/ELT.
-- Dedicated SQL pools don't accept multi-row VALUES; load with INSERT ... SELECT.
Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type