PostgreSQL Execute Action

Plugin version: 1.10.0

Action that runs a PostgreSQL command.

The action can be used whenever you want to run a PostgreSQL command before or after a data pipeline. For example, you might want to run an SQL update command on a database before the pipeline source pulls data from tables.

Configuration

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Driver Name

No

Required. Name of the JDBC driver to use.

Default is postgresql.

Host

Yes

Required. Host that PostgreSQL is running on.

Default is localhost.

Port

Yes

Required. Port that PostgreSQL is running on.

Default is 5432.

Database

Yes

Required. PostgreSQL database name.

Database Command

Yes

Required. Database command to execute.

Username

Yes

Optional. User identity for connecting to the specified database.

Password

Yes

Optional. Password to use to connect to the specified database.

Connection Arguments

Yes

Optional. A list of arbitrary string key/value pairs as connection arguments. These arguments will be passed to the JDBC driver as connection arguments for JDBC drivers that may need additional configurations.

Connection Timeout

No

Optional. The timeout value used for socket connect operations. If connecting to the server takes longer than this value, the connection is broken. The timeout is specified in seconds and a value of 0 means that it is disabled.

Default is 100.

Example

You want to execute a query against a PostgreSQL database named "prod" that is running on "localhost" port 5432. Ensure that the driver for PostgreSQL is installed. You can also provide driver name for some specific driver, otherwise "postgresql" will be used, and then configure the plugin with:

Property

Value

Property

Value

Driver Name

postgresql

Host

localhost

Port

5432

Database

prod

Database Command

UPDATE table_name SET price = 20 WHERE ID = 6



Created in 2020 by Google Inc.