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

deal stage and postgres updates #36

Merged
merged 7 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ jobs:
dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target redshift
dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target redshift
dbt test --target redshift
- run:
name: "Run Tests - Postgres"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps
dbt seed --target postgres --full-refresh
dbt run --target postgres --full-refresh
dbt run --vars '{hubspot_marketing_enabled: true, hubspot_sales_enabled: false}' --target postgres
dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: true}' --target postgres
dbt run --vars '{hubspot_marketing_enabled: false, hubspot_sales_enabled: false}' --target postgres
dbt test --target postgres
- run:
name: "Run Tests - Snowflake"
command: |
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,19 @@ vars:

# Sales

hubspot_sales_enabled: false # Disables all sales models
hubspot_company_enabled: false
hubspot_deal_enabled: false
hubspot_engagement_enabled: false # Disables all engagement models and functionality
hubspot_engagement_contact_enabled: false
hubspot_engagement_company_enabled: false
hubspot_engagement_deal_enabled: false
hubspot_engagement_calls_enabled: false
hubspot_engagement_emails_enabled: false
hubspot_engagement_meetings_enabled: false
hubspot_engagement_notes_enabled: false
hubspot_engagement_tasks_enabled: false
hubspot_sales_enabled: false # Disables all sales models
hubspot_company_enabled: false
hubspot_deal_enabled: false
hubspot_deal_company_enabled: false
hubspot_engagement_enabled: false # Disables all engagement models and functionality
hubspot_engagement_contact_enabled: false
hubspot_engagement_company_enabled: false
hubspot_engagement_deal_enabled: false
hubspot_engagement_calls_enabled: false
hubspot_engagement_emails_enabled: false
hubspot_engagement_meetings_enabled: false
hubspot_engagement_notes_enabled: false
hubspot_engagement_tasks_enabled: false

# Service
hubspot_service_enabled: true # Enables all service models
Expand All @@ -103,7 +104,7 @@ vars:
alias: "new_name_for_this_field_id"
transform_sql: "cast(new_name_for_this_field as int64)"
- name: "this_other_field"
alias: "new_field_name"
transform_sql: "cast(this_other_field as string)"
hubspot__contact_pass_through_columns:
- name: "wow_i_can_add_all_my_custom_fields"
alias: "best_field"
Expand Down Expand Up @@ -140,10 +141,10 @@ or open PRs against `master`. Check out
[this post](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657)
on the best workflow for contributing to a package.

## Database support
This package has been tested on BigQuery, Snowflake, and Redshift.
## Database Support
This package has been tested on BigQuery, Snowflake, Redshift, and Postgres.

