View a markdown version of this page

Reading from Klaviyo entities - AWS Glue

Reading from Klaviyo entities

Prerequisites

A Klaviyo object you want to read from. See the supported entities table below for the available entities.

Supported entities for source

EntityCan be filteredSupports limitSupports select *Supports order bySupports partitioning
campaignsNoYesYesNoNo
eventsYesYesYesNoYes
listsNoYesYesNoNo
metricsNoYesYesNoNo
profilesNoYesYesNoNo
segmentsNoYesYesNoNo
Example – Reading from a Klaviyo entity

The following example reads from the campaigns entity. Replace connectionName with the name of your Klaviyo connection:

read_df = glueContext.create_dynamic_frame.from_options( connection_type="klaviyo", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "campaigns" } )

Partitioning queries

You can provide the additional Spark options PARTITION_FIELD, LOWER_BOUND, UPPER_BOUND, and NUM_PARTITIONS to read in parallel. The query is split into NUM_PARTITIONS sub-queries that Spark runs concurrently. The following entities and fields support partitioning:

EntityPartitioning field
eventsdatetime