Closed taherajnaFA closed 3 months ago
This is an issue caused when DBT tries to execute the script during the "compilation" phase. Adding the below blocks fixes the issue:
{% macro sample_macro(variable) %}
{% if execute %}
--Macro Here
{% endif %}
{% endmacro %}
Is this a new bug?
Current Behavior
Upon using the source function in the config{} block on top of any model, the function always returns the current model instead of honoring the variables passed to it.
Expected Behavior
The source function should work correctly in the config block as well.
Steps To Reproduce
Created a repo to showcase this bug: https://github.com/taherajnaFA/dbt_bugs Prerequisites:
Steps:
pip install dbt-postgres
or use the requirements.txt provided:pip install -r requirements.txt
dbt seed
dbt run
Relevant log output
Environment
Additional Context
No response