Hi Team,
When using import CSV to Database smart service, is there a way to update the data after uploading the document
Eg:
In my excel file, I have 3 columns
id, name, updatedon
id and name values will be availble in the csv file, after uploading the file and when writing to DB we need to update the updatedon value with the updatedon time.
Discussion posts and replies are publicly visible
Hello Purvaraj, You can try using the additional columns and additional values of the import CSV to Database smart service to achieve the above requirement.
Have a look into this link for more info: https://community.appian.com/b/appmarket/posts/excel-tools#
I suggest to use a staging table for the raw import, then run a stored procedure to post-process the data into its final table.
If this table needs to be available via Records, I would suggest simply selecting all the data and updating the fields via the Write Records service.
Otherwise, I would simply run an Update statement using the Query Database Smart Service:
https://docs.appian.com/suite/help/23.3/Query_Database_Smart_Service.html
You can define an After insert trigger on the underlying table to update the updatedon value. That way updated on will be populated automatically after each row insertion in the table.
How do we pass the values to the additional columns and additional values?
Can you provide an example?