fivetran / dbt_hubspot_source

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

[Bug] Aliasing column names in source macros instead of models #69

Closed fivetran-sheringuyen closed 2 years ago

fivetran-sheringuyen commented 2 years ago

Is there an existing issue for this?

Describe the issue

It looks like there are a couple of models in the dbt_hubspot_source package that currently performs aliasing in macros as opposed to directly in the staging model. Example. This issue is to migrate the aliasing into the model itself.

List of models: -get_company_property_history_columns (will be fixed in as a result of another PR) -get_contact_property_history_columns (will be fixed in as a result of another PR) -get_deal_property_history_columns (will be fixed in as a result of another PR) -get_email_event_dropped_columns -get_email_event_sent_columns -get_engagement_columns

Relevant error log or model output

No response

Expected behavior

N/A

dbt Project configurations

N/A

Package versions

package: fivetran/hubspot_source version: [">=0.5.0", "<0.6.0"]

What database are you using dbt with?

postgres, redshift, snowflake, bigquery

dbt Version

dbt 1.0.0

Additional Context

No response

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

fivetran-sheringuyen commented 2 years ago

Closing issue. The reason that the aliasing lives in the macro is because the source column names are reserved words. Will be documenting via comments within models themselves.