Skip to content
Advertisement

transpose bigquery records and concatenate the result as a string and and alternative array

I have the following table.

I get the following output. How can I make this more efficient. final output 1

The function i used is as follows.

CREATE OR REPLACE FUNCTION sp.string_flatten_dedup(string_value string, delim string) AS (

);

I would also like to be able to store the data where concat_last_name as an array with a data structure something like below.

Advertisement

Answer

Seems like you want something like this

or like this if you want string value from an array

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement