Error of location with EXECUTE IMMEDIATE on Bigquery

Viewed 604

when I use the command:

EXECUTE IMMEDIATE """
EXPORT DATA OPTIONS(
  uri='gs://archivage_base/archive1_@EXPORT_DATE*.csv',
  format='CSV',
  overwrite=true,
  header=true,
  field_delimiter=';') AS
SELECT * FROM `base-042021.campagnemakers.makerlocal`
"""
using current_date() as EXPORT_DATE

I have this error:

Not found: Datasetbase-042021:campagnemakers was not found in location US at [2:1]

I don't understand why because i don't have the error without the command EXECUTE IMMEDIATE. My location is EU.

1 Answers

This solution from Mikhail Berlyant worked for me.

If you running this in UI - try to change Processing location in Query Settings.

Related