Update Activity

Update is an asynchronous activity that helps to create, insert, update, batch update, or remove data to and from a Cassandra table or other write operations.

General

The General tab contains the following fields:

Field Literal Value/Process Property/Module Property? Description
Name None The name to be displayed as the label for the activity in the process.
Cassandra Connection Literal Value

Module Property

Shared configuration resource containing the Cassandra connection information.
Statement None Input the Cassandra Query Language (CQL) statement to perform on the keyspace.
Fetch UserTypes None This button fetches the User Defined Data Types (UDT) for the Prepared Statements.
Remember: The UDT fetch is successful if the following requirements are met:
  • Cassandra Shared Resource connection is ready and is provided in the Cassandra Connection field in the activity.
  • The UDTs are already defined in the keyspace.
For every new activity, you must fetch the UDT again. If you make changes to the UDT in the back end, ensure to fetch it again to see the latest types.
Use Nested Collections None Select this check box if you are using nested collections in the Prepared Statements.

If the check box is selected, enter the table name used in the Statement above.

Fetch Columns fetches the nested columns in the Data Type/Nested Collection drop-down of the Prepared Statements.

Note: See the following examples for using nested collections:
  • List<list<datatype>> - You can use nested collection column of type List of a data type, nested within List.
  • Set<Set<datatype>> - You can use nested collection column of type Set of a data type, nested within Set.
  • Map<text, List<datatype>> - You can use nested collection column of type Map with key as a data type and value as List of a data type.

Similarly, you can have other combinations using List, Set and Map.

Prepared Statements None

The Prepared Statements contains the Parameter Name, Parameter Cardinality and Data Type/Nested Collection fields. All the parameters defined in the Prepared Statements table are available in the Input tab of the activity for the user to provide values.

Each parameter corresponds to the question mark in the same position in the CQL statement. That is, the first parameter in the list corresponds to the first question mark, the second parameter in the list corresponds to the second question mark, and so on. The warning is only for the purpose of information. Ensure that the parameters in this field correspond correctly to the statement.

You can optionally specify names for each parameter. By default, the parameters are named Parameter, Parameter1, and so on. You must supply the data type of each parameter to the CQL statement, and this data type is used in the input schema for the statement

With the Parameter Cardinality drop-down you can map a data type of type Collection. The Collection data type is one of the following:
  • Map
  • Set
  • List
Note: When you select Map as the cardinality of a parameter:
  • You must provide the Key Type and Value Type for its Data Type/Nested Collection.
  • In case of nested collections, select the Data Type/Nested Collection of the parameter before you select its cardinality.

Description

Provide a short description for the activity.

Advanced

This tab has the following fields:

Field Literal Value/Process Property/Module Property? Description
Write Consistency All Refers to how up-to-date and synchronized a row of Cassandra data is on all of its replicas.
Tracing None The check box for turning the tracing for activity on or off. Checking this box turns the tracing on, which helps you understand Cassandra's internal operations and troubleshoot performance related issues.

Input

This tab has the following fields:

Input Item Data Type Mandatory? Description
Statement String No
Input the CQL statement to perform in the KeySpace.
Note: This field takes precedence over the statement field in General tab.
ServerTimeZone String No The ServerTimeZone is used for the timestamp data type. If you use Prepared Statements to insert timestamp data, map it to ServerTimeZone. It is the database server machine time zone, for example: America/New_York

Output

The following is the output for the activity:

Output Item Data Type Description
ExecutionInfo The information for Update activity executed.
QueriedHost String Return the Cassandra host that coordinated this execution.
Applied Boolean If the query that produced this ResultSet was a conditional update, return whether it was successfully applied.
TraceID String

Return the operation message data ID that is saved in the database. You can use this ID to query the database.

For example: SELECT * FROM system_traces.sessions WHERE session_id =?

Note: This field is displayed only when the Tracing check box on the Advanced tab is selected.

Fault

The Fault tab lists exceptions that are thrown by this activity:

Error Schema Element Data Type Description
CassandraPluginException Any exception thrown by the activity after execution. It has a msg and msgCode field for the exception.
DriverException Any exception thrown by Cassandra driver. It has a msg and msgCode field for the exception.
msg string The error message returned by the plug-in.
msgCode string The error code returned by the plug-in.