mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-07 00:28:02 +00:00
Fix view lineage not generated for oracle (#11648)
This commit is contained in:
parent
22cf1d7b5f
commit
8ef98076ae
@ -37,7 +37,6 @@ from metadata.ingestion.source.database.oracle.utils import (
|
||||
_get_col_type,
|
||||
get_columns,
|
||||
get_mview_definition,
|
||||
get_mview_definition_dialect,
|
||||
get_mview_names,
|
||||
get_mview_names_dialect,
|
||||
get_table_comment,
|
||||
@ -65,7 +64,6 @@ OracleDialect.get_table_comment = get_table_comment
|
||||
OracleDialect.get_columns = get_columns
|
||||
OracleDialect._get_col_type = _get_col_type
|
||||
OracleDialect.get_view_definition = get_view_definition
|
||||
OracleDialect.get_mview_definition = get_mview_definition_dialect
|
||||
OracleDialect.get_all_view_definitions = get_all_view_definitions
|
||||
OracleDialect.get_all_table_comments = get_all_table_comments
|
||||
OracleDialect.get_table_names = get_table_names
|
||||
|
@ -29,9 +29,7 @@ LOWER(owner) AS "schema",
|
||||
DBMS_METADATA.GET_DDL('VIEW', view_name, owner) AS view_def
|
||||
FROM all_views
|
||||
WHERE owner NOT IN ('SYSTEM', 'SYS')
|
||||
"""
|
||||
|
||||
ORACLE_ALL_MATERIALIZED_VIEW_DEFINITIONS = """
|
||||
UNION ALL
|
||||
SELECT
|
||||
LOWER(mview_name) AS "view_name",
|
||||
LOWER(owner) AS "schema",
|
||||
|
@ -21,7 +21,6 @@ from sqlalchemy.sql import sqltypes
|
||||
|
||||
from metadata.ingestion.source.database.oracle.queries import (
|
||||
GET_MATERIALIZED_VIEW_NAMES,
|
||||
ORACLE_ALL_MATERIALIZED_VIEW_DEFINITIONS,
|
||||
ORACLE_ALL_TABLE_COMMENTS,
|
||||
ORACLE_ALL_VIEW_DEFINITIONS,
|
||||
ORACLE_GET_COLUMNS,
|
||||
@ -73,26 +72,6 @@ def get_view_definition(
|
||||
)
|
||||
|
||||
|
||||
@reflection.cache
|
||||
def get_mview_definition_dialect(
|
||||
self,
|
||||
connection,
|
||||
view_name: str,
|
||||
schema: str = None,
|
||||
resolve_synonyms=False,
|
||||
dblink="",
|
||||
**kw,
|
||||
):
|
||||
|
||||
return get_view_definition_wrapper(
|
||||
self,
|
||||
connection,
|
||||
table_name=view_name.lower(),
|
||||
schema=schema.lower() if schema else None,
|
||||
query=ORACLE_ALL_MATERIALIZED_VIEW_DEFINITIONS,
|
||||
)
|
||||
|
||||
|
||||
def _get_col_type(
|
||||
self, coltype, precision, scale, length, colname
|
||||
): # pylint: disable=too-many-branches
|
||||
@ -274,6 +253,6 @@ def get_mview_definition(self, mview_name, schema=None):
|
||||
"""
|
||||
|
||||
with self._operation_context() as conn:
|
||||
return self.dialect.get_mview_definition(
|
||||
return self.dialect.get_view_definition(
|
||||
conn, mview_name, schema, info_cache=self.info_cache
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user