Supserset Connection Changes Doc (#9893)

This commit is contained in:
Mayur Singal 2023-01-25 11:06:00 +05:30 committed by GitHub
parent b3f9e3ba97
commit 74d2132883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 167 additions and 22 deletions

View File

@ -166,16 +166,3 @@ class SupersetAPIClient:
"""
response = self.client.get(f"/database/{database_id}")
return response
def fetch_menu(self):
"""
Check Current User
Args:
No Arguments
Returns:
requests.Response
"""
response = self.client.get("/menu/")
return response

View File

@ -60,7 +60,7 @@ def test_connection(client: Union[SupersetAPIClient, Engine]) -> None:
"""
try:
if isinstance(client, SupersetAPIClient):
client.fetch_menu()
client.fetch_total_dashboards()
else:
test_connection_db_common(client)
except Exception as exc:

View File

@ -22,6 +22,17 @@ custom Airflow plugins to handle the workflow deployment.
The ingestion also works with Superset 2.0.0 🎉
<Note>
**API Connection**: To extract metadata from Superset via API, user must have at least `can read on Chart` & `can read on Dashboard` permissions.
<br/>
**Database Connection**: To extract metadata from Superset via MySQL or Postgres database, database user must have at least `SELECT` priviledge on `dashboards` & `slices` tables within superset schema.
</Note>
### Python Requirements
To run the Superset ingestion, you will need to install:
@ -54,10 +65,27 @@ source:
serviceConnection:
config:
type: Superset
hostPort: http://localhost:8080
username: admin
password: admin
# provider: db (default)
connection:
# For Superset API Connection
hostPort: http://localhost:8080
username: admin
password: admin
provider: db # or provider: ldap
# For MySQL Connection
# type: Mysql
# username: <username>
# password: <password>
# hostPort: <hostPort>
# databaseSchema: superset
# For Postgres Connection
# type: Postgres
# username: username
# password: password
# hostPort: localhost:5432
# database: superset
sourceConfig:
config:
type: DashboardMetadata
@ -91,10 +119,40 @@ workflowConfig:
#### Source Configuration - Service Connection
- **hostPort**: URL to the Superset instance.
- **connection**: Add the connection details to fetch metadata from Superset either through APIs or Database.
<Collapse title="Superset API Connection">
- **username**: Specify the User to connect to Superset. It should have enough privileges to read all the metadata.
- **password**: Password for Superset.
- **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.
</Collapse>
<Collapse title="MySQL Connection">
- **username**: Specify the User to connect to MySQL. It should have enough privileges to read all the metadata.
- **password**: Password to connect to MySQL.
- **hostPort**: Enter the fully qualified hostname and port number for your MySQL deployment in the Host and Port field.
- **Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to MySQL during the connection. These details must be added as Key-Value pairs.
- **Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to MySQL during the connection. These details must be added as Key-Value pairs.
- In case you are using Single-Sign-On (SSO) for authentication, add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "sso_login_url"`
- In case you authenticate with SSO using an external browser popup, then add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "externalbrowser"`
</Collapse>
<Collapse title="Postgres Connection">
- **username**: Specify the User to connect to Postgres. It should have enough privileges to read all the metadata.
- **password**: Password to connect to Postgres.
- **hostPort**: Enter the fully qualified hostname and port number for your Postgres deployment in the Host and Port field.
- **Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to Postgres during the connection. These details must be added as Key-Value pairs.
- **Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to Postgres during the connection. These details must be added as Key-Value pairs.
- In case you are using Single-Sign-On (SSO) for authentication, add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "sso_login_url"`
- In case you authenticate with SSO using an external browser popup, then add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "externalbrowser"`
</Collapse>
#### Source Configuration - Source Config
The `sourceConfig` is defined [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/dashboardServiceMetadataPipeline.json):

View File

@ -22,6 +22,17 @@ custom Airflow plugins to handle the workflow deployment.
The ingestion also works with Superset 2.0.0 🎉
<Note>
**API Connection**: To extract metadata from Superset via API, user must have at least `can read on Chart` & `can read on Dashboard` permissions.
<br/>
**Database Connection**: To extract metadata from Superset via MySQL or Postgres database, database user must have at least `SELECT` priviledge on `dashboards` & `slices` tables within superset schema.
</Note>
### Python Requirements
To run the Superset ingestion, you will need to install:
@ -54,10 +65,27 @@ source:
serviceConnection:
config:
type: Superset
hostPort: http://localhost:8080
username: admin
password: admin
# provider: db (default)
connection:
# For Superset API Connection
hostPort: http://localhost:8080
username: admin
password: admin
provider: db # or provider: ldap
# For MySQL Connection
# type: Mysql
# username: <username>
# password: <password>
# hostPort: <hostPort>
# databaseSchema: superset
# For Postgres Connection
# type: Postgres
# username: username
# password: password
# hostPort: localhost:5432
# database: superset
sourceConfig:
config:
type: DashboardMetadata
@ -90,11 +118,42 @@ workflowConfig:
#### Source Configuration - Service Connection
- **hostPort**: URL to the Superset instance.
- **connection**: Add the connection details to fetch metadata from Superset either through APIs or Database.
<Collapse title="Superset API Connection">
- **username**: Specify the User to connect to Superset. It should have enough privileges to read all the metadata.
- **password**: Password for Superset.
- **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.
</Collapse>
<Collapse title="MySQL Connection">
- **username**: Specify the User to connect to MySQL. It should have enough privileges to read all the metadata.
- **password**: Password to connect to MySQL.
- **hostPort**: Enter the fully qualified hostname and port number for your MySQL deployment in the Host and Port field.
- **Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to MySQL during the connection. These details must be added as Key-Value pairs.
- **Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to MySQL during the connection. These details must be added as Key-Value pairs.
- In case you are using Single-Sign-On (SSO) for authentication, add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "sso_login_url"`
- In case you authenticate with SSO using an external browser popup, then add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "externalbrowser"`
</Collapse>
<Collapse title="Postgres Connection">
- **username**: Specify the User to connect to Postgres. It should have enough privileges to read all the metadata.
- **password**: Password to connect to Postgres.
- **hostPort**: Enter the fully qualified hostname and port number for your Postgres deployment in the Host and Port field.
- **Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to Postgres during the connection. These details must be added as Key-Value pairs.
- **Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to Postgres during the connection. These details must be added as Key-Value pairs.
- In case you are using Single-Sign-On (SSO) for authentication, add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "sso_login_url"`
- In case you authenticate with SSO using an external browser popup, then add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "externalbrowser"`
</Collapse>
#### Source Configuration - Source Config
The `sourceConfig` is defined [here](https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-spec/src/main/resources/json/schema/metadataIngestion/dashboardServiceMetadataPipeline.json):

View File

@ -42,6 +42,16 @@ custom Airflow plugins to handle the workflow deployment.
The ingestion also works with Superset 2.0.0 🎉
<Note>
**API Connection**: To extract metadata from Superset via API, user must have at least `can read on Chart` & `can read on Dashboard` permissions.
<br/>
**Database Connection**: To extract metadata from Superset via MySQL or Postgres database, database user must have at least `SELECT` priviledge on `dashboards` & `slices` tables within superset schema.
</Note>
## Metadata Ingestion
### 1. Visit the Services Page
@ -132,10 +142,41 @@ the changes.
#### Connection Options
- **Host and Port**: URL to the Superset instance.
- **Superset Connection**: Add the connection details to fetch metadata from Superset either through APIs or Database.
<Collapse title="Superset API Connection">
- **Username**: Specify the User to connect to Superset. It should have enough privileges to read all the metadata.
- **Password**: Password for Superset.
- **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.
</Collapse>
<Collapse title="MySQL Connection">
- **Username**: Specify the User to connect to MySQL. It should have enough privileges to read all the metadata.
- **Password**: Password to connect to MySQL.
- **Host and Port**: Enter the fully qualified hostname and port number for your MySQL deployment in the Host and Port field.
- **Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to MySQL during the connection. These details must be added as Key-Value pairs.
- **Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to MySQL during the connection. These details must be added as Key-Value pairs.
- In case you are using Single-Sign-On (SSO) for authentication, add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "sso_login_url"`
- In case you authenticate with SSO using an external browser popup, then add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "externalbrowser"`
</Collapse>
<Collapse title="Postgres Connection">
- **Username**: Specify the User to connect to Postgres. It should have enough privileges to read all the metadata.
- **Password**: Password to connect to Postgres.
- **Host and Port**: Enter the fully qualified hostname and port number for your Postgres deployment in the Host and Port field.
- **Connection Options (Optional)**: Enter the details for any additional connection options that can be sent to Postgres during the connection. These details must be added as Key-Value pairs.
- **Connection Arguments (Optional)**: Enter the details for any additional connection arguments such as security or protocol configs that can be sent to Postgres during the connection. These details must be added as Key-Value pairs.
- In case you are using Single-Sign-On (SSO) for authentication, add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "sso_login_url"`
- In case you authenticate with SSO using an external browser popup, then add the `authenticator` details in the Connection Arguments as a Key-Value pair as follows: `"authenticator" : "externalbrowser"`
</Collapse>
### 6. Configure Metadata Ingestion
In this step we will configure the metadata ingestion pipeline,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 183 KiB