KeyError on Superset dashboard Ingestion
Affected module Ingestion Framework
Describe the bug
A KeyError is thrown here when ingesting Superset dashboards for a database configured using AWS Athena, because database_json["result"]["parameters"] is an empty dictionary.
I replaced database_json["result"]["parameters"]["database"] with "default", as that was the database name used by the metadata ingested from Athena, and that fixed the issue for my particular case.
To Reproduce
Ingest Superset dashboards with an Athena datasource.
Expected behavior
Set database_name as "default" if database_json["result"]["backend"] == "awsathena"
Version:
- OS: Ubuntu
- Python version: 3.10.6
- OpenMetadata version: 0.12.2
- OpenMetadata Ingestion package version: main branch
Additional context
I'm running the ingestion process outside Airflow, with the following script:
from metadata.cli.ingest import run_ingest
run_ingest('superset_ingestion.yaml')
superset_ingestion.yaml:
source:
type: superset
serviceName: local_superset
serviceConnection:
config:
type: Superset
hostPort: <redacted>
username: <redacted>
password: <redacted>
sourceConfig:
config:
type: DashboardMetadata
dbServiceNames:
- local_athena
sink:
type: metadata-rest
config: {}
workflowConfig:
loggerLevel: DEBUG
openMetadataServerConfig:
hostPort: http://localhost:8585/api
authProvider: openmetadata
securityConfig:
jwtToken: <redacted>
@aniketkatkar97 is this still an issue?
cc: @open-metadata/ingestion
i believe superset changed their api and the database parameters are now found in a new endpoint https://api-docs.preset.io/#67c82d2d-d893-4aa5-affa-960690ecf4bf
@ulixius9 we can use this PR https://github.com/open-metadata/OpenMetadata/pull/12183 to review if this is still happening or if its been taken care of in the new changes
closing this ticket as we validated the same with latest version of superset and with #12183 we do not notice this issue!