|
21 | 21 | from datahub.ingestion.source.aws.s3_util import make_s3_urn_for_lineage
|
22 | 22 | from datahub.ingestion.source.common.subtypes import (
|
23 | 23 | DatasetContainerSubTypes,
|
24 |
| - DatasetSubTypes, |
25 | 24 | )
|
26 | 25 | from datahub.ingestion.source.snowflake.constants import (
|
27 | 26 | GENERIC_PERMISSION_ERROR_KEY,
|
@@ -467,7 +466,13 @@ def _process_schema(
|
467 | 466 | context=f"{db_name}.{schema_name}",
|
468 | 467 | )
|
469 | 468 |
|
470 |
| - def _process_tags(self, snowflake_schema, schema_name, db_name, domain): |
| 469 | + def _process_tags( |
| 470 | + self, |
| 471 | + snowflake_schema: SnowflakeSchema, |
| 472 | + schema_name: str, |
| 473 | + db_name: str, |
| 474 | + domain: str, |
| 475 | + ) -> None: |
471 | 476 | snowflake_schema.tags = self.tag_extractor.get_tags_on_object(
|
472 | 477 | schema_name=schema_name, db_name=db_name, domain=domain
|
473 | 478 | )
|
@@ -837,15 +842,7 @@ def gen_dataset_workunits(
|
837 | 842 | if dpi_aspect:
|
838 | 843 | yield dpi_aspect
|
839 | 844 |
|
840 |
| - subTypes = SubTypes( |
841 |
| - typeNames=( |
842 |
| - [DatasetSubTypes.SNOWFLAKE_STREAM] |
843 |
| - if isinstance(table, SnowflakeStream) |
844 |
| - else [DatasetSubTypes.VIEW] |
845 |
| - if isinstance(table, SnowflakeView) |
846 |
| - else [DatasetSubTypes.TABLE] |
847 |
| - ) |
848 |
| - ) |
| 845 | + subTypes = SubTypes(typeNames=[table.get_subtype()]) |
849 | 846 |
|
850 | 847 | yield MetadataChangeProposalWrapper(
|
851 | 848 | entityUrn=dataset_urn, aspect=subTypes
|
@@ -932,9 +929,9 @@ def get_dataset_properties(
|
932 | 929 | "OWNER_ROLE_TYPE": table.owner_role_type,
|
933 | 930 | "TABLE_NAME": table.table_name,
|
934 | 931 | "BASE_TABLES": table.base_tables,
|
935 |
| - "STALE_AFTER": table.stale_after.isoformat() |
936 |
| - if table.stale_after |
937 |
| - else None, |
| 932 | + "STALE_AFTER": ( |
| 933 | + table.stale_after.isoformat() if table.stale_after else None |
| 934 | + ), |
938 | 935 | }.items()
|
939 | 936 | if v
|
940 | 937 | }
|
|
0 commit comments