Airbnb quickly build enterprise-class open source BI data platform

The company recently made a data visualization projects related to the use of enterprise-class open source BI data platform superset Airbnb maintenance, compared to the tableau such charges commercial software, Superset is open source maintenance, as well as the type and color values ​​of the chart generally partial high. FIG following effects:!! [_ Histogram time series .gif] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112118784-853879599.gif) [Pie Chart .gif] (https: //img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112124212-953945562.gif)! [line graph .gif] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112135242- 514586707.gif) as well as dozens of additional chart format! [icon Overview .gif] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112143373-910271645.gif) did not talk much, he began to build it. ## 1. preparatory ** Linux server CentOS7 (Windows system without an overview of the general lack of whl files can be downloaded at [this site] (https://www.lfd.uci.edu/~gohlke/pythonlibs/) ** . ** python3 + version (here I use the 3.6.2 version) ** ** yum install [163 mirror] (http://mirrors.163.com/) ** [superset official website] (https: / . /blog.csdn.net/zzy1078689276/article/details/78732183/) ## 2 2.1 #### mounted installation environment python3.6.2 [python3.6.2 installation and testing] (https: //www.cnblogs.com/liongong/p/7858573.html) #### 2.2. Installation compilation environment `` `sudo yum install gcc gcc-c ++ libffi-devel openssl-devel libsasl2-devel openldap-devel` `` #### 2.3 update pip and tools python3 download `` `#### pip3 install --upgrade setuptools pip` `` #### 2.4 installed virtualenv virtual environment `` `pip3 install virtualenv` `` ### # 2.5 enter the virtual environment `` `. ./venv/bin/activate` `` #### 2.6 bean image using source mounting superset `` `pip3 install superset -i https://pypi.douban.com/simple` `` problem description 1: ImportError: No module named flask_compress / ext / XXX this is because the default flask superset version to> 1.0 at the same time not be too high, other components of empathy, usually uninstall the original version is too low or too high the flask and installed version 1.0 flask `` `pip3 uninstall flask pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com flask == 1.0` `` problem description 2 : was unable to import superset Error: No module named '_sqlite3' this is the system default python interpreter version 2.7 and 3.6 have conflict online Program must modify the default versions of the interpreter or compiler environment to join the current #### 2 sqlite3 module. 7 Create an administrator user name and password `` `fabmanager create-admin --app superset` `` Problem Description: No module named '_sqlite3' solution is the same in fact step out of the question on the #### 2.8 database initialization Superset `` `superset db upgrade` `` #### 2.9 case loading system provided by the official `` `superset load_examples` `` #### 2.10 initialize `` `superset init` `` #### 2.10 start superset `` ` . superset run -p 8088 --with-threads --reload --debugger `` `## 3 start a superset, connected mysql source, enter the IP table created in the browser according to Charts: 8888 or IP: 8888 / login / appears the following interface! [image.png] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112143712-921148797.png) 3.1 log in the upper right corner to select Chinese, just enter a user name and password to connect mysql 3.2 installed database dependent data sources `` `pip install mysqlclient` `` 3.3 data source connection! [image.png] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112144126-29504031.png) click + increased number next to the filter conditions [image.png] (https:! //img2018.cnblogs ! .Com / blog / 1821710/201909 / 1821710-20190930112144593-1515271071.png) connected to the database [image.png] (https: //img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112145488-1764047230.png) connected to the data table, the upper right corner of the click filter condition increases! [image.png] (https://img2018.cnblogs.com/ blog / 1821710/201909 / 1821710-20190930112146556-544105135.png) to select the input database table name! [image.png] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112146774-1833124605.png) click the table to enter data in accordance with table Charts create an interface to a pie chart, for example:! select the type of time interval index value based on packet data source icon (here sex) [image.png] (https://img2018.cnblogs.com/ blog / 1821710/201909 / 1821710-20190930112146907-2110940904.png) execute Query: click save to save [image.png] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112147042-520372014.png! ) here, BI platform generates icon data has been completed. The following are the icons introduced their projects ## 4. The resulting pie chart into a html, embedded in its own project to modify the configuration file superset config.py will PUBLIC_ROLE_LIKE_GAMMA to True chart support cross-domain! [Image.png] ( https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112147180-1961179493. png) found just saved, click the icon in the upper right angle brackets Charts copy the iframe code! [image.png] (https://img2018.cnblogs.com/blog/1821710/201909/1821710-20190930112147315-948611537.png) Embed project iframe tag to ourselves. Embedded chart Demo URL in your browser: [http://www.songlei.online:8777] (http://www.songlei.online:8777/) No public concern: Code In Java resources, projects, and hope you catch face questions Java technology has become a fellow traveler

Guess you like

Origin www.cnblogs.com/Ricardo-L-Song/p/11611745.html