run(final String queryString,
GetQueryResults getRequest = service.jobs().getQueryResults(
projectId,
jobId);
+ if (StringUtils.isNotBlank(region)) {
+ getRequest = getRequest.setLocation(region);
+ }
return getPages(getRequest);
} catch (IOException ex) {
throw ex;
diff --git a/bigquery/src/main/resources/interpreter-setting.json b/bigquery/src/main/resources/interpreter-setting.json
index 8023bed1522..989cc375d96 100644
--- a/bigquery/src/main/resources/interpreter-setting.json
+++ b/bigquery/src/main/resources/interpreter-setting.json
@@ -31,6 +31,13 @@
"defaultValue": "",
"description": "BigQuery SQL dialect (standardSQL or legacySQL). If empty, query prefix like '#standardSQL' can be used.",
"type": "string"
+ },
+ "zeppelin.bigquery.region": {
+ "envName": null,
+ "propertyName": "zeppelin.bigquery.region",
+ "defaultValue": "",
+ "description": "Location of BigQuery dataset. Needed if it is a single-region dataset.",
+ "type": "string"
}
},
"editor": {
diff --git a/docs/interpreter/bigquery.md b/docs/interpreter/bigquery.md
index 1a585437f8a..da696a74f2e 100644
--- a/docs/interpreter/bigquery.md
+++ b/docs/interpreter/bigquery.md
@@ -53,6 +53,11 @@ limitations under the License.
|
BigQuery SQL dialect (standardSQL or legacySQL). If empty, [query prefix](https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql#sql-prefix) like '#standardSQL' can be used. |
+
+ zeppelin.bigquery.region |
+ |
+ BigQuery dataset region (Needed for single region dataset) |
+