You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created macro and used function adapter.get_columns_in_relation(model) to get all columns in model, when model is materialized as ephemeral, macro doesn't return any rows, when I change materialization of model to view or table, macro correctly returns all columns in model.
Steps To Reproduce
Create model and define its materialization as ephemeral
Create macro with function adapter.get_columns_in_relation in for cycle to return full list of column of model
{# macros name is no_nulls_in_columns - its used in step 3 #}
{% macro no_nulls_in_columns(model) %}
SELECT*FROM {{ model }} WHERE
{% for col inadapter.get_columns_in_relation(model) -%}
{{ col.column }} IS NULL
{%- if not loop.last %} OR{% endif %}
{% endfor %}
{% endmacro %}
Create sql that uses macro and verify generated code, its should contain all columns
{{ no_nulls_in_columns(model) }}
Expected behavior
I expect fuction adapter.get_columns_in_relation(model) return returns full list of column of model no matter if model is materializes as view, table or ephemeral
Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
The output of dbt --version:
Core:
- installed: 1.8.7
- latest: 1.8.8 - Update available!
Your version of dbt-core is out of date!
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
- teradata: 1.8.1 - Up to date!
The operating system you're using: Win 10 Enterprise, Version 22H2 The output of python --version: Python 3.11.0
The text was updated successfully, but these errors were encountered:
Bug Description
I created macro and used function adapter.get_columns_in_relation(model) to get all columns in model, when model is materialized as ephemeral, macro doesn't return any rows, when I change materialization of model to view or table, macro correctly returns all columns in model.
Steps To Reproduce
Create model and define its materialization as ephemeral
Create macro with function adapter.get_columns_in_relation in for cycle to return full list of column of model
Expected behavior
I expect fuction adapter.get_columns_in_relation(model) return returns full list of column of model no matter if model is materializes as view, table or ephemeral
Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
The output of
dbt --version
:The operating system you're using:
Win 10 Enterprise, Version 22H2
The output of
python --version
:Python 3.11.0
The text was updated successfully, but these errors were encountered: