QuestionQ101

Transform Data

A Data Engineer plans to run a set of Data Metric Functions (DMFs) against a table with this query:

select snowflake.core.max(  
select c_name from snowflake_sample_data.tpch_sf1.customer  
) ;  

When the query runs, it returns an error.

What is causing the error?

Explanation

The SNOWFLAKE.CORE.MAX() system DMF can be called directly with a query that projects one column, but that projected column must be of type FLOAT or NUMBER. C_NAME is a VARCHAR column, so it is not an accepted argument type for this DMF.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!