From 0c0eaf7063631653dde61611208cac5c64acf5e6 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 1 Sep 2021 02:33:40 -0500 Subject: [PATCH] bug fix: imports, testing code removed --- transport/mongo.py | 2 ++ transport/sql.py | 17 ----------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/transport/mongo.py b/transport/mongo.py index 4a96c6e..84200f6 100644 --- a/transport/mongo.py +++ b/transport/mongo.py @@ -9,6 +9,8 @@ from bson.objectid import ObjectId from bson.binary import Binary import json from datetime import datetime +import pandas as pd + import gridfs # from transport import Reader,Writer import sys diff --git a/transport/sql.py b/transport/sql.py index 5d08032..7492113 100644 --- a/transport/sql.py +++ b/transport/sql.py @@ -307,20 +307,3 @@ class BQWriter(BigQuery,Writer): _df.to_gbq(**self.mode) #if_exists='append',destination_table=partial,credentials=credentials,chunksize=90000) pass -# import transport -# try: -# _args = {'type':'sql.SQLWriter','args':{'provider':'netezza','host':'ori-netezza.vumc.org','table':'IBM_CCS_DX','username':'nyembsl1','password':'Innovat10n','database':'MALIN_OMOP_RD'}} -# df = pd -# reader = SQLReader(**_args['args']) -# except Exception as error : -# print (error) -# reader = transport.factory.instance(type="sql.BQReader",args={"service_key":"/home/steve/dev/google-cloud-sdk/accounts/curation-prod.json"}) -# _df = reader.read(sql="select * from `2019q1r4_combined.person` limit 10") -# writer = transport.factory.instance(type="sql.BQWriter",args={"service_key":"/home/steve/dev/google-cloud-sdk/accounts/curation-prod.json"}) -# writer.write(_df,table='2019q1r4_combined.foo') -# write.write() -# _args = {"db":"sample","table":"foo","provider":"postgresql"} -# # # w = SQLWriter(**_args) -# # # w.write({"name":"kalara.io","email":"ceo@kalara.io","age":10}) -# r = SQLReader(**_args) -# print (r.read(filter='age > 0',limit = 20))