MySQL Execute Action
Plugin version: 1.10.0
Action that runs a MySQL command.
The action can be used whenever you want to run a MySQL 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 |
---|---|---|
Driver Name | No | Required. Name of the JDBC driver to use. Default is mysql. |
Host | Yes | Required. Host that MySQL is running on. Default is localhost. |
Port | Yes | Required. Port that MySQL is running on. Default is 3306. |
Database | Yes | Required. MySQL 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. |
Use SSL | No | Turns on SSL encryption. The connection will fail if SSL is not available. Default is “if available”. |
Keystore URL | No | URL to the client certificate KeyStore (if not specified, use defaults). Must be accessible at the same location on host where CDAP Master is running and all hosts on which at least one HDFS, MapReduce, or YARN daemon role is running. |
Keystore Password | No | Password for the client certificates KeyStore. |
Truststore URL | No | Optional. URL to the trusted root certificate KeyStore (if not specified, use defaults). Must be accessible at the same location on host where CDAP Master is running and all hosts on which at least one HDFS, MapReduce, or YARN daemon role is running. |
Truststore Password | No | Optional. Password for the trusted root certificates KeyStore. |
Use Compression | No | Optional. Use zlib compression when communicating with the server. Select this option for WAN connections. Default is No. |
Use ANSI Quotes | No | Optional. Treats “ as an identifier quote character and not as a string quote character. Default is No. |
SQL Mode | No | Optional. Override the default SQL_MODE session variable used by the server. |
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. |
Auto-Reconnect | No | Should the driver try to re-establish stale and/or dead connections. Default is No. |
Example
Suppose you want to execute a query against a MySQL database named “prod” that is running on “localhost” port 3306 (Ensure that the driver for MySQL is installed. You can also provide driver name for some specific driver, otherwise “mysql” will be used), then configure the plugin with:
Property | Value |
---|---|
Driver Name |
|
Database Command |
|
Host |
|
Port |
|
Database |
|
Created in 2020 by Google Inc.