Sep-27-2022, 08:56 PM
Hi Team,
I am working on a project, task is
1) extract sql table into csv
2) run chksum on it
3) gzip the file
and final steps to pass all varaibles value into sql_Summary_tables.
how to store all values into a global list , and insert values into sql_Summary_tables.
I am using 4 modules, all variable values lies in different module
I am not using oops concept. created functions in different module and calling. plz help how to achieve this task.
attached sample of office task.
I am working on a project, task is
1) extract sql table into csv
2) run chksum on it
3) gzip the file
and final steps to pass all varaibles value into sql_Summary_tables.
how to store all values into a global list , and insert values into sql_Summary_tables.
I am using 4 modules, all variable values lies in different module
I am not using oops concept. created functions in different module and calling. plz help how to achieve this task.
attached sample of office task.
import sys def main() SQL_Table = sys.argv(1) Destination_path = sys.argv(2) site_Name = sys.argv(3) date = sys.argv(4) from module1 import Create_csv csvname = Create_csv(tblname,SQL_Table,Destination_path) from module2 import chksum x = Create_checksum(tblname,Destination_path) from module3 import function_gzip y = function_gzip((tblname,Destination_path) from module4 import insert_Records sql = """ insert into summary_table([database],tblname,Destination_path,date,chksumNo,Gzip_status)values([database],tblname,Destination_path,date,x,y) if __name__ == "__main__": def main()