Hi All,
We have one scenario where we need to update the one field in one row in database table. Table consist of 50 columns.
Question :What is the best between below two option
1. Query Database node :can use single update query to update one row in database.
2. Write to datastore smart service :First bring all data in CDT and update value of field and then write CDT to database using Write to Datastore smart service .
Note: There will be only one row to update.
Discussion posts and replies are publicly visible
I would suggest using write to data store in most scenarios, this one included. The main reason is that the write to data store entity is more natively supported in Appian. For example, the write to data store entity will have impact analysis that links your CDT / Data Store as dependents to this process. Also, it has a native way of tracking and reporting on issues when writing to the database.
In general I only suggest using the query database node for operations that cannot be performed in the write to data store entity node. Since this is a simple scenario, it's much better suited for the out-of-the-box write to data store.
Thanks Peter, when using "Write to datastore smart service", we need to do two steps ,first run query entity with all column (50) and then set the vaule in cdt and then call "Write to datastore smart service". Would it make much difference ?
Yes that's correct - you must have all the data to write to the database correctly using the write to data store node. I still would strongly recommend this over using the query database node.