diff --git a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json index 32330da0dd4..656a0f07e3f 100644 --- a/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json +++ b/catalog-rest-service/src/main/resources/json/schema/entity/services/connections/dashboard/supersetConnection.json @@ -41,7 +41,7 @@ }, "provider": { "title": "Provider", - "description": "Authentication provider for the Superset service.", + "description": "Authentication provider for the Superset service. For basic user/password authentication, the default value `db` can be used. This parameter is used internally to connect to Superset's REST API.", "type": "string", "default": "db" }, diff --git a/ingestion/src/metadata/ingestion/ometa/superset_rest.py b/ingestion/src/metadata/ingestion/ometa/superset_rest.py index 0a3846b29e4..d5469fe51ea 100644 --- a/ingestion/src/metadata/ingestion/ometa/superset_rest.py +++ b/ingestion/src/metadata/ingestion/ometa/superset_rest.py @@ -13,6 +13,9 @@ REST Auth & Client for Apache Superset """ import json +from metadata.generated.schema.entity.services.connections.dashboard.supersetConnection import ( + SupersetConnection, +) from metadata.generated.schema.metadataIngestion.workflow import ( Source as WorkflowSource, ) @@ -28,7 +31,7 @@ class SupersetAuthenticationProvider(AuthenticationProvider): Handle SuperSet Auth """ - def __init__(self, config: WorkflowSource): + def __init__(self, config: SupersetConnection): self.config = config self.service_connection = self.config client_config = ClientConfig( @@ -44,10 +47,10 @@ class SupersetAuthenticationProvider(AuthenticationProvider): super().__init__() @classmethod - def create(cls, config: WorkflowSource): + def create(cls, config: SupersetConnection): return cls(config) - def auth_token(self) -> str: + def auth_token(self) -> None: login_request = self._login_request() login_response = self.client.post("/security/login", login_request) self.generated_auth_token = login_response["access_token"] @@ -64,7 +67,7 @@ class SupersetAuthenticationProvider(AuthenticationProvider): def get_access_token(self): self.auth_token() - return (self.generated_auth_token, self.expiry) + return self.generated_auth_token, self.expiry class SupersetAPIClient: @@ -75,7 +78,7 @@ class SupersetAPIClient: client: REST _auth_provider: AuthenticationProvider - def __init__(self, config: WorkflowSource): + def __init__(self, config: SupersetConnection): self.config = config self._auth_provider = SupersetAuthenticationProvider.create(config) client_config = ClientConfig( @@ -89,7 +92,7 @@ class SupersetAPIClient: def fetch_total_dashboards(self) -> int: """ - Fetch total dahsboard + Fetch total dashboard Returns: int diff --git a/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/airflow.md b/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/airflow.md index 4e578b916e3..5729622901a 100644 --- a/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/airflow.md +++ b/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/airflow.md @@ -20,6 +20,5 @@ We have tested Metabase with version -- 0.42.4 and version -- 0.43.4 - **hostPort**: URL to the Metabase instance. - **username**: Specify the User to connect to Metabase. It should have enough privileges to read all the metadata. - **password**: Password for Metabase. -- **dbServiceName**: Optionally, add the name of the database service to add lineage. diff --git a/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/cli.md b/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/cli.md index fb377e53b14..fb637def64a 100644 --- a/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/cli.md +++ b/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/cli.md @@ -20,6 +20,5 @@ We have tested Metabase with version -- 0.42.4 and version -- 0.43.4 - **hostPort**: URL to the Metabase instance. - **username**: Specify the User to connect to Metabase. It should have enough privileges to read all the metadata. - **password**: Password for Metabase. -- **dbServiceName**: Optionally, add the name of the database service to add lineage. diff --git a/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/index.md b/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/index.md index 4408c1dbab3..92b89ead63e 100644 --- a/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/index.md +++ b/openmetadata-docs/content/openmetadata/connectors/dashboard/metabase/index.md @@ -14,7 +14,6 @@ slug: /openmetadata/connectors/dashboard/metabase - **Host and Port**: URL to the Metabase instance. - **Username**: Specify the User to connect to Metabase. It should have enough privileges to read all the metadata. - **Password**: Password for Metabase. -- **Database Service Name**: Optionally, add the name of the database service to add lineage. diff --git a/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/airflow.md b/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/airflow.md index 6a3d45b9564..476fe1f6dfc 100644 --- a/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/airflow.md +++ b/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/airflow.md @@ -7,6 +7,8 @@ slug: /openmetadata/connectors/dashboard/superset/airflow +The ingestion also works with Superset 2.0.0 🎉 + @@ -16,6 +18,6 @@ slug: /openmetadata/connectors/dashboard/superset/airflow - **hostPort**: URL to the Superset instance. - **username**: Specify the User to connect to Superset. It should have enough privileges to read all the metadata. - **password**: Password for Superset. -- **dbServiceName**: Optionally, add the name of the database service to add lineage. +- **provider**: Authentication provider for the Superset service. For basic user/password authentication, the default value `db` can be used. This parameter is used internally to connect to Superset's REST API. diff --git a/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/cli.md b/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/cli.md index 17f5d4e75dd..3b838b9b846 100644 --- a/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/cli.md +++ b/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/cli.md @@ -7,6 +7,8 @@ slug: /openmetadata/connectors/dashboard/superset/cli +The ingestion also works with Superset 2.0.0 🎉 + @@ -16,6 +18,6 @@ slug: /openmetadata/connectors/dashboard/superset/cli - **hostPort**: URL to the Superset instance. - **username**: Specify the User to connect to Superset. It should have enough privileges to read all the metadata. - **password**: Password for Superset. -- **dbServiceName**: Optionally, add the name of the database service to add lineage. +- **provider**: Authentication provider for the Superset service. For basic user/password authentication, the default value `db` can be used. This parameter is used internally to connect to Superset's REST API. diff --git a/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/index.md b/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/index.md index bdd62989844..2995a7760cf 100644 --- a/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/index.md +++ b/openmetadata-docs/content/openmetadata/connectors/dashboard/superset/index.md @@ -7,6 +7,8 @@ slug: /openmetadata/connectors/dashboard/superset +The ingestion also works with Superset 2.0.0 🎉 +

Connection Options

@@ -14,7 +16,7 @@ slug: /openmetadata/connectors/dashboard/superset - **Host and Port**: URL to the Superset instance. - **Username**: Specify the User to connect to Superset. It should have enough privileges to read all the metadata. - **Password**: Password for Superset. -- **Database Service Name**: Optionally, add the name of the database service to add lineage. +- **Provider**: Authentication provider for the Superset service. For basic user/password authentication, the default value `db` can be used. This parameter is used internally to connect to Superset's REST API.