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
In older versions, the input mapping keys are rendered and then replace in the rendered SQL. However, in newer versions, the input mapping keys are replaced in the raw SQL. Therefore, the format of the input mapping keys must exactly match the format in the SQL file in order to be find and replace.
Even worse, now in 0.3.5 It's also the case that even if the ref is a perfect match, if located within a Jinja macro it won't find it anymore. 0.3.4 seems good.
select * from
{{
deduplicate(
relation=ref("mock_ref"),
partition_by='mock_dim',
)
}}
@mjirv I believe the root cause is the changes in the file mentioned here
Describe the bug
In older versions, the input mapping keys are rendered and then replace in the rendered SQL. However, in newer versions, the input mapping keys are replaced in the raw SQL. Therefore, the format of the input mapping keys must exactly match the format in the SQL file in order to be find and replace.
Steps to reproduce
SQL file:
datamocktool can't replace
ref('model')
withref("mock_reference')
for the SQL fileExpected results
ref("model")
withref("mock_reference')
during the test.Actual results
ref("model")
is not replaced during test.Screenshots and log output
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:Additional context
Are you interested in contributing the fix?
yes
The text was updated successfully, but these errors were encountered: