Submit your innovative use case or inspiring success story to the 2023 Dataiku Frontrunner Awards! LET'S GO

Scenario Trigger on SQL Query change

jrjosias2
Level 1
Scenario Trigger on SQL Query change

Hello,

I'm new to DSS and I'm struggling in order to get the executions from the Trigger in order to capture the change between the first run to the dataset? Is that possible ? Can someone says how ? The documentation is very poor (Launching a scenario โ€” Dataiku DSS 11 documentation) if someone can share some additional documentation that can actually say something detailed about this feature, I'll be very thankful.

0 Kudos
2 Replies
JordanB
Dataiker

Hi @jrjosias2,

The SQL trigger will fire any time the result of the SQL query is different from the previous run of that same query. For a SQL dataset, the dataset change trigger will only look at the definition. So, the data involved in that query does not really need to have changed, it can fire, for example, when using queries that return rows in a different order. To counteract that we recommend using queries that return an aggregation such as COUNT or MAX such as "select count(*) from the_table" query (or any query for which you know the result changes).

I hope this helps! 

Thanks,

Jordan

0 Kudos
jrjosias2
Level 1
Author

Hi @JordanB thanks for your reply, 

That part I'm aware of, and I've realized that by constantly changing the count of records on the source database, however, I'm not sure how to capture that value change from past/current trigger execution, or at least how to find it in any log.

So to simplify, my question is: Can I capture the value from the Trigger execution? If yes, you'd know how or know some piece of documentation that describes it? If not possible to capture, can I at least keep track of it through some trigger execution log?

Because from the Last runs logs, I can only see the steps from the scenario

Kind regards,

Josias

0 Kudos