Input mappings allow you to add parameters to a query so that you can set the parameter value when executing the query. For example, when you define a query as SELECT *, FROM TEST_TABLE, WHERE ID=1,
an input mapping is a parameter that sets the value of ID.
...
If you have defined an SQL query, you can generate input mappings corresponding to the input fields specified in the query by clicking Generate Input Mappings. As shown in the example below, an input mapping is created for the emp_no field, which will allow you to invoke this query by specifying a value for this field as an input. Alternatively, you can create input mappings manually.
Adding input mappings manually
Clicking the If you are manually adding input mappings, click Add New Input Mappings link brings up to open the following page.:
It provides the following optionsThe following should be updated to create an input mapping:
Table of Contents | ||||
---|---|---|---|---|
|
...
- SCALAR: In the target query, the parameter will be used as one value.
- ARRAY: In the target query, the parameter will contain one or many values for a mapped parameter.
Note |
---|
Note that ARRAY parameter type cannot be used with the QUERY_STRING data type (SQL type). |
In the context of RDBMS and SQL datasources, an ARRAY parameter mapped to an SQL query will be expanded to multiple comma separated parameters at runtime. For example, this can be used in SQL statement conditions such as SELECT ... WHERE ... IN(?).
SQL type
The data type of the corresponding SQL parameter can be selected from this menu. Note that the QUERY_STRING data type cannot be used if the parameter type is set to ARRAY. Find more from here about data types.
...