bug fix: adding types to read function
This commit is contained in:
parent
91434ec32d
commit
b5eb5e0991
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ def read(fname):
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||||
args = {
|
args = {
|
||||||
"name":"data-transport",
|
"name":"data-transport",
|
||||||
"version":"1.3.8.3",
|
"version":"1.3.8.4",
|
||||||
"author":"The Phi Technology LLC","author_email":"info@the-phi.com",
|
"author":"The Phi Technology LLC","author_email":"info@the-phi.com",
|
||||||
"license":"MIT",
|
"license":"MIT",
|
||||||
"packages":["transport"]}
|
"packages":["transport"]}
|
||||||
|
|
|
@ -228,10 +228,11 @@ class BQReader(BigQuery,Reader) :
|
||||||
SQL = SQL.replace(':dataset',self.dataset).replace(':DATASET',self.dataset)
|
SQL = SQL.replace(':dataset',self.dataset).replace(':DATASET',self.dataset)
|
||||||
_info = {'credentials':self.credentials,'dialect':'standard'}
|
_info = {'credentials':self.credentials,'dialect':'standard'}
|
||||||
if 'dtypes' in _args or self.dtypes :
|
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 :
|
if self.dtypes :
|
||||||
_info['dtypes'] = 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
|
# return pd.read_gbq(SQL,credentials=self.credentials,dialect='standard') if SQL else None
|
||||||
class BQWriter(BigQuery,Writer):
|
class BQWriter(BigQuery,Writer):
|
||||||
lock = Lock()
|
lock = Lock()
|
||||||
|
|
Loading…
Reference in New Issue