# tAmazonAuroraOutput

Writes, updates, makes changes or suppresses entries in an Amazon Aurora database.

tAmazonAuroraOutput executes the action defined on the table and/or on the data contained in the table, based on the flow incoming from the preceding component in the Job.

## tAmazonAuroraOutput Standard properties

These properties are used to configure tAmazonAuroraOutput running in the Standard Job framework.

The Standard tAmazonAuroraOutput component belongs to the Cloud and the Databases families.

The component in this framework is available in all Talend products.

Information noteNote: This component is a specific version of a dynamic database connector. The properties related to database settings vary depending on your database type selection. For more information about dynamic database connectors, see [DB Generic components](https://help.qlik.com/talend/r/en-US/8.0/components/db-generic/db-generic-component).

## Basic settings

| Properties | Description |
| --- | --- |
| Database | Select the desired database type from the list and click<br>Apply. |
| Property Type | <ul> <li> <p>Either <span>Built-In</span> or <span>Repository</span>.</p> </li> <li> <p> <span>Built-In</span>: No property data stored							centrally.</p> </li> <li> <p> <span>Repository</span>: Select the repository							file in which the properties are stored. The database connection							fields that follow are completed automatically using the data							retrieved.</p> </li> </ul> |
| Use an existing connection | Select this check box and in the Component<br>List drop-down list, select the desired connection component to<br>reuse the connection details you already defined.<br><br>Information noteNote: When a Job contains the parent Job and the child Job, do the following if you<br>want to share an existing connection between the parent Job and the child Job (for example,<br>to share the connection created by the parent Job with the child Job).<br><br><ol> <li>In the parent level, register the database connection to be shared               in the <span>Basic settings</span> view of the               connection component which creates that very database connection. </li> <li>In the child level, use a dedicated connection component to read               that registered database connection. </li> </ol><br><br>For an example about how to share a database connection across Job levels,<br>see [Sharing a database connection](https://help.qlik.com/talend/r/en-US/7.3/studio-user-guide/sharing-database-connection). |
| Host | Type in the IP address or hostname of the Amazon Aurora<br>database. |
| Port | Type in the listening port number of the Amazon Aurora<br>database. |
| Database | Type in the name of the database you want to use. |
| Username and<br>Password | Type in the database user authentication data.<br><br>To enter the password, click the [...] button<br>next to the password field, enter the password in double quotes in the pop-up dialog box,<br>and click OK to save the settings. |
| Table | Type in the name of the table to be written. Note that only one table can be written at<br>a time. |
| Action on table | On the table defined, you can perform one of the following<br>operations:<br><br><ul> <li> <p> <span>None</span>: No operation is									carried out.</p> </li> <li> <p> <span>Drop and create table</span>:									The table is removed and created again.</p> </li> <li> <p> <span>Create table</span>: The table									does not exist and gets created.</p> </li> <li> <p> <span>Create table if not										exists</span>: The table is created if it does not									exist.</p> </li> <li> <p> <span>Drop table if exists and										create</span>: The table is removed if it already									exists and created again.</p> </li> <li> <p> <span>Clear table</span>: The table									content is deleted.</p> </li> <li> <p> <span>Truncate table</span>: The table									content is quickly deleted. However, you will not be able to									rollback the operation.</p> </li> </ul> |
| Action on data | On the data of the table defined, you can perform one of the following<br>operations:<br><br><ul> <li> <p> <span>Insert</span>: Add new entries									to the table. If duplicates are found, the Job stops.</p> </li> <li> <p> <span>Update</span>: Make changes to									existing entries.</p> </li> <li> <p> <span>Insert or                update</span>: Insert a new record. If the record with the given reference            already exists, an update would be made.</p> </li> <li> <p> <span>Update or                insert</span>: Update the record with the given reference. If the record does            not exist, a new record would be inserted.</p> </li> <li> <p> <span>Delete</span>: Remove entries corresponding to the input									flow.</p> </li> <li> <p> <span>Replace</span>: Add new entries to the table. If an old row									in the table has the same value as a new row for a PRIMARY									KEY or a UNIQUE index, the old row is deleted before the new									row is inserted.</p> </li> <li> <p> <span>Insert or update on duplicate key or unique index</span>:									Add entries if the inserted value does not exist or update									entries if the inserted value already exists and there is a									risk of violating a unique index or primary key.</p> </li> <li> <p> <span>Insert Ignore</span>: Add only new rows to prevent									duplicate key errors.</p> </li> </ul><br><br>Information noteWarning:<br><br><br>*You must specify at least one column as a<br>primary key on which the Update and Delete operations are based. You can do that by<br>clicking Edit schema and<br>selecting the check box(es) next to the column(s) you want to set as<br>primary key(s). For an advanced use, click the Advanced settings view where you can<br>simultaneously define primary keys for the update and delete<br>operations. To do that: Select the Use<br>field options check box and then in the Key in update column, select the check<br>boxes next to the column name on which you want to base the update<br>operation. Do the same in the Key in<br>delete column for the deletion operation.*<br><br>The dynamic schema feature can<br>be used in the following modes: Insert, Update,<br>Insert or update, Update or insert, Delete. |
| Schema and Edit schema | <ul> <li> <p>A schema is a row description. It defines the number of fields            (columns) to be processed and passed on to the next component. When you create a Spark            Job, avoid the reserved word <kbd>line</kbd> when naming the            fields.</p> <p>This component offers the advantage of the                  dynamic schema feature. This allows you to retrieve unknown columns from source                  files or to copy batches of columns from a source without mapping each column                  individually. For further information about dynamic schemas, see <a href="https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/dynamic-schema" target="_blank">Dynamic schema</a>.</p> <p>This            dynamic schema feature is designed for the purpose of retrieving unknown columns of a            table and is recommended to be used for this purpose only; it is not recommended for the            use of creating tables.</p> </li> <li> <p> <span>Built-In</span>: You create and store the schema locally for this component                only.</p> </li> <li> <p> <span>Repository</span>: You have already created the schema and stored it in the                Repository. You can reuse it in various projects and Job designs.</p> <p>When the schema to be reused has default values that are            integers or functions, ensure that these default values are not enclosed within            quotation marks. If they are, you must remove the quotation marks manually.</p> <p>For more information, see <a href="https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/retrieving-table-schemas?tocId=_C1~eFOlN~GM_JR2qkBYZg" target="_blank">Retrieving table schemas</a>.</p> </li> <li> <p>Click <span>Edit        schema</span> to make changes to the schema. If the current schema is of the <span>Repository</span> type, three options are available:</p> <ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> </li> </ul> |
| Specify a data source alias | Select this checkbox and specify the alias of a data source created on the *Talend Runtime* side to use the shared connection pool defined in the data source configuration. This<br>option works only when you deploy and run your Job in *Talend Runtime*.<br><br>This check box disappears when the Use an<br>existing connection check box is selected. |
| Data source alias | Type in the alias of the data source created on the *Talend Runtime* side.<br><br>This field appears only when the Specify a<br>data source alias check box is selected. |
| Die on error | This check box is selected by default. Clear the check box to skip the row in error and<br>complete the process for error-free rows. If needed, you can<br>retrieve the rows in error via a Row &gt; Rejects<br>link. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Additional JDBC parameters | Specify additional connection properties for the database<br>connection you are creating.<br><br>This field disappears when the Use an<br>existing connection check box in the Basic settings view is selected.<br><br>Information noteNote:<br><br>You can press Ctrl+Space to access a list of<br>predefined global variables. |
| Extend Insert | Select this check box to carry out a bulk insert of a defined set<br>of lines instead of inserting lines one by one. The gain in system<br>performance is considerable.<br><br>This check box appears only when the Insert option is selected from the Action on data list in the Basic settings view.<br><br>Information noteNote:<br><br>This option is not compatible with the Reject link. You should therefore clear the<br>check box if you are using a Row &gt; Rejects<br>link with this component. |
| Number of rows per insert | Enter the number of rows to be inserted per operation. Note that the higher the value<br>specified, the lower performance levels shall be due to the increase<br>in memory demands.<br><br>This field appears only when the Extend<br>Insert check box is selected. |
| Use Batch | Select this check box to activate the batch mode for data processing.<br><br>This check box is available only when the Update or Delete<br>option is selected from the Action on<br>data list in the Basic<br>settings view. |
| Batch Size | Specify the number of records to be processed in each batch.<br><br>This field is available only when the Use batch mode<br>check box is selected. |
| Commit every | Enter the number of rows to be included in a batch before it is committed to the<br>database. This option ensures transaction quality (but not rollback)<br>and, above all, a higher performance level. |
| Additional columns | This option allows you to call SQL functions to perform actions on columns, provided<br>that these are not insert, update or delete actions, or actions that<br>require pre-processing. This option is not available if you have<br>just created the database table (even if you delete it beforehand).<br>Click the [+] button under the<br>table to add column(s), and set the following parameters for each<br>column.<br><br><ul> <li> <p> <span>Name</span>: Type in the name of the schema column to be									altered or inserted.</p> </li> <li> <p> <span>SQL expression</span>: Type in the SQL statement to be									executed in order to alter or insert the data in the									corresponding column.</p> </li> <li> <p> <span>Position</span>: Select <span>Before</span>, <span>After</span> or <span>Replace</span> depending on the action to be									performed on the reference column.</p> </li> <li> <p> <span>Reference column</span>: Type in a reference column that										<span>tAmazonAuroraOutput</span> can									use to locate or replace the new column or the column to be									modified.</p> </li> </ul> |
| Use field options | Select the check box for the corresponding column to customize a request, particularly<br>if multiple actions are being carried out on the data.<br><br><ul> <li> <p> <span>Key in update</span>: Select the check box for the									corresponding column based on which the data is									updated.</p> </li> <li> <p> <span>Key in delete</span>: Select the check box for the									corresponding column based on which the data is									deleted.</p> </li> <li> <p> <span>Updatable</span>: Select the check box if the data in the									corresponding column can be updated.</p> </li> <li> <p> <span>Insertable</span>: Select the check box if the data in the									corresponding column can be inserted.</p> </li> </ul> |
| Use Hint Options | Select this check box to configure the hint(s) which can help you optimize a query's<br>execution. |
| Hint Options | Click the [+] button under the<br>table to add hint(s) and set the following parameters for each hint.<br>This table appears only when the Use Hint<br>Options check box is selected.<br><br><ul> <li> <p> <span>HINT</span>: Specify the hint you need, using the syntax										<span>/*+ */</span>.</p> </li> <li> <p> <span>POSITION</span>: Specify where you put the hint in an SQL									statement.</p> </li> <li> <p> <span>SQL STMT*</span>: Select an SQL statement <span>INSERT</span>, <span>UPDATE</span>, or <span>DELETE</span> you need to use.</p> </li> </ul> |
| Debug query mode | Select this check box to display each step during processing entries<br>in a database. |
| Use duplicate key update mode insert | Select this check box to activate the ON DUPLICATE KEY UPDATE mode, and then click the<br>[+] button under the table<br>displayed to add column(s) to be updated and specify the update<br>action to be performed on the corresponding column.<br><br><ul> <li> <p> <span>Column</span>: Enter the name of the column to be									updated.</p> </li> <li> <p> <span>Value</span>: Enter the action to be performed on the									column.</p> </li> </ul><br><br>This check box is available only when the Insert<br>option is selected from the Action on<br>data list in the Basic<br>settings view. |
| tStatCatcher Statistics | Select this check box to gather the Job processing metadata at the<br>Job level as well as at each component level. |

## Global Variables

| Variables | Description |
| --- | --- |
| Global Variables | NB\_LINE: the number<br>of rows read by an input component or transferred to an output component. This is an<br>After variable and it returns an integer.<br><br><br>NB\_LINE\_UPDATED: the number of rows updated.<br>This is an After variable and it returns an integer.<br><br><br>NB\_LINE\_INSERTED: the number of<br>rows inserted. This is an After variable and it returns an integer.<br><br><br>NB\_LINE\_DELETED: the<br>number of rows deleted. This is an After variable and it returns an integer.<br><br><br>NB\_LINE\_REJECTED: the number of rows rejected. This is an After<br>variable and it returns an integer.<br><br><br>ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a variable, press Ctrl+Space to access the variable list and choose the variable to use from<br>it.<br><br>For more information about variables, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component must be used as an output component. It allows you to carry out actions<br>on a table or on the data of a table in an Amazon Aurora database.<br>It also allows you to create a reject flow using a Row &gt; Rejects link to filter data in error. For a similar<br>scenario, see . |
| Dynamic settings | Click the [+] button to add a row in the table<br>and fill the Code field with a context<br>variable to choose your database connection dynamically from multiple<br>connections planned in your Job. This feature is useful when you need to<br>access database tables having the same data structure but in different<br>databases, especially when you are working in an environment where you<br>cannot change your Job settings, for example, when your Job has to be<br>deployed and executed independent of Talend Studio.<br><br>The Dynamic settings table is<br>available only when the Use an existing<br>connection check box is selected in the Basic settings view. Once a dynamic parameter is<br>defined, the Component List box in the<br>Basic settings view becomes unusable.<br><br>For examples on using dynamic parameters, see [Reading data from databases through<br>context-based dynamic connections](https://help.qlik.com/talend/r/en-US/8.0/components/defining-context-groups/reading-data-from-databases-through-context-based-dynamic-connections) and [Reading data from different MySQL databases<br>using dynamically loaded connection parameters](https://help.qlik.com/talend/r/en-US/8.0/components/context/reading-data-from-different-mysql-databases-using-dynamically-loaded-connection-parameters). For more information on<br>Dynamic settings and context variables, see<br>[Dynamic schema](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/dynamic-schema) and [Creating a context group and define context<br>variables in it](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/creating-context-group-and-define-context-variables-in-it). |

**Related concepts**

* [Handling data with Amazon Aurora](https://help.qlik.com/talend/en-US/components/8.0/amazon-aurora/tamazonaurorainput-tamazonauroracommit-tlogrow-handling-data-with-amazon-aurora-standard-component-this)