From b5eb5e099122bcba06c7f2f3ac7ceed07ded2300 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 15 Jun 2021 12:30:48 -0500 Subject: [PATCH] bug fix: adding types to read function --- setup.py | 2 +- transport/sql.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 997b5de..c9cb4cf 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() args = { "name":"data-transport", - "version":"1.3.8.3", + "version":"1.3.8.4", "author":"The Phi Technology LLC","author_email":"info@the-phi.com", "license":"MIT", "packages":["transport"]} diff --git a/transport/sql.py b/transport/sql.py index 542b535..198c3f3 100644 --- a/transport/sql.py +++ b/transport/sql.py @@ -228,10 +228,11 @@ class BQReader(BigQuery,Reader) : SQL = SQL.replace(':dataset',self.dataset).replace(':DATASET',self.dataset) _info = {'credentials':self.credentials,'dialect':'standard'} if 'dtypes' in _args or self.dtypes : - self.dtypes = _args ['dtypes'] if 'dtypes' in self.dtypes else None + if not self.dtypes : + self.dtypes = _args ['dtypes'] if 'dtypes' in _args else None if self.dtypes : _info['dtypes'] = self.dtypes - return pd.read_gbq(SQL,*_info) if SQL else None + return pd.read_gbq(SQL,**_info) if SQL else None # return pd.read_gbq(SQL,credentials=self.credentials,dialect='standard') if SQL else None class BQWriter(BigQuery,Writer): lock = Lock()