Skip to main content
Inspiring
Sep 22, 2023 10:44 AM UTC
Question

Excel File

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.

    5 replies

    Participating Frequently
    Sep 22, 2023 11:05 AM UTC

    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# 

    Inspiring
    Sep 22, 2023 11:54 AM UTC

    How do we pass the values to the additional columns and additional values?

    Can you provide an example?

    stefanhelzle0001
    Brainy
    Sep 22, 2023 11:44 AM UTC

    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.

    mathieud0001
    Genius
    Sep 22, 2023 11:47 AM UTC

    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

    harshas2775
    Brainy
    Sep 22, 2023 11:50 AM UTC

    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. 

    Happy to help. Even happier to optimize.