Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix superset docs and pin conflicting dependency #1169

Merged
merged 3 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _data/default_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -598,4 +598,4 @@ utilities:
notebook: matatika
postgres: postgres
sqlfluff: sqlfluff
superset: apache
superset: meltano
4 changes: 2 additions & 2 deletions _data/meltano/utilities/superset/apache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ next_steps: |
utilities:
- name: superset
variant: apache
pip_url: apache-superset==1.5.0 snowflake-sqlalchemy
pip_url: apache-superset==1.5.0 markupsafe==2.0.1 cryptography==3.4.7 snowflake-sqlalchemy
```
3. Re-install the plugin:

Expand All @@ -76,7 +76,7 @@ next_steps: |
```

Now when you (re)start Superset, you will be able to connect to a new type of database, like Snowflake in the example.
pip_url: apache-superset==1.5.0 markupsafe==2.0.1
pip_url: apache-superset==1.5.0 markupsafe==2.0.1 cryptography==3.4.7
prereq: |
#### Dependencies

Expand Down
19 changes: 10 additions & 9 deletions _data/meltano/utilities/superset/meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ next_steps: |

```sh
# create a new secret key
meltano config superset_ext set SECRET_KEY $(openssl rand -base64 42)
meltano config superset set SECRET_KEY $(openssl rand -base64 42)
# create the initial config, database, and auth roles.
meltano invoke superset_ext:initialize
meltano invoke superset:initialize
```
2. Create an admin user: (use `admin` as username to be able to load the examples)

```sh
# add a superset admin using prompting for required values
meltano invoke superset_ext:create-admin
meltano invoke superset:create-admin
```

This is equivalent to `superset fab create-admin` in the Superset documentation

3. Optionally, load some example data to play with:

```sh
meltano invoke superset_ext:load-examples
meltano invoke superset:load-examples
```

This is equivalent to `superset load_examples` in the Superset documentation
Expand All @@ -66,7 +66,7 @@ next_steps: |
4. Launch the Superset UI and log in using the username/password you created:

```sh
meltano invoke superset_ext:ui
meltano invoke superset:ui
```

By default, the UI will be available at at [`http://localhost:8088`](http://localhost:8088). You can change this using the `ui.bind_host` and `ui.port` settings documented below.
Expand All @@ -78,24 +78,25 @@ next_steps: |
You can find the list of supported databases and the appropriate PyPI (pip) packages in the [Supported Databases and Dependencies](https://superset.apache.org/docs/databases/installing-database-drivers#supported-databases-and-dependencies) section in the Superset documenation. These can then be added to your Meltano project by configuring
a custom `pip_url` for the `superset` utility:

1. Find the `superset_ext` plugin definition in your `meltano.yml` project file
1. Find the `superset` plugin definition in your `meltano.yml` project file
2. Update the `pip_url` property to include the desired additional packages:

```yaml
utilities:
- name: superset
variant: apache
pip_url: apache-superset==2.0.0 flask==2.0.3 werkzeug==2.0.3 jinja2==3.0.1 wtforms==2.3.3 git+https://github.com/meltano/superset-ext.git@main snowflake-sqlalchemy
pip_url: apache-superset==2.0.0 flask==2.0.3 werkzeug==2.0.3 jinja2==3.0.1 wtforms==2.3.3
git+https://github.com/meltano/superset-ext.git@main cryptography==3.4.7
```
3. Re-install the plugin:

```sh
meltano install utility superset_ext
meltano install utility superset
```

Now when you (re)start Superset, you will be able to connect to a new type of database, like Snowflake in the example.
pip_url: apache-superset==2.0.0 flask==2.0.3 werkzeug==2.0.3 jinja2==3.0.1 wtforms==2.3.3
git+https://github.com/meltano/superset-ext.git@main
git+https://github.com/meltano/superset-ext.git@main cryptography==3.4.7
repo: https://github.com/apache/superset
settings:
- description: Host used by `meltano invoke superset:ui`. Used in the `gunicorn` `--bind`
Expand Down