mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-22 15:32:48 +00:00
This commit is contained in:
parent
3e7e71d10a
commit
fee567d714
@ -90,7 +90,7 @@ def get_columns(
|
|||||||
)
|
)
|
||||||
|
|
||||||
pk_columns = [x[0] for x in connection.execute(spk)]
|
pk_columns = [x[0] for x in connection.execute(spk)]
|
||||||
columns = []
|
columns = {}
|
||||||
for row in connection.execute(sql_query):
|
for row in connection.execute(sql_query):
|
||||||
name = row.column_name
|
name = row.column_name
|
||||||
dtype = row.data_type.lower()
|
dtype = row.data_type.lower()
|
||||||
@ -108,8 +108,9 @@ def get_columns(
|
|||||||
comment,
|
comment,
|
||||||
)
|
)
|
||||||
column_info.update({"primary_key": primary_key})
|
column_info.update({"primary_key": primary_key})
|
||||||
columns.append(column_info)
|
if columns.get(name) is None or comment:
|
||||||
return columns
|
columns[name] = column_info
|
||||||
|
return columns.values()
|
||||||
|
|
||||||
|
|
||||||
def _get_column_info( # pylint: disable=too-many-locals,too-many-branches,too-many-statements
|
def _get_column_info( # pylint: disable=too-many-locals,too-many-branches,too-many-statements
|
||||||
|
Loading…
x
Reference in New Issue
Block a user