Loading data from PostgreSQL

On this page, we'll explain you how to add a PostgreSQL data source and create a loading job using it to synchronize your source with your SlicingDice's databases.


Whitelist SlicingDice's IPs on PostgreSQL

If your PostgreSQL database has restrictions about what IP addresses can access the database, you'll need to modify the pg_hba.conf file inserting the following lines to it.

#   TYPE    DATABASE     USER           CIDR-ADDRESS        METHOD
    host    $db_name     $userName      IP.NUMBER.ONE       password
    host    $db_name     $userName      IP.NUMBER.TWO       password

Modify the $db_name to a database name and $userName to the username that will be used by SlicingDice in order to load your data.

- 198.27.66.54
- 198.27.66.59
- 198.27.82.204
- 198.27.82.219
- 198.27.65.166
- 198.100.146.31
- 198.100.144.110
- 198.27.64.43
- 198.245.49.83
- 198.245.51.121
- 198.27.65.73
- 142.4.212.149
- 142.4.215.7
- 198.27.64.163
- 198.100.146.177
- 198.27.82.218
- 198.27.65.44
- 198.27.64.214
- 198.27.83.77
- 198.245.49.28
- 5.135.179.139
- 5.135.179.164
- 5.135.186.220
- 5.135.179.172
- 91.121.75.162
- 91.121.64.213
- 46.105.123.19
- 5.135.179.184
- 5.135.187.172
- 5.135.187.151
- 46.105.96.56
- 5.135.180.89
- 176.31.255.158
- 91.121.154.36
- 5.135.179.34
- 5.135.180.16
- 178.32.216.198
- 5.135.180.109
- 5.135.180.81
- 5.39.89.175

Add a PostgreSQL Data Source

Before adding your PostgreSQL data source on SlicingDice, you need to be logged in our Control Panel. Then, you need to go to the Data Sources page so we can start our tutorial.


How to add a PostgreSQL Data Source

Before creating your data source you need to have the following information in order to connect to your PostgreSQL database:
- The domain or IP address used to connect to PostgreSQL
- The port where PostgreSQL is running. The default port is 5432
- Your PostgreSQL username and password
- The name of your database

Now let's start creating your data source just clicking on the Create new data source button on SlicingDice's Data Source section


  • Data Source setup

    The first step is the configuration of your data source identification on SlicingDice. The following screen shows step 1.

    Responsive image

    Three fields will appear. Each field function is described at the table below.

    Field Description
    Data Source Name The name of your data source. Can be edited at any time. Mandatory
    Data Source Labels/Tags Labels/tags you might want to associate to a source, in order to organize your sources. Can be edited at any time. Optional
    Data Source Description The description of your data source. Can be edited at any time. Optional

    When ready, click on the Save & Continue button to go to Step 2.

  • Data Source Details

    Below you can see an example of the information and credentials that you should provide so SlicingDice can be able to connect to your PostgreSQL database.

    Responsive image

    Field Description
    Data Source Type The type of data source. In this case we're using PostgreSQL.
    Access type The type of connection to use. One of the following two options should be selected:
    - Direct Connection: connect to the data source with the given credentials.
    - Tunnel Connection: connect to the data source via a SSH Tunnel with the given credentials.
    Host name The domain or IP address used to connect to the data source.
    Port The port where the PostgreSQL is running. The default port of PostgreSQL is 5432.
    Username Your PostgreSQL username.
    Password The password for a given username.
    Database Your PostgreSQL database name
    SSH Key (if you selected Tunnel Connection at Data Source Type field) The SSH Key that will be used to create a tunnel connection to PostgreSQL

    You can test the connection by clicking on the Test Connection button. If everything goes ok you'll see a success message.

    Now you can go to the next step clicking on Save & Continue

  • Confirmation

    Here you'll see a summary of the configurations defined for this data source before you finally create it.

    The following image shows an example of a confirmation screen, which the name of the data source is drinks .

    Responsive image

    If everything is ok, click on the Submit button and then you'll receive a success creation message.

    Now you'll be able to find your new data source at the data sources list as you can see in the following image.

    Responsive image

    That's it! The next step is to load your PostgreSQL data into SlicingDice creating a loading job.

Add a new loading job using PostgreSQL sources

Now all the connection configuration with your PostgreSQL source is completed, so the next step is just to create and execute a loading job using this PostgreSQL Data Source you've configured on SlicingDice.

Here are the creation jobs tutorials for each type of loading job. Choose the most helpful for your use case:

  • One-time loading job: The one-time loading job loads your data once, needing manual intervention to execute it. This loading job type is useful if you don't update your data frequently.
  • Manual incremental loading job: The manual incremental loading job loads your data on-demand when new data needs to be inserted in SlicingDice. You need to manually start this loading job.
    Differently from an one-time loading job, only new rows will be inserted in the database. Your dataset needs to have a timestamp column in order to use this loading job type.
  • Automatic loading job: The automatic loading job loads your data frequently, specified by a predetermined time interval. You don't need to manually start this loading job, as it executes automatically.
    Your dataset needs to have a timestamp column in order to use this loading job type.