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

Add new category field #132

Merged
merged 23 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# dbt_hubspot_source v0.17.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you bump the README version up to [">=0.17.0", "<0.18.0"]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you!


## Breaking Change (`--full-refresh` required after upgrading)
- Introduced a new `category` column to the below models. This association field differentiates records by either HUBSPOT_DEFINED (default label) or USER_DEFINED (custom label) and was introduced to the connector in October 2024.
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
- `stg_hubspot__deal_company`
- `stg_hubspot__deal_contact`
- `stg_hubspot__merged_deal`
- `stg_hubspot__engagement_company`
Copy link
Contributor

Choose a reason for hiding this comment

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

@fivetran-reneeli I do not see the category column added to any of the models from lines 7-13. Was the intention to add category to these models, or should these lines be removed?

Copy link
Contributor Author

@fivetran-reneeli fivetran-reneeli Nov 11, 2024

Choose a reason for hiding this comment

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

Great question! So these models leverage a macro to bring through all the columns and therefore the category field was not explicitly called out in them, thus the models themselves didn't require any changes. But you can see that the new field gets brought through after running the package.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah makes sense! Thanks for that.

- `stg_hubspot__engagement_contact`
- `stg_hubspot__engagement_deal`
- `stg_hubspot__ticket_company`
- `stg_hubspot__ticket_contact`
- `stg_hubspot__ticket_deal`
- `stg_hubspot__ticket_engagement`

- This will be a breaking change and will require a `--full-refresh`.
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

## Bug Fixes
- Updated the unique key to include the new `category` field for the following models in order for the uniqueness tests to pass:
- `stg_hubspot__deal_contact`
- `stg_hubspot__deal_company`

## Under the Hood
- Updated the seed files, `get_column` macros, and documentation of the mentioned models to include the `category` field.
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

