I am trying to create BQ routine which takes ARRAY as parameter and insert into table .
filename can be NULL too .
CREATE OR REPLACE PROCEDURE `##.history`( Job_ID STRING, filename ARRAY<STRING> , Status STRING )
BEGIN
EXECUTE IMMEDIATE format
("""
INSERT INTO
`##.tablename`
( JOB_ID,
FILENAME,
STATUS,
)
values
(GENERATE_UUID(),
'"""||Job_ID||"""',
'"""||filename|| """',
'"""||Status||"""'
)
""");
when I am invoking procedure it's giving error:
CALL ###.history
('text1', ['f1.txt','f2.txt'], 'start');
No matching signature for operator || for argument types: STRING, ARRAY. Supported signatures: STRING || STRING; BYTES || BYTES; ARRAY || ARRAY