diff --git a/metadata-ingestion/src/datahub/ingestion/source/dbt/dbt_common.py b/metadata-ingestion/src/datahub/ingestion/source/dbt/dbt_common.py index b2d93b2e0fd6f..d7a3aba7065ca 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/dbt/dbt_common.py +++ b/metadata-ingestion/src/datahub/ingestion/source/dbt/dbt_common.py @@ -795,14 +795,17 @@ def make_mapping_upstream_lineage( def get_column_type( - report: DBTSourceReport, dataset_name: str, column_type: str, dbt_adapter: str + report: DBTSourceReport, + dataset_name: str, + column_type: Optional[str], + dbt_adapter: str, ) -> SchemaFieldDataType: """ Maps known DBT types to datahub types """ - TypeClass: Any = _field_type_mapping.get(column_type) + TypeClass: Any = _field_type_mapping.get(column_type) if column_type else None - if TypeClass is None: + if TypeClass is None and column_type: # resolve a modified type if dbt_adapter == "trino": TypeClass = resolve_trino_modified_type(column_type) @@ -934,12 +937,14 @@ def get_workunit_processors(self) -> List[Optional[MetadataWorkUnitProcessor]]: def _make_data_platform_instance_aspect(self) -> DataPlatformInstanceClass: return DataPlatformInstanceClass( platform=mce_builder.make_data_platform_urn(DBT_PLATFORM), - instance=mce_builder.make_dataplatform_instance_urn( - mce_builder.make_data_platform_urn(DBT_PLATFORM), - self.config.platform_instance, - ) - if self.config.platform_instance - else None, + instance=( + mce_builder.make_dataplatform_instance_urn( + mce_builder.make_data_platform_urn(DBT_PLATFORM), + self.config.platform_instance, + ) + if self.config.platform_instance + else None + ), ) def get_workunits_internal(self) -> Iterable[MetadataWorkUnit]: @@ -1809,9 +1814,9 @@ def _translate_dbt_name_to_upstream_urn(dbt_name: str) -> str: ) for upstream in upstream_urns ], - fineGrainedLineages=(cll or None) - if self.config.include_column_lineage - else None, + fineGrainedLineages=( + (cll or None) if self.config.include_column_lineage else None + ), ) # This method attempts to read-modify and return the owners of a dataset. diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_types.py b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_types.py index dedb6eedd5ee4..8ea4209784063 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_types.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_types.py @@ -79,6 +79,7 @@ "regtype": None, "regrole": None, "regnamespace": None, + "super": None, "uuid": StringType, "pg_lsn": None, "tsvector": None, # text search vector