I am trying to read data form BigQuery table in Google Apps Script. Target table is located in EU region, but US is requested by default from script.
Code
var request = {
query: 'SELECT * FROM `table-name`'
};
var queryResults = BigQuery.Jobs.query(request, projectId);
Error:
GoogleJsonResponseException: API call to bigquery.jobs.query failed with error: Not found: Dataset <dataset-name.table-name> was not found in location US
Your query is expected to be automatically routed to where the data is, if you have the right dataset to qualify the table name, e.g.: