PostgreSQL Query
Use this activity to run a simple or a complex SQL Query on a database. The PostgreSQL Query activity returns information in the form of rows.
Input Settings
The Input Settings tab has the following fields:
Field | Description |
---|---|
Query | An SQL statement used to query the database. The query can be a simple query or a complex query. A complex query has nested SQL statements. You can construct prepared SQL queries by using substitution variables (or parameters) of the form
?<fieldname> in the query statement. For example,
select * from student where name = ?name;
Each substitution variable identifies an input parameter whose mapped value is substituted into the substitution variable at runtime. Input and Output tabs are populated based on the query. End the query with semicolon (;) to fetch the metadata in the table at the bottom of the query. The following examples represent simple and complex queries:
|
Manually Configure Metadata | Set the Manually Configure Metadata field to True to fetch table metadata manually. For more information, see Manually Configure Metadata. |
Fields | The grid is provided for informational purposes only. |
Input
This tab contains the input schema. The fields that are selected on the Input Settings tab are available in the schema. You can either hard code their values or map them to a field from the output of a preceding activity in the flow using the Mapper.
Output
This tab displays the activity output schema in a tree structure format. The output of an activity is displayed for informational purposes only and cannot be modified or altered. The information in this schema varies depending on the fields that you selected on the Input Settings tab.
The properties that are displayed on the Output tab schema correspond to the output of this activity and can be used as input by subsequent activities in the flow.