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.
Introduction:
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:
Getting Started:
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/
cd incubator-superset/contrib/docker
# 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:
docker-compose up
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:
OS Dependencies:
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
Python virtualenv:
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
. venv/bin/activate
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
superset load_examples# Create default roles and permissions
superset init# 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.4pip3.6 uninstall sqlalchemy
pip3.6 install sqlalchemy==1.2.18pip3.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.
Recent Posts
- Hacked by NEPAL INDEX ATTACKERZ
- Methods to Launch a Web Development Organization and Industry Your Company
- Affordable Customized Report Writing Program – Use Expert Experts
- สล็อต PG เว็บตรง ไม่ผ่านเอเย่นต์100% สมัครเล่นเกม ที่นี่เลย!
- Get Article Online Composed by Masters for Reasonable Cost at DoMyEssay
Recent Comments
Archives
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- July 2021
- June 2021
- May 2021
- April 2021
- January 2021
- December 2020
- September 2020
- July 2020
- June 2020
- May 2020
- March 2020
- December 2017