dbt-labs / dbt-utils

Utility functions for dbt projects.
https://hub.getdbt.com/dbt-labs/dbt_utils/latest/
Apache License 2.0
1.34k stars 491 forks source link

dbt_utils.star ignores column names starting with '#' in dbt-databricks #825

Closed derik-roby closed 7 months ago

derik-roby commented 1 year ago

Describe the bug

The dbt_utils.star() SQL generator function ignores the column names starting with '#' in dbt-databricks. In the generated comma-separated list of all fields, column names starting with '#' are ignored.

Steps to reproduce

Expected results

All column in calendar_test table should be included in the stg_star_test models' materialization.

Actual results

Column names starting with '#' are omitted. (From the example, #testColumn and #test2Column). The compiled models also does not contain these columns. image

System information

packages:
- package: dbt-labs/dbt_utils
  version: [">=1.1.0", "<1.2.0"]
- package: emilyriederer/dbtplyr
  version: [">=0.3.0", "<0.4.0"]
- package: calogica/dbt_expectations
  version: [">=0.8.0", "<0.9.0"]
- package: dbt-labs/dbt_project_evaluator
  version: [">=0.5.0", "<0.6.0"]

Which database are you using dbt with?

Columns with '#' are generated for dbt-postgres.

The output of dbt --version:

Core:
  - installed: 1.6.0
  - latest:    1.6.0 - Up to date!

Plugins:
  - databricks: 1.6.1 - Up to date!
  - spark:      1.6.0 - Up to date!
github-actions[bot] commented 7 months ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

github-actions[bot] commented 7 months ago

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.