From ec11ba8d08c1e91f3683cce8e27987b55e4c1f96 Mon Sep 17 00:00:00 2001 From: Remi Salmon Date: Fri, 13 Jan 2023 12:01:45 -0700 Subject: [PATCH] fix(ingestion): fix mypy errors in metabase source --- metadata-ingestion/src/datahub/ingestion/source/metabase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/metabase.py b/metadata-ingestion/src/datahub/ingestion/source/metabase.py index 4f3a8cd1ee46b0..f623af42ac891f 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/metabase.py +++ b/metadata-ingestion/src/datahub/ingestion/source/metabase.py @@ -1,6 +1,6 @@ from datetime import datetime, timezone from functools import lru_cache -from typing import Dict, Iterable, Optional +from typing import Dict, Iterable, List, Optional import dateutil.parser as dp import pydantic @@ -436,7 +436,7 @@ def construct_card_custom_properties(self, card_details: dict) -> Dict: return custom_properties - def get_datasource_urn(self, card_details: dict): + def get_datasource_urn(self, card_details: dict) -> Optional[List]: ( platform, database_name, @@ -492,7 +492,7 @@ def get_datasource_urn(self, card_details: dict): return None if platform == "snowflake": - source_tables = [i.lower() for i in source_tables] + source_tables = set(i.lower() for i in source_tables) # Create dataset URNs dataset_urn = [