Skip to content

Commit 95a5390

Browse files
Fix: Adding Mongo dataset (#98)
1 parent bebad38 commit 95a5390

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlalchemy_drill/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def get_columns(self, connection, table_name, schema=None, **kw):
419419
for row in column_metadata:
420420

421421
# Get rid of precision information in data types
422-
data_type = row[1].lower()
422+
data_type = str(row[1]).lower()
423423
pattern = r"[a-zA-Z]+\(\d+, \d+\)"
424424

425425
if re.search(pattern, data_type):
@@ -445,8 +445,8 @@ def get_columns(self, connection, table_name, schema=None, **kw):
445445
for row in query_results:
446446
column = {
447447
"name": row[0],
448-
"type": self.get_data_type(row[1].lower()),
449-
"longType": self.get_data_type(row[1].lower())
448+
"type": self.get_data_type(str(row[1]).lower()),
449+
"longType": self.get_data_type(str(row[1]).lower())
450450
}
451451
result.append(column)
452452
logging.debug(result)

0 commit comments

Comments
 (0)