Postgres Account

On this page

Overview

Use this account type to connect PostgreSQL Snaps with data sources that use PostgreSQL accounts.

Prerequisites

None.

Account Settings

Parameter NameData TypeDescriptionDefault ValueExample 
LabelStringUnique name for the account.N/APostgreSQL_Account_Type
Authentication methodDropdown list

Select the authentication method to create your Postgres Account. The available options are:

  • User ID and password

  • IAM Auth

User ID and passwordIAM Auth
Account propertiesNA

Required. Enter here the information needed to create a connection to the database.

N/AN/A

Hostname

StringRequired. The address of the PostgreSQL server to which you want to connect.N/A"acc-postgresql-us-test-rsd.amazonaws.com"

Port Number

IntegerRequired. The port number that you want to use to connect to the PostgreSQL database.33061212

Database name

StringRequired. The name of the database to which you want to connect.N/ATestDB

Username

StringThe username that is allowed to connect to the database. This will be used as the default username when retrieving connections.N/Atestaccount

Password

StringThe password associated with the username that you want to use to connect to your account. This password will be used as the default password when retrieving connections.N/AN/A

JDBC Jars

N/AThe list of JDBC jar files that must be loaded for the account to work.N/AN/A

JDBC Driver

String

The JDBC driver must be loaded for the account to work. The default Postgres driver is used when you do not provide a driver. (Default driver: postgres 42.7.2.jar). Learn more.

N/Apostgresql-9.4.1207.jar

JDBC Driver Class

StringThe JDBC driver class that you want to use with the account.org.postgresql.DriverN/A
IAM propertiesAppears when you select the IAM Auth for the Authentication methodConfigure the IAM-releated properties for IAM authentication.
IAM roleCheckbox

Appears when you select the IAM Auth for the Authentication method.

Select this checkbox to use the IAM role stored in the Groundplex EC2 instance.

Note:

DeselectedSelected
AWS access key IDString

Appears when you select the IAM Auth for the Authentication method and deselect IAM role checkbox.

Specify the AWS access key ID associated with your AWS account.

N/AASIAEXAMPLE
AWS secret access keyString

Appears when you select the IAM Auth for the Authentication method and deselect IAM role checkbox.

Specify the Secret Key associated with your AWS authentication.

N/AwJalrXUtnFEMI/K7ENG/bPxRfiCEKEY
AWS security tokenString

Appears when you select the IAM Auth for the Authentication method and deselect IAM role checkbox.

Specify the Security Token used to authenticate your requests to AWS services. Only global Security Token Service (STS) regions are supported.


FQoGZXIvYXdzEFYaDO/7V77y1HTi1a0B7CK4AQpd
KsNC65mM/N4X8e0fH4QE/...
AWS regionString

Appears when you select the IAM Auth for the Authentication method.

Specify the AWS region where the application is running.

N/Aus-east-1
Cross account IAM properties

Appears when you select IAM Auth for Authentication method.

 Use this field set to configure the cross-account access. Learn more about - Setting up Cross account IAM Role.

Role ARNString

Appears when you select IAM Auth for Authentication method.

Specify the Amazon Resource Name (ARN) of the role to assume.

N/Aarn:aws:iam::61286491850:role/EC2_assume_role
External IDString

Appears when you select IAM Auth for Authentication method.

Specify an External ID that might be required by the role to assume.

N/A7542158

Configure SSH Tunnel


Checkbox

Select this checkbox if Snap needs to create an SSH tunnel for connecting the Snaplex to the PostgreSQL server. After the operation is completed, the tunnel is closed.

If you select this checkbox, you must provide the configuration details on the SSH tunnel.

Learn more about Setting Up SSH Tunneling with PostgreSQL.

DeselectedFalse

SSH Auth Mode


Dropdown list

Select an option to specify the mode for authenticating the user on the SSH tunnel. The available options are:

  • Password: Select this option if you want to use the configured SSH Hostname, SSH Username, and the SSH Password properties directly.

  • KeyFile (Private Key File): Select this option if you want to upload a file for the Key.

  • KeyFile (Private Key String): Select this option if you want to copy and paste the private key contents into the account.

This value is considered only if the Configure SSH Tunnel checkbox is selected.

PasswordKeyFile

SSH Hostname


String

Specify the IP address or the domain name of the SSH server to which you want to connect.

None127.0.0.1

SSH Username


String

Specify the SSH username for connecting to the tunnel. 

NoneSSHUser

SSH Password


String

Specify the password for the specified SSH username for connecting to the SSH tunnel. This field is required if SSH Auth Mode is Password

None<Encrypted>

