Adapter for Apache Cassandra 10.2 | webMethods Adapter for Apache Cassandra Documentation | webMethods Adapter for Apache Cassandra Installation and User’s Documentation | Adapter Services | Configuring Query with Prepared Statement Service
 
Configuring Query with Prepared Statement Service
A Query with Prepared Statement service retrieves the record from the Cassandra table using a prepared statement. You configure Query with Prepared Statement service using Designer. For more information about adapter services, see Using Adapter Services.
Read the section Before Managing Adapter Services, before you configure adapter services.
*To configure an adapter service using the Delete template
1. In Designer, right-click the folder in which the service is to be contained and select New > Adapter Service.
2. Select the parent namespace, type a name for the adapter service, and click Next.
3. Select webMethods Adapter for Apache Cassandra as the adapter type and click Next.
4. Select the appropriate Adapter Connection Name and click Next.
5. From the list of available templates, select the Query with Prepared Statement template and click Finish.
The adapter service editor for the selected adapter service appears. You can select the Adapter Settings tab at any time to confirm Adapter Properties such as the Adapter Name, Adapter Connection Name, and Adapter Service Template as necessary.
6. Select the Table tab to configure the table and set the fields as follows:
Field
Field Description/Action
Keyspace Name
Specifies the keyspace which is auto-populated based on the created connection.
Table Name
Specify the name of the table.
7. Use the Columns tab to provide values for the following fields:
a. Use the icon to populate a single column in the table. You can use the icon to display all columns created in an existing table.
Field
Description/Action
Column Name
The column name in the table.
Column Type
The column data type defined in the corresponding Column Name of the table.
Type Definition
Specifies the string representation of Column Type.
Output Field
The output field name.
Output Field Type
The Java type that corresponds to the output field.
8. Use the Options tab to provide the appropriate values for the following fields:
Field
Description/Action
Allow Filtering
Provides the capability to query the clustering columns using any condition.
Limit
Limits the number of records to be retrieved by providing a definite value.
9. Use the WHERE tab to specify the valid conditions for selecting information:
a. Select the icon to define the new WHERE clause fields.
b. Select the AND logical operator and specify the following fields:
Name
Name Description/Action
AND
The logical operator.
Column
The name of the column you want to use in the WHERE clause.
Operator
The following are the operators used:
*=
*<
*>
*<=
*>=
*IN
*CONTAINS
*CONTAINS KEY
Input Field
The default value is ?, which acts as a placeholder for the variable so that you can set the input variable for that column at run time, or get input external to this adapter service. You can also type a fixed value in this field now or at run time. If you type a fixed value, be sure that it is valid, or an exception will be generated at run time.
The adapter automatically generates values for the following fields:
Field
Description/Action
Parameter
The unique key for those rows in the above table which takes input at runtime.
Column
The name of the column you need to use in the WHERE clause.
CQL Type
The CQL data type defined in the corresponding Column Name of the table.
Input Field Type
The corresponding data type of the Input Field.
Input Field
The name of the input field. By default the name combines the values of Parameter and Column fields. However, you can also choose to specify any custom value.
Note:
If Not Exists field cannot be used with If Clause field at the same time.
10. Use the Orderby tab to define the values for the following fields:
Field
Description/Action
Column Name
Displays the columns which contains only the cluster key type.
Sort Order
Displays the records in correct ascending or descending order. Select either ASC or DES. By default, ASC is selected.
11. To verify input or output information for the service, use the Input/Output tab as required.
Here, the columns selected in WHERE tab is auto-populated.
12. From the File menu, select Save.