Connecting to PostgreSQL

Note: This topic describes how to import data using the online Sisense Web Application. To import data through the desktop ElastiCube Manager, click Connecting to PostgreSQL Using the ElastiCube Manager.

Sisense enables easy and quick access to databases, tables and views contained within PostgreSQL databases. The steps below describe how to connect to this type of data source.

Note: For the list of connectors available on Linux, click here.

To import data from PostgreSQL:

  1. In the Data page, open an ElastiCube or create a new ElastiCube.
  2. In the ElastiCube, click . The Add Data dialog box is displayed.
  3. Click PostgreSQLto open the PostGreSQL settings.

  4. Enter the following details:
  5. (Optional) Select Encrypt Connection to configure the driver to encrypt all communication with the PostgreSQL instance before sending it over the network, and then select Trust Server Certificate.
  6. (Optional) In Additional Parameters, enter additional configuration options by appending key-value pairs to the connection string (e.g., UseDeclareFetch=1;Fetch=500;). For a full list of connection string options, click here.
  7. (Optional for Linux users): For secure connections, select Use SSL. The following fields are displayed: 
    1. Select SSL Mode: Select the relevant mode to determine whether or with what priority a secure SSL TCP/IP connection will be applied with the server. There are six modes: ‘disable’, ‘allow’, ‘prefer’, ‘require’, ‘verify-ca’, ‘verify-full’.
    2. SSL Root Certificate: Enter the name of a file containing SSL certificate authority (CA) certificate(s).
    3. SSL Certificate: Enter the file name of the client SSL certificate.
    4. SSL Key:Enter the file name of the client SSL key.
    5. SSL Password: Enter the SSL password.
  8. Click . A list of tables in the database are displayed. All tables and views associated with the database will appear in a new window.
  9. From the Tables list, select the relevant table or view you want to work with. You can click next to the relevant table or view to see a preview of the data inside it. When you select the table or view, two new options are displayed at the bottom of the list, Import Relationships and Add Custom Import SQL.
  10. (Optional) By default, existing relationships between tables are automatically replicated in the ElastiCube. You can disable this by toggling the Import Relationships switch.
  11. (Optional) Click + to customize the data you want to import with SQL. See Importing Data with Custom Queries for more information.
  12. After you have selected all the relevant tables, click Done. The tables are added to your schema in Sisense.
Note: The default connection timeout limit is 30 seconds to PostgreSQL data sources. You can modify this limit by editing the Sisense.Connectors.PostgreSqlConnector.dll.config located at ...\Program Files\Sisense\DataConnectors\DotNetContainer\Connectors\PostgreSql.In the configuration file, under the section PostgreSettings, set the value of the parameter Timeout to change the connection timeout limit. This is useful in cases where you receive a TimeOut exception when trying to connect.