Skip to content

Commit 63a1086

Browse files
committed
fix(test): pin BigQuery location to US in Soda scan config
The GCP project kestra-unit-test has EU as its default BigQuery location. A newer google-cloud-bigquery version in sodadata/soda-core switched from jobs.insert (which auto-detects location from the referenced dataset) to jobs.query (which uses the project default = EU). The kestra_unit_test dataset and its tables live in US, so queries routed to EU return 404. Explicitly setting location: US in the Soda BigQuery connection config bypasses the project-default-EU routing and points directly at the dataset's actual region. Also reverts the --location=EU flag on setup-unit.sh added in the previous attempt, which was not the root cause.
1 parent 05b5b4a commit 63a1086

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/setup-unit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ gcloud config set project "${PROJECT_ID}" >/dev/null
1313
echo "📋 Creating test tables in existing dataset ${PROJECT_ID}:${DATASET}..."
1414

1515
# orderDetail table: used in 'run' and 'error' tests
16-
bq query --use_legacy_sql=false --location=EU "
16+
bq query --use_legacy_sql=false "
1717
CREATE OR REPLACE TABLE \`${PROJECT_ID}.${DATASET}.orderDetail\` AS
1818
SELECT 1 AS id, 10.5 AS unitPrice, TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY) AS addedDate
1919
UNION ALL
2020
SELECT 2 AS id, 200.0 AS unitPrice, TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 2 DAY) AS addedDate;
2121
"
2222

2323
# territory table: used in 'failed' test
24-
bq query --use_legacy_sql=false --location=EU "
24+
bq query --use_legacy_sql=false "
2525
CREATE OR REPLACE TABLE \`${PROJECT_ID}.${DATASET}.territory\` AS
2626
SELECT 1 AS id, 'North' AS name, 1 AS regionId
2727
UNION ALL

src/test/java/io/kestra/plugin/soda/ScanTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ void run() throws Exception {
4646
" connection:\n" +
4747
" project_id: \"kestra-unit-test\"\n" +
4848
" dataset: kestra_unit_test\n" +
49+
" location: US\n" +
4950
" account_info_json: |\n" +
5051
" " + StringUtils.replace(UtilsTest.serviceAccount(), "\n", "\n "),
5152
TYPE_REFERENCE
@@ -89,6 +90,7 @@ void failed() throws Exception {
8990
" connection:\n" +
9091
" project_id: \"kestra-unit-test\"\n" +
9192
" dataset: kestra_unit_test\n" +
93+
" location: US\n" +
9294
" account_info_json: |\n" +
9395
" " + StringUtils.replace(UtilsTest.serviceAccount(), "\n", "\n "),
9496
TYPE_REFERENCE
@@ -130,6 +132,7 @@ void error() throws Exception {
130132
" connection:\n" +
131133
" project_id: \"kestra-unit-test\"\n" +
132134
" dataset: kestra_unit_test\n" +
135+
" location: US\n" +
133136
" account_info_json: |\n" +
134137
" " + StringUtils.replace(UtilsTest.serviceAccount(), "\n", "\n "),
135138
TYPE_REFERENCE

0 commit comments

Comments
 (0)