# Setting up the tDBInput\_1 component

The tDBInput\_1 component retrieves specific data from database table by executing a SQL statement.

## Procedure

1. Double-click tDBInput\_1 to open its Basic settings view.
2. Make sure that PostgreSQL is selected from the Database drop-down list.
3. Select the Use an existing connection option and select tDBConnection\_1 from the Component List drop-down list.

   This step enables the tDBInput\_1 component to reuse the database connection established by the tDBConnection\_1 component.
4. Click [...] next to Edit schema to open the schema editor.
5. Add these two columns in the schema editor: column name, type String; and column address, type String.
6. Type in the name of the database table to retrieve data from in the Table field (users in this example).

   You can also select an existing database table by clicking the [...] button next to the Table field.
7. Type in the SQL statement in the Query field (SELECT NAME,ADDRESS from users in this scenario).

   The SQL statement retrieves *name* and *address* data from the database table.
8. Leave the other options as they are.

   ![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/use-case-postgresql-5.png)