Load Klaviyo data into BigQuery

Preview

This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

Note: To get support or provide feedback for this feature, contactdts-preview-support@google.com.

You can load data from Klaviyo to BigQuery using theBigQuery Data Transfer Service for Klaviyo connector. With the BigQuery Data Transfer Service, you canschedule recurring transfer jobs that add your latest data fromKlaviyo to BigQuery.

Before you begin

The following sections describe the prerequisites that you need to do before youcreate a Klaviyo data transfer.

Klaviyo prerequisites

You must have a read-only private API key to allow the Klaviyoconnector to transfer data to BigQuery. For more information, seeCreate a private key.

BigQuery prerequisites

Required BigQuery roles

To get the permissions that you need to create a BigQuery Data Transfer Service data transfer, ask your administrator to grant you theBigQuery Admin (roles/bigquery.admin) IAM role on your project. For more information about granting roles, seeManage access to projects, folders, and organizations.

This predefined role contains the permissions required to create a BigQuery Data Transfer Service data transfer. To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

The following permissions are required to create a BigQuery Data Transfer Service data transfer:

  • BigQuery Data Transfer Service permissions:
    • bigquery.transfers.update
    • bigquery.transfers.get
  • BigQuery permissions:
    • bigquery.datasets.get
    • bigquery.datasets.getIamPolicy
    • bigquery.datasets.update
    • bigquery.datasets.setIamPolicy
    • bigquery.jobs.create

You might also be able to get these permissions withcustom roles or otherpredefined roles.

For more information, seeGrantbigquery.admin access.

If you intend to set up transfer run notifications for Pub/Sub,ensure that you have thepubsub.topics.setIamPolicy IAMpermission. Pub/Sub permissions aren't required if you only set upemail notifications. For more information, seeBigQuery Data Transfer Service run notifications.

Set up a Klaviyo data transfer

Add Klaviyo data into BigQuery by setting up atransfer configuration using one of the following options:

Console

  1. Go to the Data transfers page in the Google Cloud console.

    Go to Data transfers

  2. ClickCreate transfer.

  3. In theSource type section, forSource, chooseKlaviyo - Preview.

  4. In theData source details section, do the following:

    • ForPrivate API Key, enter your private API key. For moreinformation, seeKlaviyo prerequisites.
    • Optional: ForStart Date, specify a start date for new recordsto be included in the data transfer. Only records created on or afterthis date are included in the data transfer. The default value is 3 monthsbefore the transfer run date.
    • ForKlaviyo objects to transfer, clickBrowse to select anyobjects to be transferred to the BigQuerydestination dataset. You can also manually enter any objects toinclude in the data transfer in this field.
  5. In theDestination settings section, forDataset, choose thedataset that you created to store your data.

  6. In theTransfer config name section, forDisplay name, enter aname for the data transfer.

  7. In theSchedule options section:

    • In theRepeat frequency list, select an option to specify howoften this data transfer runs. To specify a custom repeat frequency,selectCustom. If you selectOn-demand, then this transferruns when youmanually trigger the transfer.
    • If applicable, select eitherStart now orStart at set time,and provide a start date and run time.
  8. Optional: In theNotification options section, do the following:

    • To enable email notifications, click theEmail notification toggle.When you enable this option, the transfer administrator receives anemail notification when a transfer run fails.
    • To enablePub/Sub transfer run notificationsfor this transfer, click thePub/Sub notifications toggle. Youcan select yourtopic name, or you canclickCreate a topic to create one.
  9. ClickSave.

bq

Enter thebq mk commandand supply the transfer creation flag--transfer_config:

bqmk--transfer_config--project_id=PROJECT_ID--data_source=DATA_SOURCE--display_name=NAME--target_dataset=DATASET--params='PARAMETERS'

Replace the following:

  • PROJECT_ID (optional): your Google Cloud project ID.If--project_id isn't supplied to specify a particular project, thedefault project is used.
  • DATA_SOURCE: the data source —klaviyo.
  • NAME: the display name for the data transferconfiguration. The transfer name can be any value that lets youidentify the transfer if you need to modify it later.
  • DATASET: the target dataset for the transfer configuration.
  • PARAMETERS: the parameters for the created transferconfiguration in JSON format. For example:--params='{"param":"param_value"}'. The following are the parameters fora Klaviyo data transfer:

    • assets: the path to the Klaviyo objects to betransferred to BigQuery.
    • connector.authentication.privateApiKey: the private API key for theKlaviyo account.
    • connector.startDate: (Optional) a start date for new recordsto be included in the data transfer, in the formatYYYY-MM-DD. Onlyrecords created on or after this date are included in the data transfer.The default value is 3 months before the transfer run date.

The following command creates a Klaviyo datatransfer in the default project.

bqmk--transfer_config--target_dataset=mydataset--data_source=klaviyo--display_name='My Transfer'--params=' {            "assets": [ "Events" , "Flows"] ,            "connector.authentication.privateApiKey" : "pk_123456789123",            "connector.startDate": "2025-10-20"            }'
When you save the transfer configuration, the Klaviyoconnector automatically triggers a transfer run according to your scheduleoption. With every transfer run, the Klaviyo connectortransfers all available data from Klaviyo intoBigQuery.

To manually run a data transfer outside of your regular schedule, you can startabackfill run.

Data type mapping

The following table maps Klaviyo data types to thecorresponding BigQuery data types:

Klaviyo data typeBigQuery data type
StringSTRING
TextSTRING
IntegerINTEGER
BooleanBOOLEAN
Date (YYYY-MM-DD HH:MM:SS)TIMESTAMP
ListARRAY

Pricing

There is no cost to transfer Klaviyo data intoBigQuery while this feature is inPreview.

Troubleshoot transfer setup

If you are having issues setting up your data transfer, seeKlaviyo transfer issues.

What's next

  • For an overview of the BigQuery Data Transfer Service, seeWhat is BigQuery Data Transfer Service.
  • For information on using transfers including getting information about atransfer configuration, listing transfer configurations, and viewing atransfer's run history, seeManage transfers.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.