PyYaml dryrun
This commit is contained in:
Родитель
ac6344045a
Коммит
c2b56907fb
|
@ -42,7 +42,9 @@ jobs:
|
|||
- checkout
|
||||
- run:
|
||||
name: Verify that BigQuery validates each query
|
||||
command: script/dryrun
|
||||
command: |
|
||||
pip install PyYaml
|
||||
script/dryrun
|
||||
deploy:
|
||||
parameters:
|
||||
image:
|
||||
|
|
|
@ -76,7 +76,7 @@ class Metadata:
|
|||
|
||||
@classmethod
|
||||
def of_sql_file(cls, sql_file):
|
||||
"""Returns the metadata that is associated with the provided SQL file."""
|
||||
"""Return the metadata that is associated with the provided SQL file."""
|
||||
path, _ = os.path.split(sql_file)
|
||||
metadata_file = os.path.join(path, METADATA_FILE)
|
||||
cls = Metadata.from_file(metadata_file)
|
||||
|
|
|
@ -97,8 +97,6 @@ USE_DERIVED_DATASETS = {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
def worker_entrypoint(public_project, sqlfile):
|
||||
sql = open(sqlfile).read()
|
||||
if sqlfile in USE_DERIVED_DATASETS:
|
||||
|
@ -114,7 +112,7 @@ def worker_entrypoint(public_project, sqlfile):
|
|||
metadata = Metadata.of_sql_file(sqlfile)
|
||||
if metadata.is_public_bigquery():
|
||||
request_data["project"] = public_project
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
# for all other queries perform dryrun in default project
|
||||
pass
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче