

User Guide › Design › Data Acquisition › Adapters › Adding Adapters › Add an SQL Adapter › Data Source Interface Step › Query key fields Tab
Query key fields Tab
The Query key fields tab contains information about the keys that are used by the query in order to select only new data from the data source.
In the Query key fields tab:
- In Select initial key values, type a select statement that provides the initial values for the first "where" statement (when the control file is empty).
Note: The order of the values must be the same as the Field elements for this Query Key Fields element and return a result for each field.
- In Query key fields:
- If a key exists, click
to edit or
to delete.
-OR-
- Click Add field to define keys that are used by the query. The Key field details window is displayed.
Note: At least one key must exist.
- In Name, type the name of the field taken from the fields of the query.
- In Sort, select the data sorting method asc (ascending) or desc (descending).
- In Function, type a special function that should be operated on this key. To combine the field value in the function use (:fieldname). For example, "to_date(':ts','dd/mm/yyy')", means using the Oracle date function with the last value of the field name Ts.
- In Name Left Wrapper, type the character used to concatenate characters before the name of the field. The default is null string.
- In Name Right Wrapper, type the character used to concatenate characters after the name of the field. The default is null string.
- In Value Left Wrapper, type the character used to concatenate characters before the value of the field. The default is ' (apostrophe).
- In Value Right Wrapper, type the character used to concatenate characters after the value of the field. The default is ' (apostrophe).
- In Default Initial Value, type a value from which the adapter takes the default from if the Select initial key values query does not return records If there are some key fields, all the key fields must have this attribute.
- Select the Is Primary Key check box to have the adapter use this key in the automatic "where" statement in the query.
- Click OK. The Query key fields tab is displayed showing the added key field.
- If necessary, repeat step b to add more key fields.
Note: The order of the key fields can be changed by clicking
or
next to the desired field.
- Click
to delete the key fields.
- Click
to edit the key fields.
Copyright © 2013 CA.
All rights reserved.
 
|
|