Diese Seite ist in Ihrer lokalen Sprache noch nicht verfügbar. Wir arbeiten daran, weitere Sprachversionen hinzuzufügen. Vielen Dank für Ihre Unterstützung.

On this page

Show all

Table-Valued Functions

Updated on 2022-09-23 GMT+08:00

Table-valued functions can convert one row of records into multiple rows or convert one column of records into multiple columns. Table-valued functions can only be used in JOIN LATERAL TABLE.

Table 1 Table-valued functions

Function

Return Data Type

Description

split_cursor(value, delimiter)

cursor

Separates the "value" string into multiple rows of strings by using the delimiter.

Example

Input one record ("student1", "student2, student3") and output two records ("student1", "student2") and ("student1", "student3").

create source stream s1(attr1 string, attr2 string) with (......);
insert into s2 select  attr1, b1 from s1 left join lateral table(split_cursor(attr2, ',')) as T(b1) on true;
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback