Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Jinja Function Call within DBT model

$
0
0

Just wondering, does jinja not apply a function to every row in a dbt sql/model table?

With my_cte AS (  Select     t.id as id,     {{my_func('id')}} as amount  From table t)

It returns the same value for column 'amount' in every row in the CTE. It seems to calculate the value for the first row and use it for every row. Is this normal? I am assuming it would returns same results as an sql applied function with different values for each row.

Thanks.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>