# tPostgresqlInvalidRows Standard properties

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

The Standard tPostgresqlInvalidRows component belongs to the Data Quality and the Databases families.

This component is available in Talend Data Management Platform, Talend Big Data Platform, Talend Real Time Big Data Platform, Talend Data Services Platform, Talend MDM Platform and Talend Data Fabric.

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 .

## Basic settings

| Database | Select a type of database from the list and click<br>Apply. |
| --- | --- |
| Validation type | Either Regex pattern<br>validation or DQ rule<br>validation.<br><br><ul> <li> <p> <span>Regex pattern                                         validation</span>: Validate data in the database against                                         regex patterns.</p> </li> <li> <span>DQ rule validation</span>: Validate                                     data in the database against DQ rules.</li> </ul> |
| Regex pattern validation | <ul> <li> <p> <span>Analyzed column</span>: select from the                                     schema list the column to analyze. </p> </li> <li> <span>Custom pattern</span>: select this check box to                                 define manually your own customized regular expression against                                 which you want to check the DB rows.</li> <li> <p> <span>Patterns list</span>: select from the pattern                                     list the pattern against which you want to check the DB                                     rows.</p> </li> </ul> |
| DQ rule validation | <ul> <li> <p> <span>DQ rule list</span>: select from the list the                                     rule against which you want to check the DB rows.</p> </li> <li> <div> <span>Query type</span>: Either                                     <span>Built-in</span> or                                     <span>Repository</span>. <ol> <li> <span>Built-in</span>: fill in manually the                                             query statement or build it graphically using                                             SQLBuilder.</li> <li> <span>Repository</span>: select the relevant                                             query stored in the <span>Repository</span>.                                             The Query field is filled in accordingly.</li> </ol> </div> </li> <li> <p> <span>Guess query</span>: click the <span>Guess Querry</span> button to                                 generate the query which corresponds to your table schema in                                 the Query field.</p> </li> <li> <p> <span>Guess schema</span>: click the                                     <span>Guess Schema</span> button to retrieve the                                     schema from the table.</p> </li> <li> <p> <span>Query</span>: enter your DB query paying                                     particular attention to properly sequence the fields in                                     order to match the schema definition.</p> </li> </ul> |
| Property type | Either Built-in or Repository. |
|  | Built-in: No property data stored<br>centrally. |
|  | Repository: Select the repository<br>file where Properties are stored. The fields that come after are<br>pre-filled in using the fetched data. |
| Use existing connection | Select this check box and in the Component List click the relevant 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, if you<br>need to share an existing connection between the two levels, for example, to share the<br>connection created by the parent Job with the child Job, you have to:<br><br><ol> <li> <p>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.</p> </li> <li> <p>In the child level, use a dedicated connection            component to read that registered database connection.</p> </li> </ol><br><br>For an example about how to share a database connection<br>across Job levels, see *Talend Studio<br>User Guide*. |
| DB Version | List of database versions. |
| Host | Database server IP address. |
| Port | Listening port number of DB server. |
| Database | Name of the database. |
| Postgresql schema | Name of the Postgresql schema. |
| Username and<br>Password | DB user authentication data.<br><br>To enter the password, click the [...] button next to the<br>password field, and then in the pop-up dialog box enter the password between double quotes<br>and click OK to save the settings. |
| Schema and Edit<br>Schema | A schema is a row description, it defines the number of fields to<br>be processed and passed on to the next component. The schema is<br>either Built-in or stored remotely<br>in the Repository.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><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. 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> |
|  | Built-in: You create and store<br>the schema locally for this component only. Related topic:see<br>*Talend Studio User<br>Guide*. |
|  | Repository: You have already<br>created the schema and stored it in the Repository and thus reuse it<br>when needed. Related topic: see *Talend Studio User<br>Guide*. |
| Table Name | Enter the name of the table to be read. |
| Where clause | Enter a WHERE clause to define a row filter on the table.<br><br>You can use the WHERE clause to filter the rows you want to<br>analyze in the table. This WHERE clause enables you then to retrieve<br>valid and invalid data that match certain specified criteria or<br>conditions. |

## Advanced settings

| Additional JDBC Parameters | Specify additional JDBC parameters for the<br>database connection created.<br><br>This property is not available when the Use an existing connection<br>check box in the Basic settings view is selected. |
| --- | --- |
| Use cursor | Select this check box to specify the number of rows you want to<br>work with at a given time. This option optimises performance. |
| Trim all the String/Char columns | Select this check box to remove leading and trailing<br>whitespace from all the String/Char columns. |
| Trim column | Remove leading and trailing whitespace from the defined<br>columns.<br><br>This check box is not visible if Trim all<br>the String/Char columns is selected. Clear Trim all the String/Char columns to<br>enable Trim column. |
| tStatCatcher Statistics | Select this check box to collect log data at the component<br>level. |

## Global Variables

| 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>QUERY: the query statement<br>being processed. This is a Flow variable and it returns a string.<br><br><br>ERROR\_MESSAGE: the error message generated by the component when an<br>error occurs. This is an After variable and it returns a string. This variable functions<br>only if the Die on error check box<br>is cleared, if the component has this check<br>box.<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<br>variable, press Ctrl + Space to<br>access the variable list and choose the variable to use from it.<br><br>For further information about variables, see *Talend Studio*<br>*User Guide*. |
| --- | --- |

## Usage

| **Usage rule** | This component can be used as a start or intermediary step. It<br>requires an output flow. |
| --- | --- |
| 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 and . For more information on Dynamic<br>settings and context variables, see Talend Studio<br>User Guide. |