Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Klaviyo: added dbt converter #52

Merged
merged 7 commits into from
Aug 28, 2024

Conversation

parthiv11
Copy link
Contributor

@parthiv11 parthiv11 commented Aug 13, 2024

closes #17

@parthiv11
Copy link
Contributor Author

@marcosmarxm just want to know, am I on right track?

@marcosmarxm
Copy link
Member

Looks promising, @parthiv11. I'll review your contribution tomorrow and get back to you.

@parthiv11
Copy link
Contributor Author

parthiv11 commented Aug 19, 2024

profiles' s -->person :- Transformation is performed with some nested JSON.
event ' s --> events' s :- Transformation is performed with some nested JSON.
metric' s --> metrics :- Transformation is performed with some nested JSON.

campaigns --> campaign with some unknow columns (probably joins with email template table)

Source Field Mapped Field
campaign_type type
created attributes.created_at
email_template_id
from_email included[0].attributes.content.reply_to_email
from_name included[0].attributes.label
id id
name attributes.name
send_time attributes.send_time
sent_at
status attributes.status
status_label attributes.status
status_id
subject included[0].attributes.content.subject
updated attributes.updated_at
archived attributes.archived
scheduled attributes.scheduled_at

event--> events with some unknow columns

Source Field Mapped Field
variation included[0].relationships.flow-message-variation.data.id
campaign_id included[0].relationships.flow.campaign.id
timestamp attr.timestamp
flow_id attributes.event_properties.$flow
flow_message_id attributes.event_properties.$message
id id
metric_id relationships.metric.data.id
person_id relationships.profile.data.id
type type
uuid attr.uuid
source_relation -
klaviyo_source.remove_string_from_numeric('property_value') ??
ERD diagram

Klaviyo ERD

@parthiv11
Copy link
Contributor Author

Looks promising, @parthiv11. I'll review your contribution tomorrow and get back to you.

@marcosmarxm

@marcosmarxm
Copy link
Member

@parthiv11 let's continue without the columns and see if the model behave as expected.

@marcosmarxm
Copy link
Member

@parthiv11 I pushed some changes. I was able to run using these models. For Klaviyo there is an small problem for staging which is different from other sources. It doesn't select a table but create an union. For that reason it won't be possible to run a simple dbt run... command to have all done, but it is possible to run:

dbt run --models +source_klaviyo --target postgres # build tables used by Fivetran this is the Airbyte models
dbt run --models +klaviyo_source --target postgres # run Fivetran models

Can you move from draft to ready to review? I think there only a couple of things to be done here.

@parthiv11 parthiv11 marked this pull request as ready for review August 21, 2024 08:06
@parthiv11
Copy link
Contributor Author

@marcosmarxm just pushed a commit , please check it out,
and let me know, what next

Copy link
Member

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @parthiv11

@marcosmarxm
Copy link
Member

I ran all tests manually for all 3 databases (postgres, snowflake and bigquery) It is working perfectly! Thanks @parthiv11

@marcosmarxm marcosmarxm merged commit 0a779da into airbytehq:main Aug 28, 2024
1 check failed
@parthiv11
Copy link
Contributor Author

parthiv11 commented Aug 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create dbt converter for Airbyte Klaviyo source connector
2 participants