mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 12:39:01 +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.
|
||||
"""Db2 source module"""
|
||||
import traceback
|
||||
from typing import Optional
|
||||
from typing import Iterable, Optional
|
||||
|
||||
from ibm_db_sa.base import ischema_names
|
||||
from sqlalchemy.engine.reflection import Inspector
|
||||
@ -52,6 +52,13 @@ class Db2Source(CommonDbSourceService):
|
||||
)
|
||||
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
|
||||
def get_table_description(
|
||||
schema_name: str, table_name: str, inspector: Inspector
|
||||
|
Loading…
x
Reference in New Issue
Block a user