diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/athena.py b/metadata-ingestion/src/datahub/ingestion/source/sql/athena.py index 04e3ce9cab..4b03990341 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/athena.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/athena.py @@ -217,7 +217,12 @@ class AthenaSource(SQLAlchemySource): def get_database_container_key(self, db_name: str, schema: str) -> PlatformKey: # Because our overridden get_allowed_schemas method returns db_name as the schema name, # the db_name and schema here will be the same. Hence, we just ignore the schema parameter. - assert db_name == schema + # Based on community feedback, db_name only available if it is explicitly specified in the connection string. + # If it is not available then we should use schema as db_name + + if not db_name: + db_name = schema + return gen_database_key( db_name, platform=self.platform,