Intro to Superset config

The superset_config.py file is a configuration file that contains various settings and parameters that control the behavior of a Superset installation. This file is used to override the default settings of Superset and customize the application to meet the specific needs of the user.

Users can modify this file to specify settings related to various aspects of the application, such as database connections, authentication methods, security settings, visualization settings, and more. By modifying the superset_config.py file, users can customize the behavior and appearance of the Superset application to fit their needs.

For example, users can use the superset_config.py file to specify custom logos, change the default colors of visualizations, specify the default view for dashboards, and more. The superset_config.py file is a powerful tool for customizing and fine-tuning a Superset installation to meet the specific needs of the user.

To get started with modifying this file, I feel we should modify soemthing we can actually see and feel. I find doing this helps you become more comfortable. In this tutorial, I'll guide you through the process of modifying the Superset config file to make your instance stand out. I'll show you how to update the logo and loading gif with your own images, and even add custom colors to make your data pop. By the end of this tutorial, you'll have a Superset instance that not only meets your data visualization needs but also looks and feels like an extension of your brand.

So let's dive in and make your Superset instance visually stunning!

Step 1: Locate the code

The first step is to locate the code that needs to be changed. In this case, we need to modify the superset_config.py file. This file lives in /docker/python_dev/superset_config.py. To change the logo and loading gifs, we need to modify the following lines:

APP_NAME = "COURSEBYTES"
APP_ICON = "/static/assets/images/logo.png"
MENU_HIDE_USER_INFO = False
FAVICONS = [
    {
        "href": "/static/assets/images/favicon-16x16.png",
        "sizes": "16x16",
        "type": "image/png",
        "rel": "icon",
    },
    {
        "href": "/static/assets/images/favicon-32x32.png",
        "sizes": "32x32",
        "type": "image/png",
        "rel": "icon",
    },
]

Step 2: Replace the images

The next step is to replace the images that are referenced in the code. The default images are located in superset-frontend/src/assets/images/. To replace the images, simply replace the existing files with your own images. Be sure to use the same filenames and file types as the original images or ensure that your code mirrors the names you chose.

Step 3: Start Superset via Docker Compose

The only thing next is to start sueprset to see our changes and to make sure things are working.

docker compose up