Skip to content

Commit

Permalink
Fix column discover in mysql adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
kimakan committed Dec 10, 2024
1 parent d30829b commit 3f0db9c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions daiquiri/core/adapter/database/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,15 @@ def fetch_column(self, schema_name, table_name, column_name):
logger.error('Could not fetch %s.%s.%s (%s)', schema_name, table_name, column_name, e)
return {}
else:
return {
'name': row[0],
'datatype': row[1],
'indexed': bool(row[4])
}
if row is None:
logger.info(f'Could not fetch {schema_name}.{table_name}.{column_name}. Check if column, table and schema exist.')
return {}
else:
return {
'name': row[0],
'datatype': row[1],
'indexed': bool(row[4])
}

def fetch_column_names(self, schema_name, table_name):
# prepare sql string
Expand Down

0 comments on commit 3f0db9c

Please sign in to comment.