mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 05:03:10 +00:00
Fix DB2 Schema Trailing Whitespaces (#17475)
This commit is contained in:
parent
3ad096a889
commit
ddd8c41864
@ -10,7 +10,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
"""Db2 source module"""
|
"""Db2 source module"""
|
||||||
import traceback
|
import traceback
|
||||||
from typing import Optional
|
from typing import Iterable, Optional
|
||||||
|
|
||||||
from ibm_db_sa.base import ischema_names
|
from ibm_db_sa.base import ischema_names
|
||||||
from sqlalchemy.engine.reflection import Inspector
|
from sqlalchemy.engine.reflection import Inspector
|
||||||
@ -52,6 +52,13 @@ class Db2Source(CommonDbSourceService):
|
|||||||
)
|
)
|
||||||
return cls(config, metadata)
|
return cls(config, metadata)
|
||||||
|
|
||||||
|
def get_raw_database_schema_names(self) -> Iterable[str]:
|
||||||
|
if self.service_connection.__dict__.get("databaseSchema"):
|
||||||
|
yield self.service_connection.databaseSchema
|
||||||
|
else:
|
||||||
|
for schema_name in self.inspector.get_schema_names():
|
||||||
|
yield schema_name.rstrip()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_table_description(
|
def get_table_description(
|
||||||
schema_name: str, table_name: str, inspector: Inspector
|
schema_name: str, table_name: str, inspector: Inspector
|
||||||
|
Loading…
x
Reference in New Issue
Block a user