mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 19:58:59 +00:00
fix(ingest/db2): fix handling for table properties (#9128)
Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
This commit is contained in:
parent
50789224a1
commit
f7cd80283a
@ -20,6 +20,7 @@ from typing import (
|
|||||||
import sqlalchemy.dialects.postgresql.base
|
import sqlalchemy.dialects.postgresql.base
|
||||||
from sqlalchemy import create_engine, inspect
|
from sqlalchemy import create_engine, inspect
|
||||||
from sqlalchemy.engine.reflection import Inspector
|
from sqlalchemy.engine.reflection import Inspector
|
||||||
|
from sqlalchemy.engine.row import LegacyRow
|
||||||
from sqlalchemy.exc import ProgrammingError
|
from sqlalchemy.exc import ProgrammingError
|
||||||
from sqlalchemy.sql import sqltypes as types
|
from sqlalchemy.sql import sqltypes as types
|
||||||
from sqlalchemy.types import TypeDecorator, TypeEngine
|
from sqlalchemy.types import TypeDecorator, TypeEngine
|
||||||
@ -784,7 +785,7 @@ class SQLAlchemySource(StatefulIngestionSourceBase):
|
|||||||
table_info: dict = inspector.get_table_comment(table, f'"{schema}"') # type: ignore
|
table_info: dict = inspector.get_table_comment(table, f'"{schema}"') # type: ignore
|
||||||
|
|
||||||
description = table_info.get("text")
|
description = table_info.get("text")
|
||||||
if type(description) is tuple:
|
if isinstance(description, LegacyRow):
|
||||||
# Handling for value type tuple which is coming for dialect 'db2+ibm_db'
|
# Handling for value type tuple which is coming for dialect 'db2+ibm_db'
|
||||||
description = table_info["text"][0]
|
description = table_info["text"][0]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user