Skip to main content
July 21, 2023
Question

How to write only unique entries in the table

  • July 21, 2023
  • 6 replies
  • 0 views

Hi team,

I am capturing data from process metrics report and storing to oracle db as it's business requirement.

Now I just want to check is there any inbuilt functionality of Appian which only writes the rows in table which has been not inserted in the previous run ?

if not is there any suggested way you recommend that can be followed to achieve the same ?

6 replies

July 21, 2023

Hi, We have to query the data with a!queryEntity() / a!queryRecordType() from the database and check if the data is present or not. By checking that you can write only data which is not present to the database.

July 21, 2023

Actually I am using the out of box utility provided by Appian, the way it's doing is fetching all the record from the table and then comparing it with the data from report and finding unique. I think it's the same way that you mentioned ryt ? but the problem here is while fetching all the records from the table it is failing because of large volumne.

stefanhelzle0001
Brainy
July 21, 2023

Why not use a stored procedure to insert the data. It can check for an existing row and only insert if nothing is found.

mathieud0001
Brainy
July 21, 2023

Would need to know more about your requirements to give a proper solution but one way to do it could be to calculate a unique composite key or a hash from key portions of the data. This way you can rerun your inserts without inserting duplicates.