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:
- In the Data page, open an ElastiCube or create a new ElastiCube.
- In the ElastiCube, click . The Add Data dialog box is displayed.
- Click PostgreSQLto open the PostGreSQL settings.
- Enter the following details:
(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.
(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.
(Optional for Linux users): For secure connections, select Use SSL. The following fields are displayed:
- Location: Enter the computer/server IP address of the database. To connect to a database running on your own computer enter localhost.
- If Windows Authentication is configured with the database in the User Name and Password fields, enter your database credentials.
- Database (Optional): Enter the name of the database you want to access. If nothing is entered, you will get a list of all databases to which you have permissions.
Click . A list of tables in the database are displayed. All tables and views associated with the database will appear in a new window.
- 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’.
- SSL Root Certificate: Enter the name of a file containing SSL certificate authority (CA) certificate(s).
- SSL Certificate: Enter the file name of the client SSL certificate.
- SSL Key:Enter the file name of the client SSL key.
- SSL Password: Enter the SSL password.
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.
(Optional) By default, existing relationships between tables are automatically replicated in the ElastiCube. You can disable this by toggling the Import Relationships switch.
(Optional) Click + to customize the data you want to import with SQL. See Importing Data with Custom Queries for more information.
After you have selected all the relevant tables, click Done. The tables are added to your schema in Sisense.
: 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.