Use the Delete Rows Activity to delete records from Cassandra.
About this task
Use this task to Delete Row from the Cassandra instance as well as to delete the single column
data from the database. 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 Delete Rows activity icon onto the orchestration. Select the
activity. The Cassandra Delete Rows 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 Pick Table and provide
Keyspace name. Click Browse and select the respective
table.
To select a table, choose one of the following options:
- Click on a table in the list and click OK.
- Provide the table name in the ‘Filter Table’ section and click on search
button.
- Encoding UTF-8 is a standard character encoding for Unicode. This is the default
encoding.
Note: - To delete only one row in the database, directly select the Map Inputs
section.
- To delete multiple records, the user needs to select the option of Delivery
Rules and enable the checkbox for Batch.
- Under Configure, click Delivery Rules. Select
Enable Batch checkbox and define the number of rows you want to delete at a
time.
- Once the checkbox is selected, the Batch Type will be populated in the drop down section which
is as follows:
- Select any one of the above batch type.
- The default value in the ‘Write 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.
- Select the Map Inputs in the Checklist. The XML Schemas generated from
the selected table of the Delete Rows Activity are displayed as nodes under
the request input parameter in the To Activity panel.
Following are the two cases for Delete:
- Row Level Delete: Delete entire row based on the primary key value only
- Column Level Delete: Delete values of a column from the rows based on the primary key and column
name values
Note: The user has to specify the column names in the recurring ‘columnsToDelete’ node. If
‘columnsToDelete’ is empty, then entire row would be deleted based on the primary key values, else
it would be considered as column level delete.
- 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 Delete Rows 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.