thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

User-Defined Table Function (UDTF)

A function that returns zero or more rows (a table) for each input, used in the FROM clause.

Definition

UDTFs, also called table functions, expand or parse input into rows. In Snowflake they are invoked with TABLE() and often combined with LATERAL. Python UDTFs implement a handler class with a process method.

Example

SELECT * FROM TABLE(split_to_rows('a,b,c'));

Exam tip

Scalar UDF = one output per input row; UDTF = many rows per input row.

Related terms