Using the Cassandra Delete Rows Activity

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

  1. In an active orchestration, open the Activities tab and expand the Cassandra folder contents.
  2. Drag the Delete Rows activity icon onto the orchestration. Select the activity. The Cassandra Delete Rows 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 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.
  11. 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.
  12. Under Configure, click Delivery Rules. Select Enable Batch checkbox and define the number of rows you want to delete at a time.
    1. Once the checkbox is selected, the Batch Type will be populated in the drop down section which is as follows:
      • LOGGED
      • UNLOGGED
      • COUNTER
    2. Select any one of the above batch type.
    3. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.




Feedback | Notices


Timestamp icon Last updated: Wednesday, 15 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/Cassandra_delete_rows_activity.html