Cassandra Writer Component
The Cassandra Writer component is designed to either insert or update a single row in a database. This component takes a MappedData, SimpleMappedData, or DatabaseRowData whose keys are columns in a table and whose values will be inserted/updated. The database will be queried to see if a row already exists for the incoming data using the columns specified by the keys parameter. If no columns are specified, the component assumes that all incoming data is being inserted into the database.
At least one of allowInsert or allowUpdate must be True. If both are set to false, the component will fail to initialize.
Data Governance
The Cassandra Writer component will record the storage of each row it inserts in the database in the Data Governance System. Updated rows are not recorded.
Input Channels
default — Takes in a MappedData, SimpleMappedData, or DatabaseRowData object containing the fields to be inserted/updated in the database.
Output Channels
success — Returns a SimpleMappedData object if the data was successfully processed. The object contains keys and values that specify the primary key of the inserted/updated data.
failure — Returns a ErrorOutput object if there was an issue processing the data.
error — Outputs an ErrorOutput object if there is an error processing the query.
Parameters
resource — (CassandraResource) The resource defining the service to which this component should connect
allowInsert — (Boolean, default: true) Indicates that the component is allowed to insert new records into the database. If this is false, and a record would normally have been inserted into the database, an error is returned on the Failure output channel.
allowUpdate — (Boolean, default: false) Indicates that the component is allowed to update an existing record in the database. If this is false, and an existing record would normally have been updated in the databases, an error is returned on the Failure output channel.
autogenerateUUIDs — (Boolean, default: false) Indicates whether the writer should automatically generate UUIDs when inserting data if they are not included in the incoming data. This only works if the keys parameter specifies a single UUID column.
keys — (String) A comma separated list of the keys that that are used to check for existing rows in the table. These keys will be used on update statements to ensure that the correct row is updated.
tableName — (String) The name of the table into which the row should be inserted/updated.
consistencyLevel — (String, default: ONE) The Consistency level to use when executing the query.
requestTimeout — (int, default: 2) Maximum time, in seconds, before the request times out.