diff --git a/connectors/source_klaviyo/models/fivetran_converter/campaigns.yml b/connectors/source_klaviyo/models/fivetran_converter/campaigns.yml deleted file mode 100644 index 75347f9e..00000000 --- a/connectors/source_klaviyo/models/fivetran_converter/campaigns.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2 - -models: - - name: flows - schema: "{{ var('airbyte_schema', target.schema) }}" - database: "{{ var('airbyte_database', target.database) }}" - identifier: "{{ var('klaviyo_flow_identifier', 'flow') }}" - description: Table of automated, triggered flow sequences in Klaviyo. - config: - +enabled: "{{ var('using_fivetran_model', False) }}" - columns: - - name: created_at - description: Timestamp of when the flow was first created. - - name: flow_id - description: Unique ID of the flow. - tests: - - not_null - - name: flow_name - description: Name of the flow. - - name: status - description: Current status of the flow. Either 'manual', 'live', or 'draft'. Read more [here](https://help.klaviyo.com/hc/en-us/articles/115002774932-Getting-Started-with-Flows#the-flow-action-status9). - - name: updated_at - description: Timestamp of when the flow was last updated. - - name: is_archived - description: Boolean of whether this record has been archived - - name: trigger_type - description: Corresponds to the object which triggered the flow. \ No newline at end of file diff --git a/connectors/source_klaviyo/models/fivetran_converter/campaingns.sql b/connectors/source_klaviyo/models/fivetran_converter/campaingns.sql deleted file mode 100644 index 6495176e..00000000 --- a/connectors/source_klaviyo/models/fivetran_converter/campaingns.sql +++ /dev/null @@ -1,46 +0,0 @@ -{% if target.type == "snowflake" %} - - SELECT - id AS flow_id, - attributes:created::STRING AS created_at, - attributes:name::STRING AS flow_name, - attributes:status::STRING AS status, - attributes:updated::STRING AS updated_at, - attributes:archived::STRING AS is_archived, - attributes:trigger_type::STRING AS trigger_type - FROM - {{ source('airbyte_dbt_source_klaviyo', 'flows') }} - WHERE - flow_id IS NOT NULL; - -{% elif target.type == "bigquery" %} - - SELECT - id AS flow_id, - JSON_EXTRACT_SCALAR(attributes, '$.created') AS created_at, - JSON_EXTRACT_SCALAR(attributes, '$.name') AS flow_name, - JSON_EXTRACT_SCALAR(attributes, '$.status') AS status, - JSON_EXTRACT_SCALAR(attributes, '$.updated') AS updated_at, - JSON_EXTRACT_SCALAR(attributes, '$.archived') AS is_archived, - JSON_EXTRACT_SCALAR(attributes, '$.trigger_type') AS trigger_type - FROM - {{ source('airbyte_dbt_source_klaviyo', 'flows') }} - WHERE - flow_id IS NOT NULL; - -{% elif target.type == "postgres" %} - - SELECT - id AS flow_id, - attributes->>'created' AS created_at, - attributes->>'name' AS flow_name, - attributes->>'status' AS status, - attributes->>'updated' AS updated_at, - attributes->>'archived' AS is_archived, - attributes->>'trigger_type' AS trigger_type - FROM - {{ source('airbyte_dbt_source_klaviyo', 'flows') }} - WHERE - flow_id IS NOT NULL; - -{% endif %} diff --git a/connectors/source_klaviyo/models/fivetran_converter/events.sql b/connectors/source_klaviyo/models/fivetran_converter/events.sql deleted file mode 100644 index 6495176e..00000000 --- a/connectors/source_klaviyo/models/fivetran_converter/events.sql +++ /dev/null @@ -1,46 +0,0 @@ -{% if target.type == "snowflake" %} - - SELECT - id AS flow_id, - attributes:created::STRING AS created_at, - attributes:name::STRING AS flow_name, - attributes:status::STRING AS status, - attributes:updated::STRING AS updated_at, - attributes:archived::STRING AS is_archived, - attributes:trigger_type::STRING AS trigger_type - FROM - {{ source('airbyte_dbt_source_klaviyo', 'flows') }} - WHERE - flow_id IS NOT NULL; - -{% elif target.type == "bigquery" %} - - SELECT - id AS flow_id, - JSON_EXTRACT_SCALAR(attributes, '$.created') AS created_at, - JSON_EXTRACT_SCALAR(attributes, '$.name') AS flow_name, - JSON_EXTRACT_SCALAR(attributes, '$.status') AS status, - JSON_EXTRACT_SCALAR(attributes, '$.updated') AS updated_at, - JSON_EXTRACT_SCALAR(attributes, '$.archived') AS is_archived, - JSON_EXTRACT_SCALAR(attributes, '$.trigger_type') AS trigger_type - FROM - {{ source('airbyte_dbt_source_klaviyo', 'flows') }} - WHERE - flow_id IS NOT NULL; - -{% elif target.type == "postgres" %} - - SELECT - id AS flow_id, - attributes->>'created' AS created_at, - attributes->>'name' AS flow_name, - attributes->>'status' AS status, - attributes->>'updated' AS updated_at, - attributes->>'archived' AS is_archived, - attributes->>'trigger_type' AS trigger_type - FROM - {{ source('airbyte_dbt_source_klaviyo', 'flows') }} - WHERE - flow_id IS NOT NULL; - -{% endif %} diff --git a/connectors/source_klaviyo/models/fivetran_converter/events.yml b/connectors/source_klaviyo/models/fivetran_converter/events.yml deleted file mode 100644 index ff113752..00000000 --- a/connectors/source_klaviyo/models/fivetran_converter/events.yml +++ /dev/null @@ -1,43 +0,0 @@ -version: 2 - -models: - - name: events - schema: "{{ var('airbyte_schema', target.schema) }}" - database: "{{ var('airbyte_database', target.database) }}" - identifier: "{{ var('klaviyo_event_identifier', 'event') }}" - description: Table of events (and metrics) triggered in Klaviyo or via its integrations. - config: - +enabled: "{{ var('using_fivetran_model', False) }}" - columns: - - name: variation_id - description: > - Unique ID of the attributed flow or campaign variation group. - This does not map onto another table. - - name: campaign_id - description: Foreign key referencing the CAMPAIGN that the event is attributed to. - - name: occurred_at - description: Timestamp of when the event was triggered. - - name: flow_id - description: Foreign key referencing the FLOW that the event is attributed to. - - name: flow_message_id - description: > - Unique ID of the FLOW_MESSAGE that the event is attributed to. - This does not map onto another table. - - name: event_id - description: Unique ID of the event. - tests: - - not_null - - name: metric_id - description: Foreign key referencing the metric being captured. - - name: person_id - description: Foreign key referencing the PERSON who triggered the event. - - name: type - description: Type of event that was triggered. This is the same as the METRIC name. - - name: uuid - description: Universally Unique Identifier of the event. - - name: numeric_value - description: Numeric value associated with the event (ie the dollars associated with a purchase). - - name: occurred_on - description: Calendar date (UTC) on which the event occurred. - - name: unique_event_id - description: The unique identifier for the combination of event_id and source_relation columns.