# JDBC parameters

All database connectors and datasets use JDBC. In addition to the JDBC parameters used to connect to the database, you might need to specify additional configuration parameters depending on the type of connection or dataset you are creating (Input/Output).

## JDBC parameters for datasets created from a Query

The database query and table types are not compatible as you cannot use a query type database as a Destination dataset. Therefore if you try to change the database configuration to another type after saving it, a check will be triggered on your pipeline to see whether this operation is possible.

| Display Name | Description | Default value | Enabled if |
| --- | --- | --- | --- |
| SQL<br>query | A valid read-only query if the source type is<br>Query | N/A | Always enabled |

Advanced JDBC parameter for datasets created from a QueryAdvanced JDBC parameter for datasets created from a Query

| Display Name | Description | Default value | Enabled if |
| --- | --- | --- | --- |
| Fetch<br>size | Gives the JDBC driver a hint as to the number of<br>rows that should be fetched from the database when more rows are<br>needed for ResultSet objects generated by this Statement. If the<br>value specified is zero, then the hint is ignored. | 1000 | Always enabled |

## JDBC parameters for datasets created from a database Table

The database query and table types are not compatible as you cannot use a query type database as a Destination dataset. Therefore if you try to change the database configuration to another type after saving it, a check will be triggered on your pipeline to see whether this operation is possible.

| Display Name | Description | Default value | Enabled if |
| --- | --- | --- | --- |
| Table<br>name | The name of the database table | N/A | Always enabled |

Advanced JDBC parameter for datasets created from a database TableAdvanced JDBC parameter for datasets created from a database Table

| Display Name | Description | Default value | Enabled if |
| --- | --- | --- | --- |
| Fetch<br>size | Gives the JDBC driver a hint as to the number of<br>rows that should be fetched from the database when more rows are<br>needed for ResultSet objects generated by this Statement. If the<br>value specified is zero, then the hint is ignored. | 1000 | Always enabled |

## JDBC parameters for Output datasets (Destinations)

| Display Name | Description | Default value | Enabled if |
| --- | --- | --- | --- |
| Action | The action on data to be performed | N/A | Always enabled |
| Create table if not exists | Creates the database table if it does not exist<br>yet | N/A | Action is equal to<br>INSERT or UPSERT<br>or BULK\_LOAD |
| Varchar columns Length | The length of varchar types. This value will be used to create<br>varchar columns in this table. -1 means that<br>the max supported length of the targeted database will be<br>used. | -1 | Create table if not exists is equal to<br>true |
| Operation keys | List of columns to be used as keys for this operation | 0 | Create table if not exists is equal to<br>true |
| Do not update columns | List of columns to be ignored from update | 0 | Action is equal to<br>UPDATE or<br>UPSERT |
| Distribution strategy | Defines the distribution strategy of a Redshift table | AUTO | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal to                                                <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Create table                                                if not exists</span> is equal to                                                <kbd>true</kbd> </p> </li> </ul> |
| Distribution keys | List of columns to be used as distribution keys<br>for Amazon Redshift | 0 | All of the following conditions are met:<br><br><ul> <li> <p> <span>Create table if not                                                exists</span> is equal to                                                <kbd>true</kbd> </p> </li> <li> <p> <span>Database</span> is equal to                                    <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Distribution                                                strategy</span> is equal to                                                <kbd>KEYS</kbd> </p> </li> </ul> |
| Sort keys | List of columns to be used as sort keys for<br>Amazon Redshift | 0 | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal to                                                <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Create table                                                if not exists</span> is equal to <span>true</span> </p> </li> </ul> |
| S3 connection | S3 connection list for Amazon Redshift bulk<br>load | N/A | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Action</span> is equal                                            to <kbd>BULK_LOAD</kbd> </p> </li> </ul> |
| S3 bucket | S3 bucket for Amazon Redshift bulk load | N/A | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Action</span> is equal                                            to <kbd>BULK_LOAD</kbd> </p> </li> </ul> |
| Path | S3 upload directory path for Amazon Redshift bulk load | N/A | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Action</span> is equal                                            to <kbd>BULK_LOAD</kbd> </p> </li> </ul> |
| Input validation | Checks the validity of the data file without<br>actually loading the data. Use the NOLOAD<br>parameter to make sure that your data file will load without any<br>errors before running the actual data load. Running<br>COPY with the NOLOAD<br>parameter is much faster than loading the data because it only<br>parses the files. | false | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Action</span> is equal                                            to <kbd>BULK_LOAD</kbd> </p> </li> </ul> |
| Invalid character | Activates the invalid character<br>replacement | N/A | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Action</span> is equal                                            to <kbd>BULK_LOAD</kbd> </p> </li> </ul> |
| Invalid character | ACCEPTINVCHARS instructs<br>COPY to replace each invalid character with<br>a specified valid character and continue with the load operation.<br>You can specify any valid ASCII character, except<br>NULL, as the replacement character. The<br>default replacement character is a question mark (<br>? ). COPY replaces<br>multibyte characters with a replacement string of equal length. For<br>example, a 4-byte character would be replaced with<br>'????' | N/A | Invalid character is<br>equal to true |
| Vacuum & Analyse | A vacuum recovers the space from deleted rows<br>and restores the sort order | true | All of the following conditions are met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <kbd>Redshift</kbd> </p> </li> <li> <p> <span>Action</span> is equal                                            to <kbd>BULK_LOAD</kbd> </p> </li> </ul> |
| Map input column names to output | Ensures that the input and output field names are identical | true | N/A |

Advanced parameterAdvanced parameter

| Display Name | Description | Default value | Enabled if |
| --- | --- | --- | --- |
| Rewrite batched statements | Rewrites batched statements to execute one statement per batch<br>combining values in the SQL query | true | One of these conditions is met:<br><br><ul> <li> <p> <span>Database</span> is equal                                            to <span>MySQL</span> </p> </li> <li> <p> <span>Connect with</span>                                            contains <span>MySQL</span> </p> </li> </ul> |