Define the CRUD Operation

When using the Redis destination in batch mode, you can use CRUD operations to write to Redis. To use CRUD operations, define the CRUD operation record header attribute for each record earlier in the pipeline. Records without the attribute defined are treated as Upsert: new records are written and existing records are updated.

To use CRUD operations to write records, set the following CRUD operation record header attribute:
sdc.operation.type
When defined, the Redis destination uses the CRUD operation in the sdc.operation.type record header attribute when writing to Redis. The destination supports the following values for the sdc.operation.type attribute:
  • 1 for INSERT
  • 2 for DELETE
  • 3 for UPDATE
  • 4 for UPSERT
If your pipeline includes a CRUD-enabled origin that processes changed data, the destination simply reads the operation type from the sdc.operation.type header attribute that the origin generates. If your pipeline uses a non-CDC origin, you can use the Expression Evaluator or a scripting processor to define the record header attribute. For more information about Data Collector changed data processing and a list of CDC-enabled origins, see Processing Changed Data.