bug fixes

This commit is contained in:
Steve Nyemba 2022-05-16 11:54:28 -05:00
parent f64b945245
commit db1496dd38
2 changed files with 6 additions and 3 deletions

View File

@ -151,7 +151,7 @@ def instance(**_args):
try:
host = ''
if provider not in ['bigquery','mongodb','couchdb','sqlite','console','etl','file','rabbitmq'] :
if provider not in ['bigquery','mongodb','mongo','couchdb','sqlite','console','etl','file','rabbitmq'] :
#
# In these cases we are assuming RDBMS and thus would exclude NoSQL and BigQuery
username = args['username'] if 'username' in args else ''
@ -169,7 +169,7 @@ def instance(**_args):
account = ''
host = ''
database = args['path'] if 'path' in args else args['database']
if provider not in ['mongodb','couchdb','bigquery','console','etl','file','rabbitmq'] :
if provider not in ['mongodb','mongo','couchdb','bigquery','console','etl','file','rabbitmq'] :
uri = ''.join([provider,"://",account,host,'/',database])
e = sqlalchemy.create_engine (uri,future=True)

View File

@ -38,7 +38,7 @@ class Mongo :
host = ":".join([host,port]) #-- Formatting host information here
self.uid = args['doc'] if 'doc' in args else None #-- document identifier
self.dbname = args['dbname'] if 'dbname' in args else args['db']
authMechanism= 'SCRAM-SHA-256' if 'mechanism' not in args else args['mechanism']
self._lock = False if 'lock' not in args else args['lock']
username = password = None
@ -49,6 +49,9 @@ class Mongo :
_info = json.loads((open(args['auth_file'])).read())
username = _info['username']
password = _info['password']
if 'mechanism' in _info:
authMechanism = _info['mechanism']
authSource=(args['authSource'] if 'authSource' in args else self.dbname)
if username and password :