XMLAGG

Translation specification for transforming the XMLAGG function to Snowflake LISTAGG

Description

Construct an XML value by performing an aggregation of multiple rows. For more information check XMLAGG.

XMLAGG (
  XML_value_expr
  [ ORDER BY order_by_spec [,...] ]
  [ RETURNING { CONTENT | SEQUENCE } ]
)

order_by_spec := sort_key [ ASC | DESC ] [ NULLS { FIRST | LAST } ]

Sample Source Patterns

Setup data

Teradata

create table orders (
	o_orderkey int, 
	o_totalprice float);

insert into orders values (1,500000);
insert into orders values (2,100000);
insert into orders values (3,600000);
insert into orders values (4,700000);

Snowflake

XMLAGG transformation

Teradata

Snowflake

Known Issues

1. RETURNING clause is currently not supported.

The user will be warned that the translation of the returning clause will be added in the future.

  1. MSCEWI1073: Pending Functional Equivalence Review.

Last updated

Was this helpful?