This commit is contained in:
Steve Nyemba 2019-10-07 12:07:33 -05:00
parent 2a38cfd7ef
commit edb2d7b7c7
1 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,8 @@ class pseudonym :
SQL = SQL.replace(':table',args['table'])
if args['filter'].strip() != '' :
SQL = SQL.replace(":filter", "WHERE "+args['filter'])
else:
SQL = SQL.replace(":filter","")
SQL += " ".join(['GROUP BY ',args['field'],'ORDER BY 1 '])
TABLE_NAME = ".".join([args['dataset'],args['table']])
credentials = service_account.Credentials.from_service_account_file(args['key'])