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
- In an active orchestration, open the Activities tab and expand the
Cassandra folder contents.
- Drag the Execute Query activity icon onto the orchestration. Select the
activity. The Cassandra Execute Query Activity Checklist is
displayed.
- In the checklist, click Summary.
- Review the contents of the Activity Name field, and make the required
changes.
- In the checklist, click Pick Endpoint.
- Click Browse and use the Project Explorer dialog
box to select the relevant Cassandra endpoint.
- 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.
- 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.
- In the checklist, click Configure.
- 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.
- Validate the Query using ValidateQuery button.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.