• Beta
Connecting to Preset
  • 25 Nov 2020
  • 2 Minutes To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Connecting to Preset

  • Print
  • Share
  • Dark
    Light

Making Data Available to Preset

To start, create a database.

Next, ensure that your datasource is available. You can do this by:

  • Creating a table or datasource for a specific database view;
  • Loading a CSV file that will create a new table in a specific database location; or,
  • Exploring data in the SQL Editor using the "Explore" feature. Preset will create a datasource automatically with its name being derived from the SQL Editor tab name.

Making_Data_Available_to_Preset


How to Create a Database

Create Database


Database Details

This interface is used to establish a connection between your database and Preset. In order to complete the process, start with the Connection tab where you will define a database name along with a SQLAlchamy URI — please have a look at the SQLAlchemy documentation to learn how to structure your URI so that it connects successfully.

  • Database Name : Name to identify the database on Superset.
  • SQLAlchemy URI: Connection String. Different between query engines — needs a database driver to work at Preset all drivers are already preloaded.

After defining properties on the Connection tab, you can explore the other tabs (i.e., Connection tab, Performance tab, SQL Lab Settings tab, etc.) to further customize how your database interacts with Preset. To learn more, please read the Database Connection Properties topic.

2020-11-15_13-00-18.png


Table - Dataset

2020-11-15_Dataset.png

  • Set of data organized as a table with Columns (type of data) and Rows (data entry).
  • Created by:
    • Create table in Source Menu
    • Load CSV in Load Menu
    • Explorer Query when exploring data from SQL Query Editor
  • Can be:
    • Physical Table on the database
    • A view on the database
    • A saved query that is used in a Chart

Whitelist Preset IP for Database Connection

For security reasons you may need to whitelist Preset Public IPs to get access to your query engine and your datasource.

Preset IPs

35.161.45.11
52.32.136.34
54.244.23.85


Sample Data

Data used in this Getting Started guide are based on Covid-19 data. This data is readily available, is relatable, and is large enough to offer opportunities for users to become subject matter experts of the visualization process.

Download Data

You can find a copy of the data source in Github repository.

How to Import into your Database

You can upload it in your database by using the IMPORT CSV feature of preset as show here in the following video:

Processing & Transformation

This data is processed and transformed as specified in this blog post.

Was This Article Helpful?