Private Key File URL


String/Expression

Specify the location of the keystore file. This field is required if SSH Auth Mode is KeyFile (Private Key File).

The file can be in SLDB, on the host machine that is hosting the JCC, or at any other remote location. For a local file, click to select the appropriate file using the file browser. You can also upload the file using any protocol such as https, ftp, sldb, and sftp.

Nonepostgres-ssh.pem

Private Key


String

Specify the private key for authentication. This field is required if SSH Auth Mode is KeyFile (Private Key String).

None -----BEGIN RSA PRIVATE KEY-----

………………..

-----END RSA PRIVATE KEY-----

Private Key Passphrase 

String

Specify the password that is to be used to decrypt the private key. This field is required if SSH Auth Mode is KeyFile.

None:y<>6[[]gMssb^rM

SSH Port


Integer

Specify the SSH port to connect to the PostgreSQL Server.

Ensure that there are no port conflicts.


None

222

Advanced PropertiesN/AAdvanced properties associated with the PostgreSQL account type.N/AN/A

Auto commit

Check box

Select this check box to commit each batch of processed data immediately after execution. If the Snap fails, only the batch being executed at that moment is rolled back.

Deselect this check box to commit processed data only after all the batches are executed. If the Snap fails, the entire transaction is rolled back, unless the Snap finds invalid input data before it sends the insert request to the server and routes the error documents to the Error view.

SelectedN/A

Batch size

Integer

Required. The number of statements to execute at a time.

Select queries are not batched.

Using a large batch size could use up the JDBC placeholder limit of 2100.

5020

Fetch size

Integer

Required. The number of rows to fetch at a time when executing a query.

Large values could cause the server to run out of memory.

10050

Max pool size

IntegerRequired. The maximum number of connections that a pool will maintain at a time.5030

Max life time

IntegerRequired. The maximum lifetime (in minutes) of a connection in the pool. Ensure that the value you enter is a few seconds shorter than any database or infrastructure-imposed connection time limit. A value of 0 indicates an infinite lifetime, subject to the Idle Timeout value. An in-use connection is never retired. Connections are removed only after they are closed.3050

Idle Timeout

IntegerRequired. The maximum amount of time (in minutes) that a connection is allowed to sit idle in the pool. A value of 0 indicates that idle connections are never removed from the pool.510

Checkout timeout

Integer

Required. The number of milliseconds to wait for a connection to be available when the pool is exhausted. Zero waits forever. The Snap throws an exception after the wait time has expired.

If you provide 0, the Snap waits infinitely until the connection is available. Therefore, we recommend you not to specify 0 for Checkout Timeout.

100008000
URL propertiesFieldsetUse this fieldset to specify properties associated with the URL created to make the connection with your account.N/AN/A

URL property name

StringThe name of the URL property.N/AsocketTimeout

URL property value

stringThe value associated with the URL property listed in the URL property name field.N/A10

Limitations

None

Troubleshooting

ErrorReason Resolution

When you set up a PostgreSQL 15.3 (RDS), with the default driver (9.4.1207 ), the Snap fails with the following fatal error:

no pg_hba.conf entry for host "<hostname>", user "<username>", database "<database_name>", no encryption

The PostgreSQL server versions after 9.4.1207 may not be compatible with the default bundled PostgreSQL JAR in the Snap. 

Explicitly upload and use a recent JDBC driver. 42.5.2 or 42.6.0

You can download the latest JAR file from here: https://jdbc.postgresql.org/download

Invalid IAM properties.

Either the AWS access key ID or AWS secret key has an empty value.

Provide valid values for AWS access key ID and AWS secret key.

JDBC Driver Hangs in Case of Connection Error

The default socketTime value in PostgreSQL accounts is 0; this causes the JDBC driver to hang if there are any connection errors. To overcome this, configure the URL properties in Account settings with the following parameter and value:

URL property name
URL property value
socketTimeout10

A SocketTimeout value of 10 ensures that the JDBC driver returns no connections after 10 seconds.

Timeout Issue

A connection failure does not suspend the running PostgreSQL Pipelines if the timeout value is lesser than the time to process the query. To overcome this issue, set the URL property socketTimeout with a longer time period than that of the longest expected query.

URL property nameURL property value
socketTimeout<time in seconds>

SSL Connection - Validation Issue

When connecting to an SSL enabled PostgreSQL account, the account fails in validation. To overcome this, configure the URL properties in Account settings to establish an SSL connection with the following parameter and value:

URL property nameURL property value
sslmoderequire

Auto Commit with Execute Snaps

For a DB Execute Snap, assume that a stream of documents enters the input view of the Snap and the SQL statement property has JSON paths in the WHERE clause. If the number of documents is large, the Snap executes in more than one batches rather than executing one per each document. Each batch would contain a certain number of WHERE clause values. If Auto commit is turned on, a failure would only roll back the records in the current batch. If Auto commit is turned off, the entire operation would be rolled back. For a single execute statement (with no input view), the setting has no practical effect.

Snap Pack History

 Click to view/expand
Release Snap Pack VersionDateType  Updates

August 2024

main27765

 

Stable

Updated and certified against the current Snaplogic Platform release.

May 2024437patches27531 Latest
May 2024437patches27416 Latest
  • Fixed an issue with the PostgreSQL—Insert Snap that exposed sensitive information in the error message when the batch operation was not successful.
  • Fixed an issue with the PostgreSQL—Bulk Load Snap that caused incorrect or invalid binary data to be inserted when the column was of Binary type.

May 2024437patches27172 Latest
  • Added the PostgreSQL - Vector Search Snap to enable advanced vector-based queries using the SELECT statement.
  • Added vector data type support for PostgreSQL - Insert and PostgreSQL - Update Snaps.

  • Upgraded the PostgreSQL JDBC driver from v9.4.1207 to v42.7.2 (Java 8). This upgrade will be part of the GA release on August 14, 2024 (Stable release). As part of this upgrade, the 42.7.2 JDBC driver is bundled with the PostgreSQL Snap Pack as the default JDBC driver. Your existing PostgreSQL pipelines that use the default driver (bundled with the PostgreSQL Snap Pack) might break.

    Behavior change:

    This driver upgrade has resulted in specific behavior changes in errors, status codes, and success and failure messages. Learn more.

May 2024437patches26634 LatestFixed an issue with PostgreSQL - Execute Snap that produced logs causing node crashes.
May 20244postgresupgrade26570 -

Upgraded the PostgreSQL JDBC driver from v9.4.1207 to v42.7.2 (Java 8). This upgrade will be part of the latest release on July 10,2024 and Stable release (GA) on August 14, 2024. As part of this upgrade, the 42.7.2 JDBC driver is bundled with the PostgreSQL Snap Pack as the default JDBC driver. Your existing PostgreSQL pipelines that use the default driver (bundled with the PostgreSQL Snap Pack) might break.

Behavior change:

This JDBC driver upgrade has resulted in specific behavior changes in errors, status codes, and success and failure messages. Learn more

May 2024main26341 StableUpdated the Delete Condition (Truncates a Table if empty) field in the PostgreSQL - Delete Snap to Delete condition (deletes all records from a table if left blank) to indicate that all entries will be deleted from the table when this field is blank, but no truncate operation is performed.
February 2024main25112 StableUpdated and certified against the current SnapLogic Platform release.
November 2023435patches23831 Latest

Fixed an issue with the PostgreSQL-Execute and PostgreSQL-Select Snaps that added escape characters ('\\') in the output for JSONB datatype.

November 2023main23721

 

StableUpdated and certified against the current SnapLogic Platform release.

August 2023

main22460

 


Stable

The PostgreSQL - Execute Snap now includes a new Query type field. When Auto is selected, the Snap tries to determine the query type automatically.

May 2023433patches21298 Latest

Fixed an issue with the PostgreSQL Insert Snap that inconsistently inserted some columns and missed the remaining columns(especially the Time fields), when the data was passed in the JSON format from an upstream Snap.

May 2023

main21015 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023 432patches20409 LatestThe PostgreSQL - Bulk Load and PostgreSQL - Insert Snaps no longer fail with the message ERROR: type modifier is not allowed for type 'bytea' when creating a new table if Create table if not present is selected and the target table does not exist. This issue occurred when metadata from the second input view document contained columns of the bytea data type.
February 2023 main19844 StableUpgraded with the latest SnapLogic Platform release.
November 2022

431patches19454

 Latest

The PostgreSQL Snap Pack supports geospatial data types.

November 2022main18944 Stable
  • The PostgreSQL - Bulk Load Snap can now process records with more than 16 KB in the document without encountering the BufferOverflowException because the default value of 16 KB for byte buffer size is now removed.
  • The PostgreSQL - Insert Snap now creates the target table only from the table metadata of the second input view when the following conditions are met:

    • The Create table if not present checkbox is selected.

    • The target table does not exist.

    • The table metadata is provided in the second input view.

September 2022430patches18149 Latest

The PostgreSQL Select and PostgresSQL Execute Snaps now read NaN values in Numeric columns when used with a PostgreSQL Account configured with the latest postgresql-42.5.0.jar driver.

September 2022430patches17894 Latest

The PostgreSQL Select Snap now works as expected when the table name is dependent on an upstream input.

August 2022430patches17700 LatestThe PostgreSQL - Bulk Load Snap can now process the records with more than 16KB in the document without encountering BufferOverflowException because the default value of 16KB for byte buffer size is now removed.
August 2022main17386 StableEnhanced the PostgreSQL Account and PostgreSQL Dynamic Account with SSH Tunneling configurations to encrypt the network connection between the client and the PostgreSQL Database server, thereby ensuring the secure network connection.
4.29 Patch429patches17036 Latest

Enhanced the PostgreSQL Account and PostgreSQL Dynamic Account with SSH Tunneling configurations to encrypt the network connection between the client and the PostgreSQL Database server, thereby ensuring a secure network connection.

4.29

main15993

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.28main14627 StableUpdated the label for Delete Condition to Delete Condition (Truncates Table if empty) in the PostgreSQL Delete Snap.
4.27 Patch427patches13149 Latest

Fixed an issue with PostgreSQL - Execute Snap, where the Snap failed when using Delete query with the RETURNING function.

4.27main12833 Stable

Enhanced the PostgreSQL - Execute Snap to invoke stored procedures.

4.26main11181 StableUpgraded with the latest SnapLogic Platform release.
4.25 Patch425patches9879 Latest

Enhanced the performance of PostgreSQL - Bulk Load Snap significantly. SnapLogic anticipates that the Snap will execute up to 3 times faster than the previous version for enterprise workloads.

4.25main9554
 
StableUpgraded with the latest SnapLogic Platform release.
4.24main8556
Stable

Enhanced the PostgreSQL - Select Snap to return only the selected output fields or columns in the output schema (second output view) using the Fetch Output Fields In Schema check box. If the Output Fields field is empty all the columns are visible. 

4.23main7430
 
StableUpgraded with the latest SnapLogic Platform release.

4.22 Patch

422patches6879 Latest

Fixed the PostgreSQL - Bulk Load Snap by preventing it from adding extra double quotes when loading values from input documents.

4.22main6403
 
StableUpgraded with the latest SnapLogic Platform release.
4.21 Patch421patches6272 Latest

Fixed the issue where Snowflake SCD2 Snap generates two output documents despite no changes to Cause-historization fields with DATE, TIME and TIMESTAMP Snowflake data types, and with Ignore unchanged rows field selected.

4.21 Patch

421patches6144 Latest

Fixed the following issues with DB Snaps:

  • The connection thread waits indefinitely causing the subsequent connection requests to become unresponsive.
  • Connection leaks occur during Pipeline execution.

4.21 Patch

MULTIPLE8841 Latest

Fixed the connection issue in Database Snaps by detecting and closing open connections after the Snap execution ends. 

4.21snapsmrc542

 

StableUpgraded with the latest SnapLogic Platform release.
4.20snapsmrc535
 
StableUpgraded with the latest SnapLogic Platform release.
4.19 Patch db/postgres8409 Latest

Fixed an issue with the PostgreSQL - Update Snap wherein the Snap is unable to perform operations when:

  • An expression is used in the Update condition property.
  • Input data contain the character '?'.
4.19snaprsmrc528
 
Stable

Added new Snap PostgresSQL Bulk Load.

4.18 Patchpostgres8021 Latest

Fixed an issue with the PostgreSQL grammar to better handle the single quote characters.

4.18snapsmrc523
 
StableUpgraded with the latest SnapLogic Platform release.
4.17 Patch db/postgres7588 Latest

Fixed an issue with tables sharing an overlapping column name wherein Pipeline execution fails due to the table collision.

4.17ALL7402
 
Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17snapsmrc515
 
Latest
  • Fixed an issue with the PostgreSQL Execute Snap wherein the Snap would send the input document to the output view even if the Pass through field is not selected in the Snap configuration. With this fix, the Snap sends the input document to the output view, under the key original, only if you select the Pass through field.
  • Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.
4.16 Patch db/postgres6822 Latest

Fixed an issue with the Lookup Snap passing data simultaneously to output and error views when some values contained spaces at the end.

4.16snapsmrc508
 
StableUpgraded with the latest SnapLogic Platform release.
4.15 Patch db/postgres6333 Latest

Replaced Max idle time and Idle connection test period properties with Max life time and Idle Timeout properties respectively, in the Account configuration. The new properties fix the connection release issues that were occurring due to default/restricted DB Account settings.

4.15snapsmrc500
 
StableUpgraded with the latest SnapLogic Platform release.
4.14snapsmrc490
 
Stable

Added support for Amazon Aurora and Azure SQL DB.

4.13

snapsmrc486

 
StableUpgraded with the latest SnapLogic Platform release.
4.12 PatchMULTIPLE4967 Latest

Provided an interim fix for an issue with the PostgreSQL 10 accounts by re-registering the driver for each account validation. The final fix is being shipped in a separate build.

4.12 Patch

postgres4832 Latest

Updated the driver from version 8.4.704 to version 9.4.1207 to support PostgreSQL v10 servers.

4.12

snapsmrc480

 
StableUpgraded with the latest SnapLogic Platform release.

4.11 Patch 

db/postgres4290 Latest

PostgreSQL Snap Pack - Fixed an issue when inserting a valid NaN value into a column.

4.11snapsmrc465
 
StableUpgraded with the latest SnapLogic Platform release.
4.10 Patchpostgres3773 Latest

Previously the Postgres PGObject datatype could not be serialized. It is now handled as a String.

4.10

snapsmrc414

 
Stable

Added Auto commit property to the Select and Execute Snaps at the Snap level to support overriding of the Auto commit property at the Account level.

4.9.0 Patchpostgres3134 Latest

PostgreSQL Execute: New Snap advanced property Auto commit has been implemented to fix the Select query error in PostgreSQL replica servers.

4.9 Patch

postgres3072 Latest

Fixed an issue regarding connection not closed after login failure; Expose autocommit for "Select into" statement in PostgreSQL Execute Snap and Redshift Execute Snap.

4.9snapsmrc405
 
StableUpgraded with the latest SnapLogic Platform release.
4.8.0 Patchpostgres2757 Latest

Potential fix for JDBC deadlock issue.

4.8.0 Patch

postgres2712 Latest

Fixed PostgreSQL Snap Pack rendering dates that are one hour off from the date returned by database query for non-UTC Snaplexes.

4.8.0 Patch

postgres2696

 


Latest

Addressed an issue where some changes made in the platform patch MRC294 to improve perfomance caused Snaps in the listed Snap Packs to fail.

4.8

snapsmrc398

 
Stable
  • Info tab added to accounts.
  • Database accounts now invalidate connection pools if account properties are modified and login attempts fail.
4.7.0 Patchpostgres2192 Latest

Fixed an issue for database Select Snaps regarding Limit rows not supporting an empty string from a pipeline parameter.

4.7.0 Patch

postgres2185 Latest

Resolved an issue with the PostgreSQL Execute Snap failing with a “java.util.regex.Pattern” error.

4.7

snapsmrc382

 
StableUpgraded with the latest SnapLogic Platform release.
4.6snapsmrc362
 
StableUpgraded with the latest SnapLogic Platform release.
4.5.1

postgres1584

 
Stable
  • Resolved an issue in the PostgreSQL - Execute Snap that resulted from restrictions on the 'with' operator in conjunction with an 'insert' statement.

  • Resolved an issue in the PostgreSQL Snaps that resulting from restrictions on the 'with' operator in conjunction with the RECURSIVE keyword.

4.4.1NA StableUpgraded with the latest SnapLogic Platform release.
4.4NA Stable
  • Resolved an issue with PostgreSQL Select Snap not parsing JSON data type correctly.
  • Note: The fix for this issue required updating libraries that impacted all database Snaps except those for MongoDB.
4.3.2NA Stable

This Snap Pack is now compatible with the PostgreSQL drivers available in 4.3 Patch mrc222.

NANA Stable
  • PostgreSQL Insert Snap: resolved an issue where it inserts a negative value when the input data was out of range.
  • PostgreSQL Snaps did not properly handle when a table name was created in mixed case.
  • JSON paths in WHERE clauses should be processed as bind values after the expression is evaluated.
NANA Stable
  • A - otd:6828 Postgres Snap shows wrong data type in preview for timestamp withtime zone data type
  • Dynamic DB queries now supported in the Execute Snap.
  • The SQL statement property now can be set as an expression property. When it is an expression, it will be evaluated with each input document and one SQL statement per each input document will be executed.
  • Known issue: When the SQL statement property is an expression, the pipeline parameters are shown in the suggest, but not the input schema.
  • With the SQL statement property set as an expression, the Snap can be exposed to SQL injection. Please use this feature with caution.
NANA Stable
  • PostgreSQL Insert: Enhanced data type support.
  • PostgreSQL Lookup: bug fixes on lookup failures; Pass-though on no lookup match property added to allow you to pass the input document through to the output view when there is no lookup matching.
    • PostgreSQL Select Snap: added support for handling array types.

Related Links: