OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

KeyError on Superset dashboard Ingestion

Open a-cid opened this issue 4 years ago • 5 comments

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>

a-cid avatar Nov 04 '22 15:11 a-cid

@aniketkatkar97 is this still an issue?

sureshms avatar Jun 28 '23 18:06 sureshms

cc: @open-metadata/ingestion

aniketkatkar97 avatar Jun 29 '23 02:06 aniketkatkar97

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

stephanesol avatar Jul 11 '23 14:07 stephanesol

@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

pmbrull avatar Jul 12 '23 05:07 pmbrull

closing this ticket as we validated the same with latest version of superset and with #12183 we do not notice this issue!

ulixius9 avatar Jul 13 '23 08:07 ulixius9