I think I am very close but still can use help.
I have a SQL insert that works perfectly as follows:
INSERT INTO `hybrid-task-358121.config_panel.files_to_ingest`
(client_UUID, contract_UUID, URL_path)
VALUES
('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H008_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H027_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H017_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H009_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H023_ffs_in-network.json.gz');
But when I convert this query (called FilesQuery2 for now) to try to do additional scope:
INSERT INTO `hybrid-task-358121.config_panel.files_to_ingest`
(client_UUID, contract_UUID, URL_path)
VALUES
{{ sql_code }};
And trigger this using:
FilesQuery2.trigger({
additionalScope: { sql_code: sql },
onSuccess: '',
onFailure: '',
});
Where I can confirm the sql variable (a string) does contain the following:
"('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H008_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H027_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H017_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H009_ffs_in-network.json.gz'), ('b047e850-a3a2-4943-8a9a-25125e6f7443', '24c9e6d2-039c-482e-b08c-879db4dafd81', 'https://bcbsla.sapphiremrfhub.com/mrfs/202306/2023-04-27_bcbsla_H023_ffs_in-network.json.gz')"
And the query fails - I get Syntax error: Unexpected INSERT target name at [3:1]
I paste that sql string value manually into that insert and it works fine.
Any ideas? Thanks,