Skip to main content
papiyas0002
January 31, 2022
Question

Run a scheduler for each row of the Master table

  • January 31, 2022
  • 8 replies
  • 0 views

I have a requirement where I have to update a particular field of all the rows of an existing table(Master Table). An API will be called with the PK of the table and the based on the response, data will be stored in the field. And this will be a scheduler which will run daily.

How can I achieve this?

Thanks in advance.

8 replies

andrewh0007
January 31, 2022

This is a broad question and without contextual information it's impossible to answer so I'll ask a few questions to hopefully narrow down what you're looking for.

Are you looking for a high level solution design for this problem or the literal nuts and bolts of how to generate a scheduled process model and have it retrieve data from the data base and call an API?

papiyas0002
February 1, 2022

I am looking for a high level solution to this problem.

andrewh0007
February 1, 2022
  1. So the PK from the Master Table will be used in the API request. Is this API request singular or can it be batched?
  2. This second question may not make sense (depends on the exact use case) but is adding rows to the Master Table in scope of what you are asking here? For example, if this Master Table is user data from a HR system it would need to be updated as new staff are onboarded.
  3. What is the frequency of the updates? (Daily, weekly, monthly etc)
  4. Is it guaranteed that the `particular field` in the Master Table will need updating every time you call the API or is it a check to see if it's changed and if so, then it is updated? If it isn't guaranteed can you guesstimate the frequency that updates will occur (Just an order of magnitude, such as 0.1%, 1%, 10%, 50%, 80%)
  5. Is there only one field being updated in the Master Table?
harshitb6843
February 1, 2022

Hi there,

You can use this documentation to understand how to create a scheduler - https://docs.appian.com/suite/help/21.4/Intermediate_Event_-_Timer.html
To help you further, you can parse the response of the API. Get all the IDs in one integer list variable. Now use that variable to pass as a filter in the query to query the data from the table and then use the data returned, inside a forEach loop, to iterate through the list and with the help of a!update() function, you can update the respective parameter/field of the CDT. 

papiyas0002
February 1, 2022

Thank you for your response.

Do you think calling the entire ids from the table will create any memory/performance issue?

harshitb6843
February 1, 2022

What number of IDs are we talking here?