"Original" Superset installation configuration under Windows

Source: Internet
Author: User
Tags windows x86 virtualenv

Superset is an open source BI data analytics and visualization platform (formerly known as Caravel, Panoramix) by Airbnb (a reputable online house rental company), which features self-service analysis, custom dashboards, visualization of analysis results (export), user/Role Permissions control, Also integrates a SQL editor, can do SQL editing query, etc., originally used to support Druid visual analysis, later developed to support a lot of relational database and Big Data computing framework, such as: MySQL, Oracle, Postgres,presto,sqlite, Redshift,impala, Sparksql, Greenplum, MSSQL.

Superset Website address is:

Http://superset.apache.org/index.html

There is no official support for Windows systems, but it can actually be installed successfully.

I install the environment for Windows 10 64-bit Enterprise Edition.

Installation steps:

1. Install Python. It is recommended to install Python version 3.4 or later. Python version 2.7 has various coding problems on Windows.

Https://www.python.org/downloads/release/python-350/

Download Windows x86-64 executable installer. Use the EXE installation package directly, and select Add to environment variable during installation.

Check: Run Python-v and pip-v separately under CMD. If the command cannot be found, you will need to add the Python installation directory under the PATH environment variable.

2. Install the virtualenv. (This step is optional, if you install directly, skip to step fourth.) Because superset need to install more components, it is best to use virtualenv standalone set of Python environments. )

When developing a Python application, the system installs only one version of the Python3. All third-party packages will be pip installed in the Python3 site-packages directory.

If we were to develop multiple applications at the same time, those applications would share a python, which is the Python 3 installed in the system. What if application a requires Jinja 2.7 and application B needs Jinja 2.6?

In this case, each app may need to have a "standalone" Python runtime environment. Virtualenv is a python run environment that is used to create a "quarantine" for an application.

installation command:

Pip Install Virtualenv

3. Use Virtualenv.

Set up the D:\python\myproject directory on the D disk first.

D:MD PYTHONCD PYTHONMD Myprojectcd MyProject

Then activate

CD d:\python\myprojectvirtualenv env// wait for initialization to complete ... activation: Env\scripts\activate

After the activation of the interface, note that the command line input to the left (env) tag, so that our subsequent operations will be in the env in effect, will not affect the overall pyhton environment.

4. Install the VS2015.

Some libraries that are dependent on superset need to be compiled with Microsoft Visual C + + 2010.

According to the instructions, you should also be able to install Visual C + + Build Tools:http://landinghub.visualstudio.com/visual-cpp-build-tools

5. Install the SASL.

Here is a big pit, I previously installed directly superset has been installed unsuccessful, error (sasl.h not found).

The workaround is to download the corresponding version via the http://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl

For example, we installed Python is version 3.5, the system is 64-bit, download SASL-0.2.1-CP35-CP35M-WIN_AMD64.WHL.
  

6. The predecessor has been installed and the superset is installed.

  

Pip Install superset
# Create an Administrator account Fabmanager Create-admin--app superset
# Initialize the database (under Windows, go to the Python installation directory (or Virtualenv's virtual directory), under Libs\site-packages\superset\bin) Python  Superset DB Upgrade
# Load Example (all subsequent operations need to be under Libs\site-packages\superset\bin) Python Superset Load_examples # initializing roles and Permissions Python Superset Init # Start the service, Port 8088, and change the port number using-P.   -D

Then use your browser and open localhost:8088 to see the login page.

7. The superset of Chinese

(1) Enter the superset installation directory and execute the following command to create the appropriate directory (Translations/zh/lc_messages):

    

MD  TRANSLATIONSCD translationsmd ZHCD zhmd lc_messages

(2) Download Chinese mo file
Official GitHub:
Https://github.com/apache/incubator-superset/tree/master/superset/translations/zh/LC_MESSAGES
Download the Messages.mo file in the directory created above
You can also download the Messages.po file, manually go to the Chinese, and then compile the PO file as Mo file, compile the way, execute the command:
    

MSGFMT Messages.po-o Messages.mo

(3) Modify the config.py file, restart the superset, and modify the section as follows:

  

#babel_default_locale =#babel_default_folder = ' babel/# LANGUAGES =#' zh ': {' flag ': ' CN ', ' name ': '   Chinese '}}

(4) Close the browser to reopen to see the effect of Chinese

8. Data sources.

Superset uses Sqllite by default. The following databases are supported:

Package
Database PyPISQLAlchemy URI prefix
Mysql pip install mysqlclient mysql://
Postgres pip install psycopg2 postgresql+psycopg2://
Presto pip install pyhive presto://
Oracle pip install cx_Oracle oracle://
Sqlite sqlite://
Redshift pip install sqlalchemy-redshift postgresql+psycopg2://
MSSQL pip install pymssql mssql://
Impala pip install impyla impala://
Sparksql pip install pyhive jdbc+hive://
Greenplum pip install psycopg2 postgresql+psycopg2://
Athena pip install "PyAthenaJDBC>1.0.9" awsathena+jdbc://
Vertica pip install sqlalchemy-vertica-python vertica+vertica_python://
Clickhouse pip install sqlalchemy-clickhouse clickhouse://

Once you have installed the database with PIP, you can configure the relevant data source in the Web interface.

The connection string format for the database is described in:

Http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#database-urls

Well, finally, I'll put a sample diagram of my test SQL Server. The test knowledge classification data for SUPERKM is used.

In addition, superset currently supports only single table display.

"Original" Superset installation configuration under Windows

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.