fivetran / dbt_hubspot

Data models for Hubspot built using dbt.
https://fivetran.github.io/dbt_hubspot/
Apache License 2.0
33 stars 38 forks source link

Understanding pass through columns #108

Closed moseleyi closed 1 year ago

moseleyi commented 1 year ago

Is there an existing issue for this?

Describe the issue

In staging model for Companies, we have a field property_annualrevenue.

Today I used hubspot__company_pass_through_columns to only bring columns I need to the intermediate models. I added the following:

hubspot__company_pass_through_columns:
  - name: "property_annualrevenue"
    alias: "annualrevenue"

But even with the above code, the resulting column in hubspot__companies is company_annual_revenue. I don't understand few things:

  1. Is the word "property" automatically stripped out?
  2. Why isn't alias I chose used?
  3. Why is the word "company" added to that field?

Relevant error log or model output

No response

Expected behavior

The column name is exactly as in alias

dbt Project configurations

  hubspot__company_pass_through_columns:
    - name: "property_annual_revenue"
      alias: "annual_revenue"

Package versions

packages:
  - package: dbt-labs/audit_helper
    version: 0.9.0
  - package: fivetran/hubspot
    version: [">=0.9.0", "<0.10.0"]

What database are you using dbt with?

snowflake

dbt Version

$ dbt --version
Core:
  - installed: 1.5.0
  - latest:    1.5.0 - Up to date!

Plugins:
  - bigquery:  1.5.1 - Up to date!
  - postgres:  1.5.0 - Up to date!
  - redshift:  1.5.1 - Up to date!
  - snowflake: 1.5.0 - Up to date!

Additional Context

No response

Are you willing to open a PR to help address this issue?

fivetran-joemarkiewicz commented 1 year ago

Hi @moseleyi thanks for opening this issue, I just wanted to confirm that you intended to close the issue. Were you able to get your passthrough columns to succeed within the package?

moseleyi commented 1 year ago

@fivetran-joemarkiewicz yes I managed to get it working, can't remember what it was but I think it was my yaml indentation that was at fault