woutifier-t commented on a change in pull request #3977: NIFI-7007 Add update
functionality to the PutCassandraRecord processor.
URL: https://github.com/apache/nifi/pull/3977#discussion_r366836539
##########
File path:
nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/main/java/org/apache/nifi/processors/cassandra/PutCassandraRecord.java
##########
@@ -67,6 +75,35 @@
.required(true)
.build();
+ static final PropertyDescriptor STATEMENT_TYPE = new
PropertyDescriptor.Builder()
+ .name("put-cassandra-record-statement-type")
+ .displayName("Statement Type")
+ .description("Specifies the type of CQL Statement to generate.")
+ .required(true)
+ .defaultValue(INSERT_TYPE)
+ .allowableValues(UPDATE_TYPE, INSERT_TYPE)
+ .build();
+
+ static final PropertyDescriptor UPDATE_METHOD = new
PropertyDescriptor.Builder()
+ .name("put-cassandra-record-update-method")
+ .displayName("Update Method")
+ .description("Specifies the method to use to SET the values.")
Review comment:
Hey @mattyb149 I don't see many more statement types, as Cassandra doesn't
really have a notion of upsert (an insert and update are mostly the same, aside
from COUNTER tables where insert doesn't work). The only thing I see in the
future is a DELETE statement, for which the update methods would also not be
applicable. On the other hand, this feels cleaner than having "Update Set,
Update Increment,..". I'm fine either way so if fewer properties is preferred
then I can get rid of the update method.
Depending on your answer on the above, I'll add the cql.update.method
attribute and/or cql.statement.type attribute as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services