Skip to content

Commit

Permalink
fix: changed query to show output in lowercase (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: kay_alave <kay.alave@gmail.com>
Co-authored-by: Lucas Roesler <roesler.lucas@gmail.com>
  • Loading branch information
3 people authored Jun 19, 2023
1 parent 037d6c8 commit 99607ba
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions datahub_sap_hana/ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
# Object dependencies in SAP HANA https://help.sap.com/docs/SAP_HANA_PLATFORM/de2486ee947e43e684d39702027f8a94/5ce9a6584eb84f10afbbf2b133534932.html
LINEAGE_QUERY = """
SELECT
BASE_OBJECT_NAME as source_table,
BASE_SCHEMA_NAME as source_schema,
DEPENDENT_OBJECT_NAME as dependent_view,
DEPENDENT_SCHEMA_NAME as dependent_schema
LOWER(BASE_OBJECT_NAME) as source_table,
LOWER(BASE_SCHEMA_NAME) as source_schema,
LOWER(DEPENDENT_OBJECT_NAME) as dependent_view,
LOWER(DEPENDENT_SCHEMA_NAME) as dependent_schema
from SYS.OBJECT_DEPENDENCIES
WHERE
DEPENDENT_OBJECT_TYPE = 'TABLE'
Expand Down Expand Up @@ -130,12 +130,16 @@ def _get_view_lineage_elements(self) -> Dict[Tuple[str, str], List[str]]:
self.report.report_dropped(
f"{lineage.dependent_schema}.{lineage.dependent_view}"
)
logger.debug(
f"View pattern is incompatible, dropping: {lineage.dependent_schema}.{lineage.dependent_view}")
continue

if not self.config.schema_pattern.allowed(lineage.dependent_schema):
self.report.report_dropped(
f"{lineage.dependent_schema}.{lineage.dependent_view}"
)
logger.debug(
f"Schema pattern is incompatible, dropping: {lineage.dependent_schema}.{lineage.dependent_view}")
continue

key = (lineage.dependent_view, lineage.dependent_schema)
Expand Down

0 comments on commit 99607ba

Please sign in to comment.