-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
@dbeatty10 - this one is just a warning (and it's actually a good one) - as_bool() on an array here would yield the incorrect result. The jinja expansion (in both python and rust) puts filters at the highest precedence, meaning
as_bool()in dbt-core was being applied to an array (but that was only wrapping the array struct with AsBool) and then this AsBool is dropped when the comparison check oftarget.type in ['redshift', 'postgres']happens. In fusion, we are warning to let the user know that AsBool is doing nothing in this example - just a passthrough.To fix, I believe it's sufficient to do:
+enabled: "{{ target.type in ['redshift', 'postgres'] }}" -- or +enabled: "{{ (target.type in ['redshift', 'postgres']) | as_bool() }}" -- if you want to be extra careful for some reason