### Resources:
## Resources:
- Provide [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next
- Have questions, feedback, or need help? Book a time during our office hours [using Calendly](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) or email us at solutions@fivetran.com
- Find all of Fivetran's pre-built dbt packages in our [dbt hub](https://hub.getdbt.com/fivetran/)
Expand Down
70 changes: 36 additions & 34 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'hubspot_source'
version: '0.3.0'
version: '0.3.1'
config-version: 2
require-dbt-version: [">=0.18.0", "<0.20.0"]

Expand All @@ -12,39 +12,41 @@ models:

vars:
hubspot_source:
company: "{{ source('hubspot','company') }}"
company_property_history: "{{ source('hubspot','company_property_history') }}"
contact: "{{ source('hubspot','contact') }}"
contact_list: "{{ source('hubspot','contact_list') }}"
contact_list_member: "{{ source('hubspot','contact_list_member') }}"
contact_property_history: "{{ source('hubspot','contact_property_history') }}"
deal: "{{ source('hubspot','deal') }}"
deal_pipeline: "{{ source('hubspot','deal_pipeline') }}"
deal_pipeline_stage: "{{ source('hubspot','deal_pipeline_stage') }}"
deal_property_history: "{{ source('hubspot','deal_property_history') }}"
email_campaign: "{{ source('hubspot','email_campaign') }}"
email_event: "{{ source('hubspot','email_event') }}"
email_event_bounce: "{{ source('hubspot','email_event_bounce') }}"
email_event_click: "{{ source('hubspot','email_event_click') }}"
email_event_deferred: "{{ source('hubspot','email_event_deferred') }}"
email_event_delivered: "{{ source('hubspot','email_event_delivered') }}"
email_event_dropped: "{{ source('hubspot','email_event_dropped') }}"
email_event_forward: "{{ source('hubspot','email_event_forward') }}"
email_event_open: "{{ source('hubspot','email_event_open') }}"
email_event_print: "{{ source('hubspot','email_event_print') }}"
email_event_sent: "{{ source('hubspot','email_event_sent') }}"
email_event_spam_report: "{{ source('hubspot','email_event_spam_report') }}"
email_event_status_change: "{{ source('hubspot','email_event_status_change') }}"
engagement: "{{ source('hubspot','engagement') }}"
engagement_call: "{{ source('hubspot','engagement_call') }}"
engagement_company: "{{ source('hubspot','engagement_company') }}"
engagement_contact: "{{ source('hubspot','engagement_contact') }}"
engagement_deal: "{{ source('hubspot','engagement_deal') }}"
engagement_email: "{{ source('hubspot','engagement_email') }}"
engagement_meeting: "{{ source('hubspot','engagement_meeting') }}"
engagement_note: "{{ source('hubspot','engagement_note') }}"
engagement_task: "{{ source('hubspot','engagement_task') }}"
owner: "{{ source('hubspot','owner') }}"
company: "{{ source('hubspot','company') }}"
company_property_history: "{{ source('hubspot','company_property_history') }}"
contact: "{{ source('hubspot','contact') }}"
contact_list: "{{ source('hubspot','contact_list') }}"
contact_list_member: "{{ source('hubspot','contact_list_member') }}"
contact_property_history: "{{ source('hubspot','contact_property_history') }}"
deal: "{{ source('hubspot','deal') }}"
deal_stage: "{{ source('hubspot','deal_stage') }}"
deal_company: "{{ source('hubspot','deal_company') }}"
deal_pipeline: "{{ source('hubspot','deal_pipeline') }}"
deal_pipeline_stage: "{{ source('hubspot','deal_pipeline_stage') }}"
deal_property_history: "{{ source('hubspot','deal_property_history') }}"
email_campaign: "{{ source('hubspot','email_campaign') }}"
email_event: "{{ source('hubspot','email_event') }}"
email_event_bounce: "{{ source('hubspot','email_event_bounce') }}"
email_event_click: "{{ source('hubspot','email_event_click') }}"
email_event_deferred: "{{ source('hubspot','email_event_deferred') }}"
email_event_delivered: "{{ source('hubspot','email_event_delivered') }}"
email_event_dropped: "{{ source('hubspot','email_event_dropped') }}"
email_event_forward: "{{ source('hubspot','email_event_forward') }}"
email_event_open: "{{ source('hubspot','email_event_open') }}"
email_event_print: "{{ source('hubspot','email_event_print') }}"
email_event_sent: "{{ source('hubspot','email_event_sent') }}"
email_event_spam_report: "{{ source('hubspot','email_event_spam_report') }}"
email_event_status_change: "{{ source('hubspot','email_event_status_change') }}"
engagement: "{{ source('hubspot','engagement') }}"
engagement_call: "{{ source('hubspot','engagement_call') }}"
engagement_company: "{{ source('hubspot','engagement_company') }}"
engagement_contact: "{{ source('hubspot','engagement_contact') }}"
engagement_deal: "{{ source('hubspot','engagement_deal') }}"
engagement_email: "{{ source('hubspot','engagement_email') }}"
engagement_meeting: "{{ source('hubspot','engagement_meeting') }}"
engagement_note: "{{ source('hubspot','engagement_note') }}"
engagement_task: "{{ source('hubspot','engagement_task') }}"
owner: "{{ source('hubspot','owner') }}"

#Service Hub Models
ticket_company: "{{ source('hubspot','ticket_company') }}"
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.

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

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ integration_tests:
port: 5439
schema: hubspot_source_integration_tests
threads: 8
postgres:
type: postgres
host: "{{ env_var('CI_POSTGRES_DBT_HOST') }}"
user: "{{ env_var('CI_POSTGRES_DBT_USER') }}"
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: hubspot_source_integration_tests
threads: 8
bigquery:
type: bigquery
method: service-account
Expand Down
Loading