bug fix
This commit is contained in:
parent
aaaf64db33
commit
74d8b2c6f2
2
setup.py
2
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.7.2",
|
||||
"version":"1.7.4",
|
||||
"author":"The Phi Technology LLC","author_email":"info@the-phi.com",
|
||||
"license":"MIT",
|
||||
"packages":["transport"]}
|
||||
|
|
|
@ -380,12 +380,14 @@ class BigQuery:
|
|||
:param table name of the name WITHOUT including dataset
|
||||
:param sql sql query to be pulled,
|
||||
"""
|
||||
table = _args['table']
|
||||
table = _args['table'] if 'table' in _args else self.table
|
||||
try:
|
||||
if table :
|
||||
ref = self.client.dataset(self.dataset).table(table)
|
||||
_schema = self.client.get_table(ref).schema
|
||||
return [{"name":_item.name,"type":_item.field_type,"description":( "" if not hasattr(_item,"description") else _item.description )} for _item in _schema]
|
||||
|
||||
else :
|
||||
return []
|
||||
except Exception as e:
|
||||
return []
|
||||
def has(self,**_args):
|
||||
|
|
Loading…
Reference in New Issue