Executes a SQL script. This operation parses the SQL script and processes each statement in the database using JDBC.
Property replacement is performed on the files before they are parsed.
Please note that the statements in the SQL files must be delimited properly.
The SQL Databases supported by the parser are:
- Oracle 10g+
- MySql 5.1+
- PostgreSql 9.0+
- Derby 10.8.2.2+
- SAP HANA
- SQL Server 2008+
- MariaDB 10.0+
- Vertica 6.5+
- H2 1.2.137+
- solidDB 6.5+
- SQL Azure
- DB2 9.7+
- AWS Redshift
- Hsql 1.8+
- Sybase ASE12.5+
- SQLite 3.7.2+
- DB2 z/OS 9.1+
- EnterpriseDB 9.4+
- Phoenix 4.2.2+
- Greenplum 4.3+
No JDBC drivers are included in the plugin, so the path to one is required (FDJDBC_DRIVER_PATH
).
Environment/Instance Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
JDBC URL |
| Yes | The JDBC URL of the database. |
JDBC User |
| No | The username that will be used to connect with. |
JDBC Password |
| No | The password of the username. |
JDBC Driver Path |
| Yes | Classpath for locating the JDBC Driver (e.g. for Weblogic - {ORACLE_HOME}/oracle_common/modules/ oracle.jdbc_11.2.0/ojdbc6.jar). |
Project Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
User |
| No | The username that will be used to connect with. This input takes precedence over the environment instance scoped |
Password |
| No | The password for |
Script File |
| Yes | The path to the script to execute. If a relative path is given, the path will be assumed to be in the |
Run Destructive |
| No | This option allows destructive statements to be run. See Special Considerations below. |
Outputs
Output Name | Required | Description |
---|---|---|
Artifacts
This operation consumes one or more SQL files, and an optional sequence file, from the artifacts repository.
Endpoint Selection
This operation will select all available endpoints associated to the environment/instance.
Endpoint Execution
This operation will randomly execute on one of the endpoint identified during selection.
Special Considerations
The statements in the SQL files must be delimited properly.
The FDJDBC_RUN_DESTRUCTIVE
input allows a mechanism for disallowing certain destructive SQL commands. If the input is set to true: DROP
, DELETE
, and TRUNCATE
will be allowed within the script. If the input is set to false: the plugin operation will abort with a validation error prior to running any of the commands in the script. This check cannot stop malicious actors, but instead helps to provide some security against accidental running of destructive commands. It is up to the customer to decide whether they want to allow such commands.
Sequence File for multi-file processing:
If you want to execute multiple SQL scripts, instead of specifying an SQL file within the FDJDBC_INP_FILE_NAME
input, a file containing an ordered list of SQL files to execute may be used. The plugin will detect whether a SQL file or a sequence file has been specified based on the format of the file. The format of a sequence file is as follows:
!SEQ
/ CreateHR.sql
/ GrantHR.sql
/ ADFStateMgt.sql
The !SEQ
line (must be the first line) at the top of the file indicates a sequence file. After the sequence line, an ordered list of files to run follows.
Replacement Properties
See Appendix.