# dbt_hubspot_source v0.16.0
[PR #129](https://github.com/fivetran/dbt_hubspot_source/pull/129) includes the following updates:

Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'hubspot_source'
version: '0.16.0'
version: '0.17.0'
config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: hubspot_source_integration_tests_28
schema: hubspot_source_integration_tests_29
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: hubspot_source_integration_tests_28
schema: hubspot_source_integration_tests_29
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -33,7 +33,7 @@ integration_tests:
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: hubspot_source_integration_tests_28
schema: hubspot_source_integration_tests_29
threads: 8
postgres:
type: postgres
Expand All @@ -42,21 +42,21 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: hubspot_source_integration_tests_28
schema: hubspot_source_integration_tests_29
threads: 8
databricks:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: hubspot_source_integration_tests_28
schema: hubspot_source_integration_tests_29
threads: 8
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
databricks-sql:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_SQL_DBT_HTTP_PATH') }}"
schema: hubspot_sqlw_tests_1
schema: hubspot_sqlw_tests_2
threads: 8
token: "{{ env_var('CI_DATABRICKS_SQL_DBT_TOKEN') }}"
type: databricks
25 changes: 13 additions & 12 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: 'hubspot_source_integration_tests'
version: '0.16.0'
version: '0.17.0'
profile: 'integration_tests'
config-version: 2

models:
+schema: "{{ 'hubspot_sqlw_tests_1' if target.name == 'databricks-sql' else 'hubspot' }}"
+schema: "{{ 'hubspot_sqlw_tests_2' if target.name == 'databricks-sql' else 'hubspot' }}"

vars:
hubspot_schema: hubspot_source_integration_tests_28
hubspot_schema: hubspot_source_integration_tests_29
hubspot_source:
# hubspot_service_enabled: true # enable when generating docs
# hubspot_deal_enabled: true # enable when generating docs
# hubspot_contact_enabled: true # enable when generating docs
# hubspot_sales_enabled: true # enable when generating docs
# hubspot_company_enabled: true # enable when generating docs
# hubspot_marketing_enabled: true # enable when generating docs
# hubspot_contact_merge_audit_enabled: true # enable when generating docs
# hubspot_using_all_email_events: true # enable when generating docs
# hubspot_merged_deal_enabled: true # enable when generating docs
hubspot_service_enabled: true # enable when generating docs
hubspot_deal_enabled: true # enable when generating docs
hubspot_contact_enabled: true # enable when generating docs
hubspot_sales_enabled: true # enable when generating docs
hubspot_company_enabled: true # enable when generating docs
hubspot_marketing_enabled: true # enable when generating docs
hubspot_contact_merge_audit_enabled: true # enable when generating docs
hubspot_using_all_email_events: true # enable when generating docs
hubspot_merged_deal_enabled: true # enable when generating docs
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
hubspot_ticket_deal_enabled: true
hubspot_company_property_history_identifier: "company_property_history_data"
hubspot_company_identifier: "company_data"
hubspot_contact_identifier: "contact_data"
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/seeds/deal_company_data.csv
Copy link
Contributor

Choose a reason for hiding this comment

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

I realize these probably aren't a result of the changes from this PR, but I noticed there are some dbt seed warnings in the BK runs produced from these seed files.
image

Would you be able to inspect these and make sure the warnings/errors are resolved in this release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looked into this. property_hs_createdate doesn't exist in our engagement_meeting seed data so I removed it from the config.

But I saw some like the below:
image

And I couldn't figure out where the error was coming from because I don't see property_hs_createdate being referenced for email_event_spam_report_data anywhere...

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
company_id,deal_id,type_id
12345,6789,101112
56789,1234,101112
company_id,deal_id,type_id,category
12345,6789,101112,HUBSPOT_DEFINED
56789,1234,101112,HUBSPOT_DEFINED
24 changes: 12 additions & 12 deletions integration_tests/seeds/deal_contact_data.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
contact_id,deal_id,_fivetran_synced,type_id
1499466,86133127,2022-04-14 4:30:42,101112
1499466,86134193,2022-04-14 4:45:43,123456
1499368,86014324,2022-04-14 5:30:45,567891
1499468,86136486,2022-04-14 6:30:45,101112
1499469,86139887,2022-04-14 7:45:44,123456
1499469,86142279,2022-04-14 8:30:44,101112
1499596,86324169,2022-04-16 5:00:42,123456
1499595,86318106,2022-04-16 4:45:44,567891
1499597,86328114,2022-04-16 6:45:43,101112
1499597,86325643,2022-04-16 6:45:43,567891
1499598,86326974,2022-04-16 8:00:44,123456
contact_id,deal_id,_fivetran_synced,type_id,category
1499466,86133127,2022-04-14 4:30:42,101112,HUBSPOT_DEFINED
1499466,86134193,2022-04-14 4:45:43,123456,HUBSPOT_DEFINED
1499368,86014324,2022-04-14 5:30:45,567891,HUBSPOT_DEFINED
1499468,86136486,2022-04-14 6:30:45,101112,HUBSPOT_DEFINED
1499469,86139887,2022-04-14 7:45:44,123456,HUBSPOT_DEFINED
1499469,86142279,2022-04-14 8:30:44,101112,HUBSPOT_DEFINED
1499596,86324169,2022-04-16 5:00:42,123456,HUBSPOT_DEFINED
1499595,86318106,2022-04-16 4:45:44,567891,HUBSPOT_DEFINED
1499597,86328114,2022-04-16 6:45:43,101112,HUBSPOT_DEFINED
1499597,86325643,2022-04-16 6:45:43,567891,HUBSPOT_DEFINED
1499598,86326974,2022-04-16 8:00:44,123456,HUBSPOT_DEFINED
4 changes: 2 additions & 2 deletions integration_tests/seeds/engagement_company_data.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
company_id,engagement_id,engagement_type,type_id,_fivetran_synced
9991774791,31479928586,TASK,192,2023-06-08 23:22:50.829000
company_id,engagement_id,engagement_type,type_id,_fivetran_synced,category
9991774791,31479928586,TASK,192,2023-06-08 23:22:50.829000,HUBSPOT_DEFINED
4 changes: 2 additions & 2 deletions integration_tests/seeds/engagement_contact_data.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
contact_id,engagement_id,engagement_type,type_id,_fivetran_synced
501,19732910159,CALL,194,2023-06-08 23:22:49.869000
contact_id,engagement_id,engagement_type,type_id,_fivetran_synced,category
501,19732910159,CALL,194,2023-06-08 23:22:49.869000,HUBSPOT_DEFINED
4 changes: 2 additions & 2 deletions integration_tests/seeds/engagement_deal_data.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
deal_id,engagement_id,engagement_type,type_id,_fivetran_synced
10828857779,31479928586,TASK,216,2023-06-08 23:22:50.768000
deal_id,engagement_id,engagement_type,type_id,_fivetran_synced,category
10828857779,31479928586,TASK,216,2023-06-08 23:22:50.768000,HUBSPOT_DEFINED
30 changes: 15 additions & 15 deletions integration_tests/seeds/merged_deal_data.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
deal_id,merged_deal_id,_fivetran_synced
9089908390,9014070905,2023-06-22 11:37:07.210000
9089908390,9077310858,2023-06-22 11:37:07.210000
9089908390,9077311778,2023-06-22 11:37:07.210000
9089908390,9014071335,2023-06-22 11:37:07.210000
1364146343,10829010820,2023-06-22 11:37:07.220000
1364146343,10828874842,2023-06-22 11:37:07.220000
1368273549,10829051678,2023-06-22 11:37:07.227000
1368273549,10829028256,2023-06-22 11:37:07.227000
1373595330,10879517198,2023-06-22 11:37:07.227000
1373595330,10828874855,2023-06-22 11:37:07.227000
1006463008,10064581040,2023-06-22 11:37:07.213000
1006463008,9351825260,2023-06-22 11:37:07.213000
1389291069,12351788138,2023-06-28 11:18:32.940000
1389291069,13817889862,2023-06-28 11:18:32.939000
deal_id,merged_deal_id,_fivetran_synced,category
9089908390,9014070905,2023-06-22 11:37:07.210000,HUBSPOT_DEFINED
9089908390,9077310858,2023-06-22 11:37:07.210000,HUBSPOT_DEFINED
9089908390,9077311778,2023-06-22 11:37:07.210000,HUBSPOT_DEFINED
9089908390,9014071335,2023-06-22 11:37:07.210000,HUBSPOT_DEFINED
1364146343,10829010820,2023-06-22 11:37:07.220000,HUBSPOT_DEFINED
1364146343,10828874842,2023-06-22 11:37:07.220000,HUBSPOT_DEFINED
1368273549,10829051678,2023-06-22 11:37:07.227000,HUBSPOT_DEFINED
1368273549,10829028256,2023-06-22 11:37:07.227000,HUBSPOT_DEFINED
1373595330,10879517198,2023-06-22 11:37:07.227000,HUBSPOT_DEFINED
1373595330,10828874855,2023-06-22 11:37:07.227000,HUBSPOT_DEFINED
1006463008,10064581040,2023-06-22 11:37:07.213000,HUBSPOT_DEFINED
1006463008,9351825260,2023-06-22 11:37:07.213000,HUBSPOT_DEFINED
1389291069,12351788138,2023-06-28 11:18:32.940000,HUBSPOT_DEFINED
1389291069,13817889862,2023-06-28 11:18:32.939000,HUBSPOT_DEFINED
20 changes: 10 additions & 10 deletions integration_tests/seeds/ticket_company_data.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_fivetran_synced,ticket_id,company_id
2020-07-09 11:06:21.056,1,1
2020-07-09 11:06:21.056,2,1
2020-07-09 11:06:21.056,3,1
2020-07-09 11:06:21.056,4,1
2020-07-09 11:06:21.056,5,1
2020-07-09 11:06:21.056,6,1
2020-07-09 11:06:21.056,7,2
2020-07-09 11:06:21.056,8,2
2020-07-09 11:06:21.056,9,2
_fivetran_synced,ticket_id,company_id,category
2020-07-09 11:06:21.056,1,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,2,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,3,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,4,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,5,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,6,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,7,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,8,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,9,2,HUBSPOT_DEFINED
20 changes: 10 additions & 10 deletions integration_tests/seeds/ticket_contact_data.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_fivetran_synced,ticket_id,contact_id
2020-07-09 11:06:21.056,1,1
2020-07-09 11:06:21.056,2,2
2020-07-09 11:06:21.056,3,3
2020-07-09 11:06:21.056,4,1
2020-07-09 11:06:21.056,5,2
2020-07-09 11:06:21.056,6,3
2020-07-09 11:06:21.056,7,1
2020-07-09 11:06:21.056,8,2
2020-07-09 11:06:21.056,9,3
_fivetran_synced,ticket_id,contact_id,category
2020-07-09 11:06:21.056,1,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,2,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,3,3,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,4,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,5,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,6,3,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,7,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,8,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,9,3,HUBSPOT_DEFINED
20 changes: 10 additions & 10 deletions integration_tests/seeds/ticket_deal_data.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_fivetran_synced,ticket_id,deal_id
2020-07-09 11:06:21.056,1,1
2020-07-09 11:06:21.056,2,2
2020-07-09 11:06:21.056,3,3
2020-07-09 11:06:21.056,4,1
2020-07-09 11:06:21.056,5,2
2020-07-09 11:06:21.056,6,3
2020-07-09 11:06:21.056,7,1
2020-07-09 11:06:21.056,8,2
2020-07-09 11:06:21.056,9,3
_fivetran_synced,ticket_id,deal_id,category
2020-07-09 11:06:21.056,1,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,2,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,3,3,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,4,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,5,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,6,3,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,7,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,8,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,9,3,HUBSPOT_DEFINED
20 changes: 10 additions & 10 deletions integration_tests/seeds/ticket_engagement_data.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_fivetran_synced,ticket_id,engagement_id
2020-07-09 11:06:21.056,1,1
2020-07-09 11:06:21.056,2,2
2020-07-09 11:06:21.056,3,3
2020-07-09 11:06:21.056,4,14
2020-07-09 11:06:21.056,5,5
2020-07-09 11:06:21.056,6,12
2020-07-09 11:06:21.056,7,1
2020-07-09 11:06:21.056,8,2
2020-07-09 11:06:21.056,9,3
_fivetran_synced,ticket_id,engagement_id,category
2020-07-09 11:06:21.056,1,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,2,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,3,3,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,4,14,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,5,5,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,6,12,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,7,1,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,8,2,HUBSPOT_DEFINED
2020-07-09 11:06:21.056,9,3,HUBSPOT_DEFINED
3 changes: 2 additions & 1 deletion macros/get_deal_company_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "deal_id", "datatype": dbt.type_int()},
{"name": "company_id", "datatype": dbt.type_int()},
{"name": "type_id", "datatype": dbt.type_int()}
{"name": "type_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_deal_contact_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "deal_id", "datatype": dbt.type_int()},
{"name": "contact_id", "datatype": dbt.type_int()},
{"name": "type_id", "datatype": dbt.type_int()}
{"name": "type_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_engagement_company_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "company_id", "datatype": dbt.type_int()},
{"name": "engagement_id", "datatype": dbt.type_int()}
{"name": "engagement_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_engagement_contact_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "contact_id", "datatype": dbt.type_int()},
{"name": "engagement_id", "datatype": dbt.type_int()}
{"name": "engagement_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_engagement_deal_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "deal_id", "datatype": dbt.type_int()},
{"name": "engagement_id", "datatype": dbt.type_int()}
{"name": "engagement_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_merged_deal_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "deal_id", "datatype": dbt.type_int()},
{"name": "merged_deal_id", "datatype": dbt.type_int()}
{"name": "merged_deal_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
Copy link
Contributor

Choose a reason for hiding this comment

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

Category is not included in merged_deal so we should remove here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for catching!

] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_ticket_company_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "ticket_id", "datatype": dbt.type_int()},
{"name": "company_id", "datatype": dbt.type_int()}
{"name": "company_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_ticket_contact_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "ticket_id", "datatype": dbt.type_int()},
{"name": "contact_id", "datatype": dbt.type_int()}
{"name": "contact_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
3 changes: 2 additions & 1 deletion macros/get_ticket_deal_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "ticket_id", "datatype": dbt.type_int()},
{"name": "deal_id", "datatype": dbt.type_int()}
{"name": "deal_id", "datatype": dbt.type_int()},
{"name": "category", "datatype": dbt.type_string()}
] %}

{{ return(columns) }}
Expand Down
Loading