The tDBInput_1 component retrieves specific data from database
table by executing a SQL statement.
Procedure
- Double-click tDBInput_1 to open its Basic settings view.
- Make sure that PostgreSQL is selected from the Database drop-down list.
-
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.
- Click [...] next to Edit schema to open the schema editor.
- Add these two columns in the schema editor: column name, type String; and column address, type String.
-
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.
-
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. -
Leave the other options as they are.