From b63a702f9b8288e42bb295d44395a68179802e4d Mon Sep 17 00:00:00 2001 From: Amlan Chakladar <57117462+amlanc1@users.noreply.github.com> Date: Thu, 23 Nov 2023 12:01:31 -0800 Subject: [PATCH] added etk query --- src/reconfunctions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/reconfunctions.py b/src/reconfunctions.py index 60b96da..02e5cfc 100644 --- a/src/reconfunctions.py +++ b/src/reconfunctions.py @@ -87,13 +87,13 @@ def recondestination(dbclient,main_staging_collection,main_table_collection,reco table_name=(lambda x: bi_geo_table if x['eventType']=='geolocation' else bi_table_name)(row) # table_name = bi_table_name reconqrystr = f'SELECT * FROM {table_name} WHERE {mainqrystr}' - logging.debug(f'here is the query string for main table: {reconqrystr}') + logger.debug(f'here is the query string for main table: {reconqrystr}') mainfound = bi_sql_db_obj.reconQuery(reconqrystr,logger) if eventpayload: eventqrystr = bi_sql_db_obj.prepQuerystr(eventpayload,row['datasource']) table_name = bi_events_table_name reconqrystr = f'SELECT * FROM {table_name} WHERE {eventqrystr}' - logging.debug(f'here is the query string for event table: {reconqrystr}') + logger.debug(f'here is the query string for event table: {reconqrystr}') eventfound = bi_sql_db_obj.reconQuery(reconqrystr,logger) else: eventfound=True @@ -104,7 +104,7 @@ def recondestination(dbclient,main_staging_collection,main_table_collection,reco print(countsqrystr) table_name = bi_violations_table_name reconqrystr = f'SELECT * FROM {table_name} WHERE {countsqrystr}' - logging.debug(f'here is the query string for counts table: {reconqrystr}') + logger.debug(f'here is the query string for counts table: {reconqrystr}') countsfound = bi_sql_db_obj.reconQuery(reconqrystr,logger) if not countsfound: break @@ -114,7 +114,7 @@ def recondestination(dbclient,main_staging_collection,main_table_collection,reco eventqrystr = bi_sql_db_obj.prepQuerystr(geopayload, row['datasource']) table_name = bi_geo_table reconqrystr = f'SELECT * FROM {table_name} WHERE {eventqrystr}' - logging.debug(f'here is the query string for geo table: {reconqrystr}') + logger.debug(f'here is the query string for geo table: {reconqrystr}') geofound = bi_sql_db_obj.reconQuery(reconqrystr, logger) else: geofound=True