官术网_书友最值得收藏!

Adding a database

The navigation bar lists all the features. The Sources section is where you will create and maintain database integrations and configure table schemas to use as sources of data.

Any SQL database that has a SQLAlchemy connector such as PostgreSQL, MySQL, SQLite, MongoDB, and Snowflake can work with Superset.

Depending on the databases that we connect to Superset, the corresponding SQLAlchemy connectors have to be installed:

It is recommended that you use a database that supports the creation of views. When columns from more than one table have to be fetched for visualization, views of those joins can be created in the database and visualized on Superset, because table joins are not supported in Superset.

SQL query execution for fetching data and rendering visualizations is done at the database level, and Superset only fetches results afterwards. A database with a query execution engine that scales with your data will make your dashboard more real time.

In this book, we will work with public datasets available in Google BigQuery. We have already installed a connector for BigQuery in our installation routine, using the pip install pybigquery command. We have set up authentication for BigQuery using a key file. You should verify that, by confirming that the environment variable points to the valid key file:

echo $GOOGLE_APPLICATION_CREDENTIALS
# It should return
> /home/<your user name>/.google_cdp_key.json

Now, let's add BigQuery as a database in three steps:

  1. Select the Databases option from the drop-down list and create (+) your first database
  2. Set Database to superset-bigquery and SQLAlchemy URI to bigquery://
  3. Save the database

You can verify the database connection by clicking on the Test Connection button; it should return Seems OK! as follows:

Seems OK! dialog box is generated when test connection to database is successful
主站蜘蛛池模板: 乌审旗| 乌苏市| 洪泽县| 三门县| 叙永县| 囊谦县| 甘泉县| 修武县| 乐陵市| 郯城县| 玛纳斯县| 乌拉特前旗| 衡山县| 蒙城县| 嘉义县| 卢氏县| 肃南| 赤水市| 政和县| 宜良县| 西城区| 武汉市| 荔浦县| 内乡县| 昆山市| 九江市| 青州市| 济阳县| 平谷区| 新龙县| 罗山县| 鄂托克前旗| 常熟市| 河间市| 永靖县| 同德县| 彭水| 静海县| 鞍山市| 湖州市| 黑山县|