-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from fivetran/release/v0.14.0
Release/v0.14.0
- Loading branch information
Showing
25 changed files
with
395 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
_fivetran_id,_fivetran_synced,calculated,created_at,description,field_type,group_name,hubspot_defined,hubspot_object,label,name,show_currency_symbol,type,updated_at | ||
+mlGrLvmij8zluyeRByh7DPbXpM=,2023-11-11 08:18:16.519000 UTC,false,2023-05-03 08:51:08.199000 UTC,M0xKTEL9t51+vD5ztRfm+A==,date,fVQYOcf70/KsHU/KFoXQfQ==,,contact,test_pro,test_pro,false,date,2023-05-03 08:51:08.199000 UTC | ||
6fnvV+pkZR3di3USRclW2NZMNTA=,2023-11-11 08:18:15.151000 UTC,false,2019-08-06 02:41:52.364000 UTC,k+VMRhjE/W4QB470Jor1yA==,date,j8mgV9/MYzXvxQKD3c0AHw==,true,deal,Close Date,closedate,,datetime,2023-06-20 22:32:28.368000 UTC | ||
5yTEFwFlLPTKlzXc3PviX5DMdJ4=,2023-11-11 08:18:16.569000 UTC,false,2019-08-06 02:41:09.071000 UTC,nRGOJjIZrs4d0WJLkC15fg==,date,fVQYOcf70/KsHU/KFoXQfQ==,true,contact,Close Date,closedate,,datetime,2022-05-27 20:35:26.640000 UTC | ||
u0bk1tHdJJir2SmRkwo1r22t2PM=,2023-11-11 08:18:15.837000 UTC,false,2019-08-06 02:41:44.665000 UTC,HRIf2XFKVmDQxMzI2w3mcA==,date,XArNQdwSO+DY7119vj+JEw==,true,company,Close Date,closedate,,datetime,2022-05-27 22:49:16.893000 UTC | ||
RTJ5KTwQe/zMYl8uKwNFlOeNWUY=,2023-11-11 08:18:15.792000 UTC,false,2022-11-30 10:52:48.277000 UTC,1B2M2Y8AsgTpgAmY7PhCfg==,date,XArNQdwSO+DY7119vj+JEw==,,company,test_date,test_date,false,date,2022-11-30 10:52:48.277000 UTC | ||
sv5Aa2A1+wJwoKRX4Zfe3CTEHEE=,2023-11-11 08:18:16.575000 UTC,false,2019-08-06 02:41:09.148000 UTC,jjSyQlM9DMhpVol12tp4fg==,date,fVQYOcf70/KsHU/KFoXQfQ==,true,contact,Create Date,createdate,,datetime,2023-05-01 20:02:33.973000 UTC | ||
GjTSotYsbt+HoRY5e6bHRgNJYFI=,2023-11-11 08:18:36.368000 UTC,false,2019-08-06 02:42:48.261000 UTC,nBljQWslMNrEDwXeYmRYyg==,date,0NoL94xOqMRlkFF+GAX6QQ==,true,product,Create Date,createdate,,datetime,2022-05-28 01:26:21.260000 UTC | ||
6iFNLSeY0Fz5DgwskGjrMoW3JIg=,2023-11-11 08:18:13.861000 UTC,false,2019-08-06 02:42:38.781000 UTC,lMRanmvFHjNC0pQdw79H5Q==,date,kdJdJeqzIqBPlKTSRZoyGQ==,true,line_item,Create Date,createdate,,datetime,2022-05-28 01:31:47.067000 UTC | ||
onbRYvHwxXS3NwSP2zaoD+Mv/us=,2023-11-11 08:18:36.567000 UTC,false,2019-08-06 02:43:00.503000 UTC,MD3INB3ab4k2LqaTom0eEA==,date,CfZkcOOMcc/dg5a9ofwkUg==,true,ticket,Create date,createdate,,datetime,2022-08-18 12:55:35.731000 UTC | ||
XhKQ/eq5pqJEB6smEKCPSSyfUH4=,2023-11-11 08:18:15.836000 UTC,false,2019-08-06 02:41:44.631000 UTC,wyvwVnWdqsdNRapzG8Y/RA==,date,XArNQdwSO+DY7119vj+JEw==,true,company,Create Date,createdate,,datetime,2023-05-01 19:33:57.873000 UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
label,property_id,_fivetran_synced,display_order,hidden,value | ||
psScnliy99RZj01H2CO0Bg==,QbL3/uGeJqHy1PwdKiAryA==,2023-07-06 05:18:21.205000 UTC,0,false,Rk7Ftpi8GPQtaS7MlroMGQ== | ||
pSz+WBU1TmUa4LuUa1rgkQ==,QbL3/uGeJqHy1PwdKiAryA==,2023-07-06 05:18:21.205000 UTC,1,false,LA3JfM9iZ4SdcrsahteEeA== | ||
AvzvMEDzIxXmOQHpmJkR2Q==,QbL3/uGeJqHy1PwdKiAryA==,2023-07-06 05:18:21.205000 UTC,2,false,T9S3rtCg0J+FcavCHGDYtw== | ||
82p3OmCpiuf6fXiV9CNUGg==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,54,false,MpeVBohL7jkWOlWD1n2MEQ== | ||
iXyRZw2q18uicoYZGNbgag==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,69,false,ag2ORssJEO3Ix9VleEtdQg== | ||
kNCldBZipThyNGTWrrfg2A==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,61,false,DCbZyLGAXmlPv5n4SfYx9Q== | ||
nXBeZz/aTEAYfzniBd/75g==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,53,false,isnpiTWMqdJGp0MdQexQlA== | ||
Y6UJ4WGHacm+BqSY+9LIWw==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,68,false,NxElfDRGA3UVvLxOm2zBuA== | ||
9/yByDltisVJ/ItQKfpDug==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,58,false,vIGBU9BcEMJOtKde0VQiqw== | ||
olS9+/n99uTy3AIPobhBFQ==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,73,false,0TcZBF4uKrmsLk3qXWb/Hg== | ||
B1Y77Uvfwx7eFghmY0fMnA==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,64,false,/cjAina18SVT3IObiSTw3w== | ||
K9C6Ej/GCH0SeJeYNHAilQ==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,55,false,1m8HK+BNhT7R+gsuVesdxw== | ||
pywmmY+CL/LxU1GOsa6inw==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,63,false,kqfrguMbRr20bZ8iN/xUww== | ||
0ZCS71MB2VSJEfh6gX+MRA==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,59,false,/6WH59+ebbdk/66q3ur5Cw== | ||
o9hmABcYPHTCe5qrVu1lIQ==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,75,false,JUbNYa3Fg/uz4J33ml2QoQ== | ||
du4+7EMJLifwRGQjGBJNbA==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,62,false,oGDrsJou/ln6KJivl+ruWQ== | ||
pTcKx6PCI9FNH+BrqtoqDg==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,60,false,+rN2xb29RGurpWYBfnHC5g== | ||
OHV/B1A6v1fd9MipdPIUKQ==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,70,false,jDwQNnk3/oWaB7pqsOXBLA== | ||
rrQoVUoKzGzFA6Lk2mrmGg==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,76,false,IrC/vHIdyaGW7KTyFPL+LA== | ||
6v8b3yT8/+DhTimhv/UaEg==,stMBaoy9Irlfo81ajZF/Ww==,2023-07-06 05:18:20.949000 UTC,65,false,Z/qUdomTCUc+d/5MgyA10g== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{% macro add_property_labels(passthrough_var_name, cte_name) %} | ||
|
||
select {{ cte_name }}.* | ||
|
||
{% if var(passthrough_var_name, []) != [] and var('hubspot_property_enabled', True) %} | ||
{% set source_name = passthrough_var_name.replace('hubspot__', '').replace('_pass_through_columns', '') %} | ||
{%- set col_list = var(passthrough_var_name) -%} | ||
|
||
{%- for col in col_list -%} -- Create label cols | ||
{%- if col.add_property_label or var('hubspot__enable_all_property_labels', false) -%} | ||
{%- set col_alias = (col.alias | default(col.name)) %} | ||
, {{ col.name }}_option.property_option_label as {{ col_alias }}_label | ||
{% endif -%} | ||
{%- endfor %} | ||
|
||
from {{ cte_name }} | ||
|
||
{% for col in col_list -%} -- Create joins | ||
{%- if col.add_property_label or var('hubspot__enable_all_property_labels', false) -%} | ||
{%- set col_alias = (col.alias | default(col.name)) %} | ||
|
||
left join -- create subset of property and property_options for property in question | ||
(select | ||
property_option.property_option_value, | ||
property_option.property_option_label | ||
from {{ ref('stg_hubspot__property_option') }} as property_option | ||
join {{ ref('stg_hubspot__property') }} as property | ||
on property_option.property_id = property._fivetran_id | ||
where property.property_name = '{{ col.name.replace('property_', '') }}' | ||
and property.hubspot_object = '{{ source_name }}' | ||
) as {{ col.name }}_option | ||
|
||
on cast({{ cte_name }}.{{ col_alias }} as {{ dbt.type_string() }}) | ||
= cast({{ col.name }}_option.property_option_value as {{ dbt.type_string() }}) | ||
|
||
{% endif -%} | ||
{%- endfor %} | ||
|
||
{%- else -%} | ||
from {{ cte_name }} | ||
|
||
{%- endif -%} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% macro get_property_columns() %} | ||
|
||
{% set columns = [ | ||
{"name": "_fivetran_id", "datatype": dbt.type_string()}, | ||
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, | ||
{"name": "calculated", "datatype": dbt.type_boolean()}, | ||
{"name": "created_at", "datatype": dbt.type_timestamp()}, | ||
{"name": "description", "datatype": dbt.type_string()}, | ||
{"name": "field_type", "datatype": dbt.type_string()}, | ||
{"name": "group_name", "datatype": dbt.type_string()}, | ||
{"name": "hubspot_defined", "datatype": dbt.type_boolean()}, | ||
{"name": "hubspot_object", "datatype": dbt.type_string()}, | ||
{"name": "label", "datatype": dbt.type_string()}, | ||
{"name": "name", "datatype": dbt.type_string()}, | ||
{"name": "show_currency_symbol", "datatype": dbt.type_boolean()}, | ||
{"name": "type", "datatype": dbt.type_string()}, | ||
{"name": "updated_at", "datatype": dbt.type_timestamp()} | ||
] %} | ||
|
||
{{ return(columns) }} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% macro get_property_option_columns() %} | ||
|
||
{% set columns = [ | ||
{"name": "label", "datatype": dbt.type_string()}, | ||
{"name": "property_id", "datatype": dbt.type_string()}, | ||
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, | ||
{"name": "display_order", "datatype": dbt.type_int()}, | ||
{"name": "hidden", "datatype": dbt.type_boolean()}, | ||
{"name": "value", "datatype": dbt.type_string()} | ||
] %} | ||
|
||
{{ return(columns) }} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.