Run Database Query Post-run Action

Plugin version: 2.11.0

Runs a database query at the end of the pipeline run. Can be configured to run only on success, only on failure, or always at the end of the run. For example, you might have a pipeline that imports data from a database table to HDFS files. At the end of the run, you might want to run a query that deletes the data that was read from the table.

Configuration

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Run Condition

Yes

Optional. When to run the action. Must be completion, success, or failure.

If set to completion, the action will be executed regardless of whether the pipeline run succeeded or failed.

If set to success, the action will only be executed if the pipeline run succeeded.

If set to failure, the action will only be executed if the pipeline run failed.

Default is success.

Plugin Name

No

Required. Name of the JDBC plugin to use. This is the value of the 'name' key defined in the JSON file for the JDBC plugin.

Plugin Type

No

Required. Type of the JDBC plugin to use. This is the value of the 'type' key defined in the JSON file for the JDBC plugin.

Default is jdbc.

Connection String

Yes

Required. JDBC connection string including database name.

Query

Yes

Required. The query to run.

Username

Yes

User identity for connecting to the specified database. Required for databases that need authentication. Optional for databases that do not require authentication.

Password

Yes

Password to use to connect to the specified database. Required for databases that need authentication. Optional for databases that do not require authentication.

Connection Arguments

Yes

A list of arbitrary string tag/value pairs as connection arguments. This is a semi-column separated list of key-value pairs, where each pair is separated by an equals = and specifies the key and value for the argument. For example, key1=value1;key2=value2specifies that the connection will be given arguments key1mapped to value1 and the argument key2 mapped to value2.

Enable Auto-Commit

No

Optional. Whether to enable auto-commit for queries run by this source. In most cases, set to false. If you use a JDBC driver that results in an error when the commit operation is run, set to true.

Default is false.

Created in 2020 by Google Inc.