bug fix: CLI parameter handling (wrong reference)
This commit is contained in:
parent
89ed5d5d46
commit
5c9fda4018
|
@ -139,7 +139,8 @@ import json
|
|||
# path = '../curation-prod.json'
|
||||
# credentials = service_account.Credentials.from_service_account_file(path)
|
||||
# df = pd.read_gbq("SELECT * FROM io.icd10_partial_io",credentials=credentials,dialect='standard')
|
||||
f = open('config.json')
|
||||
filename = 'config.json' if 'config' not in SYS_ARGS else SYS_ARGS['config']
|
||||
f = open(filename)
|
||||
config = json.loads(f.read())
|
||||
args = config['pipeline']
|
||||
f.close()
|
||||
|
@ -152,8 +153,10 @@ if __name__ == '__main__' :
|
|||
"""
|
||||
if 'move' in SYS_ARGS :
|
||||
table = SYS_ARGS['from']
|
||||
contexts = [item['context'] for item in config['pipeline'] if item['from'] == args['from']]
|
||||
contexts = [item['context'] for item in config['pipeline'] if item['from'] == SYS_ARGS['from']]
|
||||
args = dict(config,**{"private_key":"../curation-prod.json"})
|
||||
args = dict(args,**SYS_ARGS)
|
||||
args['contexts'] = contexts
|
||||
move(**args)
|
||||
else:
|
||||
print ("NOT YET READY !")
|
Loading…
Reference in New Issue