From 6863df382e6af1a78930e45dc475a952f96aab44 Mon Sep 17 00:00:00 2001 From: "Steve L. Nyemba -- The Architect" Date: Tue, 23 Oct 2018 14:39:16 -0500 Subject: [PATCH] bug fix --- src/risk.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/risk.py b/src/risk.py index 0719fdb..7bdf90a 100644 --- a/src/risk.py +++ b/src/risk.py @@ -229,17 +229,19 @@ if 'action' in SYS_ARGS and SYS_ARGS['action'] in ['create','compute','migrate' o_dataset = SYS_ARGS['o_dataset'] for table in tables: sql = " ".join(["SELECT ",",".join(table['fields']) ," FROM (",mytools.get_filtered_table(table,key),") as ",table['name']]) - - job = bq.QueryJobConfig() - job.destination = client.dataset(o_dataset).table(table['name']) - job.use_query_cache = True - job.allow_large_results = True - job.priority = 'INTERACTIVE' - job.time_partitioning = bq.table.TimePartitioning(type_=bq.table.TimePartitioningType.DAY) + print "" + print sql + print "" + # job = bq.QueryJobConfig() + # job.destination = client.dataset(o_dataset).table(table['name']) + # job.use_query_cache = True + # job.allow_large_results = True + # job.priority = 'INTERACTIVE' + # job.time_partitioning = bq.table.TimePartitioning(type_=bq.table.TimePartitioningType.DAY) - r = client.query(sql,location='US',job_config=job) + # r = client.query(sql,location='US',job_config=job) - print [table['full_name'],' ** ',r.job_id,' ** ',r.state] + # print [table['full_name'],' ** ',r.job_id,' ** ',r.state] pass