Commit e708028d authored by dasharatha.vamshi's avatar dasharatha.vamshi

init

parent 7f0c585b
...@@ -4,13 +4,14 @@ from scripts.common.config_parser import config ...@@ -4,13 +4,14 @@ from scripts.common.config_parser import config
from scripts.common.logsetup import logger from scripts.common.logsetup import logger
import psycopg2 import psycopg2
class PushDatatoPostgreSql: class PushDatatoPostgreSql:
def __init__(self, query): def __init__(self, query):
self.query = query self.query = query
self.conn = psycopg2.connect( self.conn = psycopg2.connect(
database=self.query['database'], database=self.query['database'],
user='postgres', user='postgres',
password=password, password='root@123',
host='localhost', host='localhost',
port='5432' port='5432'
) )
...@@ -27,12 +28,13 @@ class PushDatatoPostgreSql: ...@@ -27,12 +28,13 @@ class PushDatatoPostgreSql:
return False return False
def push_data(self): def push_data(self):
return True
def run(self): def run(self):
try: try:
logger.info("Starting to push the data to Postgres...............") logger.info("Starting to push the data to Postgres...............")
# create table # create table
return True return True
except Exception as e: except Exception as e:
logger.info(e) logger.info(e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment