COF-C02 · Question #227
Which Snowflake object can be accessed in he FROM clause of a query, returning a set of rows having one or more columns?
The correct answer is A. A User-Defined Table Function (UDTF). A User-Defined Table Function (UDTF) is specifically designed to return a set of rows (a table result) and is used in the FROM clause of a query, optionally with the TABLE() syntax. This makes it behave like a parameterized virtual table. A Scalar UDF (B) returns a single value…
Question
Which Snowflake object can be accessed in he FROM clause of a query, returning a set of rows having one or more columns?
Options
- AA User-Defined Table Function (UDTF)
- BA Scalar User Function (UDF)
- CA stored procedure
- DA task
How the community answered
(32 responses)- A94% (30)
- C3% (1)
- D3% (1)
Explanation
A User-Defined Table Function (UDTF) is specifically designed to return a set of rows (a table result) and is used in the FROM clause of a query, optionally with the TABLE() syntax. This makes it behave like a parameterized virtual table. A Scalar UDF (B) returns a single value per input row and appears in the SELECT list, not the FROM clause. A stored procedure (C) is invoked with CALL and cannot be placed in a FROM clause. A task (D) is a scheduler for automating SQL execution on a schedule and has no role in query result sets.
Topics
Community Discussion
No community discussion yet for this question.