Skip to content

Commit

Permalink
fix models
Browse files Browse the repository at this point in the history
  • Loading branch information
btkcodedev committed Sep 8, 2024
1 parent 13dfcd6 commit 7030398
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SELECT
{% if target.type == "postgres" %}
"user-id" AS id,
{% elif target.type == "snowflake" %}
"user-id" AS id,
"user_id" AS id,
{% elif target.type == "bigquery" %}
`user_id` AS id,
{% endif %}
Expand All @@ -13,7 +13,7 @@ SELECT
{% if target.type == "postgres" %}
"user-id" AS user_id,
{% elif target.type == "snowflake" %}
"user-id" AS user_id,
"user_id" AS user_id,
{% elif target.type == "bigquery" %}
`user_id` AS user_id,
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SELECT
first_name,
last_name,
num_properties_moved,
timestamp_at,
timestamp,
"user-id" AS original_user_id,
vid_to_merge
FROM
Expand All @@ -18,14 +18,14 @@ FROM

SELECT
{{ dbt.current_timestamp() }} AS fivetran_synced,
"user-id" AS user_id,
"user_id" AS user_id,
vid_to_merge AS contact_id,
entity_id,
first_name,
last_name,
num_properties_moved,
timestamp_at,
`"user-id"`::STRING AS original_user_id,
timestamp,
"user_id" AS original_user_id,
vid_to_merge
FROM
{{ source('source_hubspot', 'contacts_merged_audit') }}
Expand All @@ -40,7 +40,7 @@ SELECT
first_name,
last_name,
num_properties_moved,
timestamp_at,
timestamp,
`user_id` AS original_user_id,
vid_to_merge
FROM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SELECT
`source_id` AS change_source,
{% endif %}
properties_hs_created_by_user_id AS change_source_id,
CAST(timestamp AS {{ dbt.type_timestamp() }}) AS change_timestamp,
timestamp AS change_timestamp,
value AS new_value
FROM
{{ source('source_hubspot', 'contacts_property_history') }}

0 comments on commit 7030398

Please sign in to comment.