Superset installation and MariaDB setup


1. sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev

2. mkdir superset

3. cd superset/

4. python3 -m venv venv

5. . venv/bin/activate

6. pip install apache-superset

  1. vi superset_config.py

Paste the below lines inside the file and instead of “YOUR_OWN_RANDOM_GENERATED_SECRET_KEY”

C:\Users\TFS-0053\Desktop\2024-04-22 11_00_45-Microsoft Store.png


change to some hard random strings such as “T!F@S#!)^S$U$P%E^R&S*E(T” and instead of

“sqlite:////path/to/superset.db?check_same_thread=false” change the url to

“mysql+pymysql://db_user:db_password@db_host:db_port/database” --> this Is for mariadb

# Superset specific config

ROW_LIMIT = 5000

# Flask App Builder configuration

# Your App secret key will be used for securely signing the session cookie

# and encrypting sensitive information on the database

# Make sure you are changing this key for your deployment with a strong key.

# Alternatively you can set it with SUPERSET_SECRET_KEY environment variable.

# You MUST set this for production environments or the server will refuse

# to start and you will see an error in the logs accordingly.

SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'

# The SQLAlchemy connection string to your database backend

# This connection defines the path to the database that stores your

# superset metadata (slices, connections, tables, dashboards, ...).

# Note that the connection information to connect to the datasources

# you want to explore are managed directly in the web UI

# The check_same_thread=false property ensures the sqlite client does not attempt

# to enforce single-threaded access, which may be problematic in some edge cases

SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db?check_same_thread=false'

# Flask-WTF flag for CSRF

WTF_CSRF_ENABLED = True

# Add endpoints that need to be exempt from CSRF protection

WTF_CSRF_EXEMPT_LIST = []

# A CSRF token that expires in 1 year

WTF_CSRF_TIME_LIMIT = 60 60 24 * 365

# Set this API key to enable Mapbox visualizations

MAPBOX_API_KEY = ''

1. export SUPERSET_CONFIG_PATH=superset_config.py

2. pip install SQLAlchemy

3. pip install cython

4. pip install build

5. pip install pymysql

6. export FLASK_APP=superset

7. Superset db upgrade

8. Superset fab create-admin

Loaded your LOCAL configuration at [superset_config.py]

logging was configured successfully


warnings.warn(

No PIL installation found

2024-04-09 16:38:59,684:INFO:superset.utils.screenshots:No PIL installation found

Username [admin]:

User first name [admin]:

User last name [user]:

Email [admin@fab.org]:

Password:your-password

Repeat for confirmation:your-password

Recognized Database Authentications.

Admin User admin created.

1. superset load_examples // not necessary if you need sample data the use this command

2. superset init

3. superset run -h 0.0.0.0 -p 8082 --with-threads --reload --debugger

4. After installation for Database connection


1. Click on the add button and click on other


1. Paste this “mysql+pymysql://db_user:db_password@db_host:db_port/database “ in the SQLALCHEMY URL and click on test connection if it is successful then connect



Running superset:

1.export SUPERSET_CONFIG_PATH=superset_config.py.

2.export FLASK_APP=superset.

3.superset run -h 0.0.0.0 -p 8085 --with-threads --reload --debugger.






On this page