in utils/rules_update.py [0:0]
def get_params(args):
'''
Assign the Appropriate Parameters according to the input taken fron the Command Line
Input :
args:Command Line input taken from the User
Output:
params : Dictionary conisting of the necessary fields to plug into the SQL Query
'''
if args.delete:
datak[args.doc_type].pop(args.ruleid)
elif args.template == 'Template1':
params={
'key' : args.key,
'BQ_Table' :"`project_table`",
'doc_type' : args.doc_type,
'value_before' : args.value_before,
'value_after' : args.value_after}
elif args.template == 'Template2':
params = {
'key' : args.key_list,
'BQ_Table' : '`project_table`',
'value' : args.value_list,
'operator' : args.operator_list}
else:
params={
'key' : args.key,
'BQ_Table' :"`project_table`",
'doc_type' : args.doc_type,
'operator' : args.operator,
'value' : args.value}
return params