mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
specify to use standard sql or not
This commit is contained in:
parent
f524dda88b
commit
2dac682e8e
@ -104,9 +104,9 @@ class BigQuery(BaseQueryRunner):
|
||||
"type": "string",
|
||||
'title': 'UDF Source URIs (i.e. gs://bucket/date_utils.js, gs://bucket/string_utils.js )'
|
||||
},
|
||||
'useLegacySql': {
|
||||
'useStandardSql(Beta)': {
|
||||
"type": "boolean",
|
||||
'title': "use BigQuery's legacy SQL: https://cloud.google.com/bigquery/query-reference",
|
||||
'title': "use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/",
|
||||
}
|
||||
},
|
||||
'required': ['jsonKeyFile', 'projectId'],
|
||||
@ -136,7 +136,7 @@ class BigQuery(BaseQueryRunner):
|
||||
job_data = {
|
||||
"query": query,
|
||||
"dryRun": True,
|
||||
"useLegacySql": self.configuration.get('useLegacySql', False),
|
||||
"useLegacySql": not self.configuration.get('useStandardSql(Beta)', False),
|
||||
}
|
||||
response = jobs.query(projectId=self._get_project_id(), body=job_data).execute()
|
||||
return int(response["totalBytesProcessed"])
|
||||
@ -147,7 +147,7 @@ class BigQuery(BaseQueryRunner):
|
||||
"configuration": {
|
||||
"query": {
|
||||
"query": query,
|
||||
"useLegacySql": self.configuration.get('useLegacySql', False),
|
||||
"useLegacySql": not self.configuration.get('useStandardSql(Beta)', False),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user