Skip to main content

For example:

 

column_a

"one"

"two"

"three"

 

Then: STRING_AGG("column_a", ',') => "one,two,three"

 

STRING_AGG is not available as an error message tells me. How can I perform this action then?

 

(I am working on a Transformation in a Data Job.)

(CONCAT() concatenates across columns, but I want to concatenate across rows.)

Hi @1460047096,

 

Maybe this thread will solve your problem. Unfortunately it is a work-around which isn't perfect. Hope it helps!

VERTICA LISTAGG function (celopeers.com)

 

Kind regards,

Jan-peter


Hi @janpeter.van.d ,

 

Thanks for your reply!

 

One question about the approach that you suggest in the other thread:

Is it correct that I would need to pre-define the number of rows that can be concatenated, by the number of joins I implement? If so, I cannot use the approach, because I don't know the number of rows to be concatenated in advance, unfortunately.

 

Best wishes,

Bennet


@1460047096,

 

That's exactly the limitation of this approach. If that doesn't work for you, I'm out of options unfortunately.

 

Kind regards,

Jan-peter


Not for this use-case unfortunately. Nevertheless, thanks a lot for your elaborate approach!


Reply