Expand my Community achievements bar.

Data Distiller - scheduled query based on the result of previous scheduled query

Avatar

Level 10

Assume that I would like to have multiple scheduled queries:

- Query 1

- Query 2

- Query 3. 

Is it possible to set up scheduled queries like that:

Query 1 runs -> then -> Query 2 is run and is based on the result of the Query 1 ->  Query 3 runs and is based on the result of Query 2

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Level 5

Hi @Michael_Soprano ,

I do not think you cant create that sort of dependency within AEP query service.

However, if this is your goal, I would suggest:

  1. Easiest option: put everything in a single query. The whole script will be divided into 3 blocks where each block will check the previous block's success status (you have to keep log may be in a separate dataset) and only proceed then
  2. Lengthy process: you can use middleware instead of a single query. The 3 queries will be scheduled. The middleware can try to retrieve the status from a query and depending on the "Success/ Falied" the middleware can delay / cancel the next one's run (document is there, but I have not done it, so needs to be thought of with care)

I would say try to go for #1 - in that case, every block will store start & end of every block in a single log dataset which will be retrieved before execution of the next block!

 

Hope this helps!

Avatar

Administrator

Hi @Michael_Soprano,

Did the shared solution help you out? If yes, kindly consider marking the answer as ‘correct’.

If you’re still facing any challenges, please feel free to continue the conversation here. Or if you've discovered a solution yourself, we would appreciate it if you could share it with the community.