Python Forum
store all variable values into list and insert to sql_summary table
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
store all variable values into list and insert to sql_summary table
#3
Hi Team,

thanks for the information modified after suggestion,

how to put below code into class module.


import gzip
import hashlib
import sqlite3
import sys

from module4 import insert_Records
from module1 import Create_csv
from module2 import chksum
from module3 import function_gzip


def main(SQL_Table, Destination_path, site_Name, date)
	csvname = Create_csv(tblname, SQL_Table, Destination_path)	
	x   = Create_checksum(tblname, Destination_path)
	y  = function_gzip((tblname, Destination_path)
	sql = f"insert into summary_table([database], tblname, Destination_path, date, chksumNo, Gzip_status) values ('{database}','{tblname}','{Destination_path'},'{date}','{x}','{y}')"

if __name__ == "__main__":    
	SQL_Table = sys.argv(1)
	Destination_path = sys.argv(2)
	site_Name = sys.argv(3)
	date = sys.argv(4)
Reply


Messages In This Thread
RE: store all variable values into list and insert to sql_summary table - by mg24 - Sep-28-2022, 02:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  remove duplicates from dicts with list values wardancer84 27 907 May-27-2024, 04:54 PM
Last Post: wardancer84
  Copying the order of another list with identical values gohanhango 7 1,315 Nov-29-2023, 09:17 PM
Last Post: Pedroski55
  Search Excel File with a list of values huzzug 4 1,391 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Comparing List values to get indexes Edward_ 7 1,369 Jun-09-2023, 04:57 PM
Last Post: deanhystad
  Insert 10gb csv files into sql table via python mg24 2 2,087 Apr-28-2023, 04:14 PM
Last Post: snippsat
  Adding values with reduce() function from the list of tuples kinimod 10 2,896 Jan-24-2023, 08:22 AM
Last Post: perfringo
  user input values into list of lists tauros73 3 1,183 Dec-29-2022, 05:54 PM
Last Post: deanhystad
Photo How to select NULL and blank values from MySQL table into csv python300 9 2,660 Dec-27-2022, 09:43 PM
Last Post: deanhystad
Question Triying to store values from models Larry1888 1 712 Nov-02-2022, 02:08 AM
Last Post: Pedroski55
  Split string using variable found in a list japo85 2 1,392 Jul-11-2022, 08:52 AM
Last Post: japo85

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020