Unlock the feature flag by creating and persisting the superset_config.py in Apache Superset

Create and persist superset configuration to unlock feature flag

Superset Configuration with superset_config and work with superset feature flag

Superset optimization superset tutorial superset feature flag open-source BI tools configure Superset without Docker Superset for beginners enable Superset features custom Superset config Superset configuration basics Superset advanced setup Superset performance tuning Python BI setup data dashboard tools Python config apache-superset

Apache Superset is a powerful data exploration platform, and configuring it properly is key to unlocking its full potential. Superset comes with many features by default, but not all are enabled out of the box. Today, Iโ€™ll walk you through the process of unlocking hidden Superset features by creating and persisting a custom configuration file.


๐Ÿ“ Where Is the Superset Configuration File Located?

If you've installed Superset via pip or followed my guide Install Apache Superset on Ubuntu without Docker, the default configuration is located here:

env/lib/python3.10/site-packages/superset/config.py

โš ๏ธ Note: You should not modify this file directly, as itโ€™s part of the package. Instead, weโ€™ll create a new configuration file in your virtual environment directory.


๐Ÿ”ง What Is superset_config.py?

superset_config.py is an optional file where you can override and customize Superset's default settings. With this file, you can:

  • Enable hidden or experimental features
  • Customize the application name or branding
  • Set debug options
  • Configure database connections
  • Control row limits, security, themes, and more

By default, Superset only uses the internal config unless you explicitly tell it to load a custom one.


โœ… Action Plan

We'll complete the setup in four simple steps:

  1. Create your configuration file
  2. Tell Superset to load it
  3. Persist the configuration
  4. Verify the setup

Apache Superset Configuration Process

โœ… Step 1: Create Your Custom Config File

Inside your Superset virtual environment or project directory, run:

touch superset_config.py

apache-superset-configuration-file

Then open it and add your custom settings. Example:

# superset_config.py

FEATURE_FLAGS = {
    "THUMBNAILS": True,
    "ENABLE_IMPORT_EXPORT": True,
    "HORIZONTAL_FILTER_BAR": True,
    "ENABLE_ECHARTS_FILTER_CONTROL": True
}

DEBUG = True
APP_NAME = "Superset Custom"

๐Ÿ“ Note: Creating this file alone wonโ€™t activate the settings. You need to tell Superset to load it.


โœ… Step 2: Tell Superset to Load This File

Superset only reads superset_config.py if the folder containing it is in the PYTHONPATH environment variable.

To test it temporarily:

export PYTHONPATH=/full/path/to/your/config
superset run

This works for one session. To make it persistent, move to step 3.


๐Ÿ” Step 3: Persist PYTHONPATH (Virtualenv Friendly)

To make Superset always load your config when the environment is activated:

nano env/bin/activate

At the bottom of the file, add:

# Load custom Superset config
export PYTHONPATH="/path to your config"

Example: location-of-superset-config-file-for-pythonpath-variable

Now, whenever you run:

source env/bin/activate

Superset will automatically detect your custom config.


โœ… Step 4: Verify Itโ€™s Working

To confirm itโ€™s loading:

  1. Add a print line in your superset_config.py:
    print(">>> Custom Superset Config Loaded <<<")
  2. Reactivate the environment and run Superset:
    source env/bin/activate
    superset run
  3. You should see the print message in the terminal.

๐Ÿงฉ Bonus: Useful Configuration Options

You can further enhance Superset with these options:

ROW_LIMIT = 10000
SQLLAB_ASYNC_TIME_LIMIT_SEC = 60
ENABLE_JAVASCRIPT_CONTROLS = True

Explore the full range of configuration options in Superset's official documentation.