Cassandra Connector > Mappings and Mapping Tasks with Cassandra > Cassandra targets in mappings
  

Cassandra targets in mappings

To write data to a Cassandra target, configure a Cassandra object as the Target transformation in a mapping.
Specify the name and description of Cassandra target. Configure the target and advanced properties for the target object.
The following table describes the target properties that you can configure for a Cassandra target:
Property
Description
Connection
Name of the Cassandra connection that is associated with a dataset.
Target Type
Type of the Cassandra target objects available.
You can write data to a single Cassandra target object or parameterize the object. You cannot write data to multiple objects.
Object
Name of the Cassandra target object based on the target type selected.
Operation
You can select one the following operations:
  • - Insert
  • - Update
  • - Upsert (Update or Insert)
  • - Delete
Update columns
Specifies the default primary key column and temporary key columns to update, upsert, or delete target data.
If the Cassandra target does not include a primary key column, and the mapping is configured to perform an update, upsert, or delete task operation, click Add to add the primary key column and temporary key columns.
You must select the default primary key column and the temporary key columns. By default, no columns are specified.
Select the key columns to upsert or update data to or delete data from the Cassandra target table.
The following table describes the advanced properties that you can configure for a Cassandra target:
Property
Description
Truncate Target Table
The Secure Agent truncates the target table before writing the data.
Do not select this option when writing data to a Cassandra virtual table.
UpdateMode
Specifies the mode to write data to Cassandra target. You can specify the following modes:
  • - Update As Update. Updates all rows flagged for update if the entries exist.
  • - Update Else Insert. Updates all rows flagged for update if the entries exist in the target. If the entries do not exist, the Secure Agent inserts the entries.
  • Note: Use the Update Else Insert option to perform an upsert operation on a Cassandra target table.
preSQL
SQL statement that you want to run before writing data to the target.
For example, if you want to update records from the database before you write the records into the table, specify the following preSQL statement:
UPDATE cloud.emp SET dep_id = 3 WHERE emp_id = 9;
postSQL
SQL statement that you want to run after writing the data into the target.
For example, if you want to update records in a table after you write the records into the target table, specify the following postSQL statement:
UPDATE cloud.emp SET dep_id = 3 WHERE emp_id = 7;
Forward Rejected Rows
Determines whether the transformation passes rejected rows to the next transformation or drops rejected rows.
By default, the agent forwards rejected rows to the next transformation.