COF-C02 practice question 2 of 35
What kind of value does a User-Defined Function (UDF) return? (Select TWO).
Full set: 778 questionsUser-Defined Functions (UDFs) in Snowflake are categorized by the type of value they return. A UDF can return a single value, such as an integer, string, or variant; this is known as a scalar function. Alternatively, a UDF can return a set of rows, effectively behaving like a table in the FROM clause of a query; this is known as a tabular function, or User-Defined Table Function (UDTF). These are the two fundamental return types for UDFs.
A. Dictionary is a data structure in languages like Python. In Snowflake, this would be represented by the OBJECT data type, making 'Object' the more correct term.
B. List is a data structure in programming languages. The equivalent SQL data type in Snowflake is ARRAY, which is a type of scalar value.
C. An OBJECT is a specific data type that can be returned by a scalar UDF. 'Scalar' is the broader, correct category that encompasses OBJECT, INTEGER, VARCHAR, etc.
1. Snowflake Documentation. (n.d.). Introduction to User-Defined Functions. In Development. Retrieved from https://docs.snowflake.com/en/developer-guide/udf/udf-overview. "A user-defined function (UDF) returns either a single (scalar) value or a set of rows (tabular value)."
2. Snowflake Documentation. (n.d.). SQL UDFs. In Development. Retrieved from https://docs.snowflake.com/en/developer-guide/udf/sql/udf-sql. The documentation distinguishes between "Scalar UDFs (UDFs)" and "Tabular UDFs (UDTFs)".
Keep practicing
Take the free COF-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other COF-C02 practice questions
- Question 1What does Snowflake recommend regarding database object ownership? (Select TWO).
- Question 3How do Snowflake data providers share data that resides in different databases?
- Question 4What are supported file formats for unloading data from Snowflake? (Choose three.)
- Question 5A marketing co-worker has requested the ability to change a warehouse size on their mediu…
- Question 6What service is provided as an integrated Snowflake feature to enhance Multi-Factor Authe…
- Question 7What is the minimum Snowflake edition required to use Dynamic Data Masking?
