don't require double quotes around numbers in unit testing yml #891
Labels
feature:unit-tests
Issues related to built-in dbt unit testing functionality
type:bug
Something isn't working
Is this a new bug in dbt-snowflake?
Current Behavior
This unit test results in a SQL compilation error:
That's because this doesn’t work in snowflake:
select try_cast(1 as NUMBER);
But this does:
select try_cast('1' as NUMBER);
So does this, but gross:
select try_cast(to_numeric(1) as NUMBER) as my_col;
so does this:
select cast(1 as NUMBER);
(but dbt doesn't have a cast macro, only safe_cast dbt-labs/dbt-adapters#84)If I update my unit test definition to wrap all of the numbers in double quotes, then this error goes away.
Expected Behavior
I should be able to have numbers in my unit test definition without wrapping them in quotes.
Environment
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: