Configure Apache Superset on Linux
It is best to know about the basics of Superset before configuring it, check my previous blog about the basics of Superset.
Previously we were discussing the features and benefits of Superset and how it is unique from other visualization tools. In this part of the blog I will demonstrate how to configure Superset on your machine and what are the mandatory tools for configuration.
Configuring Apache Superset:
Superset has deprecated support for Python 2.*and supports only 3.6 to take advantage of the newer Python features and reduce the burden of supporting previous versions. I ran my test suite against 3.6 , but running on 3.7 should work as well.
Now there are two methods to configure Superset.
Configure it through Docker or Configure it by individually installing the Python packages behind it.
Configure Superset through Docker:
If you know docker, then you’re lucky, I have shortcut road for you to initialize development environment:
git clone https://github.com/apache/incubator-superset/
# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
docker-compose run –rm superset ./docker-init.sh
# you can run this command everytime you need to start superset now:
Note that :The Docker-related files and documentation has been community-contributed and is not actively maintained and managed by the core committers working on the project. Some issues have been reported as of 2019–01.
Configure Superset by individually installing the Python packages:
Superset stores database connection information in its metadata database. For that purpose, I used the
cryptography Python library to encrypt connection passwords. Unfortunately, this library has OS level dependencies.
For Debian and Ubuntu, the following command will ensure that the required dependencies are installed:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip libsasl2-dev libldap2-dev
It is recommended to install Superset inside a virtualenv. Python 3 already ships virtualenv. But if it’s not installed in your environment for some reason, you can install it via the package for your operating systems, otherwise you can install from pip:
To install python packages I used pip3.6 , if you haven’t installed it, install pip3.6 ..
sudo apt install python3-pip#Now install Virtualenv through pip3.6pip3.6 install virtualenv
You can create and activate a virtualenv by:
python3 -m venv venv
Python’s setup tools and pip:
Follow these few simple steps to install Superset:
# Install superset
pip3.6 install superset
# Initialize the database
superset db upgrade
# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
$ export FLASK_APP=superset
flask fab create-admin
# Load some data to play with
# Create default roles and permissions
# To start a development web server on port 8088, use -p to bind to another port
superset run -p 8080 –with-threads –reload –debugger
If you have errors regarding Flask and Pandas than follow the steps mentioned below :
pip3.6 uninstall pandas
pip3.6 install pandas==0.23.4
pip3.6 uninstall sqlalchemy
pip3.6 install sqlalchemy==1.2.18
pip3.6 install flask==1.0.0
After installation, you should be able to point your browser to the right hostname: port http://localhost:8088, login using the credential you entered while creating the admin account, and navigate to Menu -> Admin -> Refresh Metadata. This action should bring in all of your datasources for Superset to be aware of, and they should show up in Menu -> Datasources, from where you can start playing with your data!
This is it for Apache Superset configuration, I hope this blog will be helpful for you.
- Install Alfresco CMS in Red Hat or Debian Linux through Docker.
- Introducing Alfresco Content Management System — Personal Space for Document Management & Workflows
- Configure Apache Superset on Linux
- Introducing Apache Superset- An Open Source Data Visualizaton Tool
- Hadoop Integration with Apache Ignite | Using Hive with IgniteMR.