Prerequisites & Requirements
Relevant source files
The following files were used as context for generating this wiki page:
The superset-ext is a Meltano utility extension designed to wrap and manage Apache Superset within a Meltano project ecosystem. It acts as an orchestration layer, handling configuration generation, database initialization, and administrative user management.
This page outlines the environment specifications, software dependencies, and configuration requirements necessary to successfully install and operate the extension.
Sources: README.md:1-5, pyproject.toml:1-10, superset_ext/extension.py:22-25
Software Dependencies
The extension relies on specific Python versions and a set of core libraries for logging, configuration parsing, and CLI management. It also utilizes the Meltano Extension Development Kit (EDK).
Python Runtime
- Version: The project requires Python version
>=3.7but strictly less than3.11.
Sources: pyproject.toml:12
Core Dependencies
| Dependency | Version | Purpose |
|---|---|---|
meltano.edk | v0.1.0 (Git) | Core framework for Meltano extensions. |
structlog | ^21.2.0 | Structured logging for extension operations. |
PyYAML | ^6.0.0 | Parsing YAML configuration files. |
pydantic | ^1.9.0 | Data validation and settings management. |
click / typer | ^8.1.3 / ^0.6.1 | Building the Command Line Interface (CLI). |
apache-superset | 2.0.0 | The primary application being wrapped. |
Sources: pyproject.toml:13-19, README.md:13
System Requirements
Environment Variables
The extension dynamically builds its configuration by filtering environment variables. It specifically looks for variables prefixed with SUPERSET_.
The diagram shows how the extension extracts configuration from the host environment to generate the Superset configuration file.
Sources: superset_ext/extension.py:20-40, superset_ext/utils.py:46-55
Installation Considerations
The installation of Apache Superset 2.0 via pip is resource-intensive. Users should expect a longer installation time, approximately 10 minutes, compared to standard Meltano extensions.
Sources: README.md:38
Configuration Requirements
The extension manages a superset_config.py file, which is critical for the Superset application to run. If not explicitly provided, it defaults to certain project paths within the Meltano project root.
Default Paths & Settings
| Requirement | Default Value / Source |
|---|---|
| Project Root | Inherited from MELTANO_PROJECT_ROOT |
| Superset Home | $MELTANO_PROJECT_ROOT/.meltano/utilities/superset |
| Config Path | $MELTANO_PROJECT_ROOT/analyze/superset/superset_config.py |
| Database URI | sqlite:///$SUPERSET_HOME/superset.db |
| Flask App | superset |
Sources: superset_ext/utils.py:84-114, superset_ext/extension.py:44-48
Critical Secrets
Before initialization, a SECRET_KEY must be configured. This is mandatory for Superset's Flask-based security and session management.
Sources: README.md:46
Operational Initialization
The extension requires a specific sequence of commands to prepare the environment after dependencies are installed.
This diagram illustrates the initialization flow required before the UI can be served.
Sources: superset_ext/extension.py:50-89, README.md:49-52
Required Initialization Steps:
- Configuration Writing: Generates the Python configuration file using environment variables.
- Database Migration: Runs
superset db upgradeto set up the schema. - App Initialization: Runs
superset initfor default metadata. - Security Setup: Runs
fab create-permissionsto populate the RBAC system. - Admin Creation: An administrative user must be created via the
create-admincommand to access the UI.
Sources: superset_ext/extension.py:65-85, superset_ext/main.py:46-81
Conclusion
The superset-ext requires a Python 3.7-3.10 environment and a pre-configured SECRET_KEY. Successful deployment depends on the initialize command which orchestrates the filesystem setup and database migrations necessary for Apache Superset to function within the Meltano utility framework.
Sources: README.md:38-55, superset_ext/extension.py:50-55