Using the Cassandra Execute Query Activity

Use the Execute Query Activity to retrieve the records from Cassandra.

About this task

Use this task to retrieve records from the Cassandra instance. The call to this Activity is a synchronous call where the input data is sent to the Activity for processing and the response is sent back to the orchestration.

Procedure

  1. In an active orchestration, open the Activities tab and expand the Cassandra folder contents.
  2. Drag the Execute Query activity icon onto the orchestration. Select the activity. The Cassandra Execute Query Activity Checklist is displayed.
  3. In the checklist, click Summary.
  4. Review the contents of the Activity Name field, and make the required changes.
  5. In the checklist, click Pick Endpoint.
  6. Click Browse and use the Project Explorer dialog box to select the relevant Cassandra endpoint.
  7. Optional: You can create the endpoint by clicking New and specifying the required connection details. Click OK to save and use the endpoint for this configuration.
  8. To make required changes to the selected endpoint configuration, click Edit to access the options in a separate window. Any changes you make globally affects all uses of the endpoint in active orchestrations.
  9. In the checklist, click Configure.
  10. Under Configure, click Enter Query and provide the query in the white space displayed in the pane. Do not place semicolons at the end of your query.
    Note: Only the select SQL statement is supported in the Execute Query Activity.
  11. Validate the Query using ValidateQuery button.
  12. The default value in the Consistency Level dropdown is the one which is selected while creating the endpoint in the test connection. User can change the value by selecting any of the consistency level.
  13. Under Configure, select the Setup Input Parameters task. The Setup Input Parameters pane shows the input parameter or parameters of the query. If no query parameter is provided in where clause then Setup Input Parameter section will be empty.
  14. Under Configure, select the Setup Result Set task. The Setup Result Set pane opens and the defaults for the output parameter or parameters of the query are listed.
    Note:
    • The column names mentioned in the select clause will get displayed in the Setup Result Set section.
    • If ‘*’ is mentioned in the select clause then all the column names from the table will get displayed in Setup Result Setsection.
  15. Select the Map Inputs in the Checklist. The XML Schemas generated from the Setup input parameter of the Execute Query Activity are displayed as nodes under the request input parameter in the To Activity panel.
  16. Create a map between the orchestration variables and the input parameter of the activity.
    Note: Values must be provided at run time for any mandatory elements of the input structure. A value can be provided by specifying a default value for element or by mapping the element with an input node. During run time if no value is provided for a mandatory element, the Activity throws an exception, which is reported by the Web Management Console. If a value is not provided at run time for an optional input parameter, no exception is thrown during run time.
  17. Select the Map Outputs in the Checklist. The XML Schema generated to hold the response of the activity is displayed as nodes under the response output parameter in the From Activity panel.
  18. Create a map between the output parameters and orchestration variables.

Results

You have configured the Cassandra Execute Query activity.
Note:

You can add more than one object as input to this activity. To add more than one object as input, right click the Object Name field in the To Activity pane of Map Inputs, and select Expand Occurrences.




Feedback | Notices


Timestamp icon Last updated: Tuesday, 27 September 2016


https://www.ibm.com/support/knowledgecenter/en/SS3LC4_7.5.3/com.ibm.wci.doc/Cassandra_execute_query_activity.html