Scenario Conditional on Dataset Metric

niko
niko Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 3 ✭✭✭✭

Hi Community!

I would like to be able to have an automated scenario that runs through if a dataset's record count metric is > 0 but halts (also with SUCCESS) if the record count metric == 0.

More specifically, and by way of illustration, a scenario that does:

Step#1: build dataset A

Step#2: compute metrics on dataset A

Step#3: set a scenario variable v = row count metric on dataset A

Step#4: build dataset B if v > 0

Any ideas would be really welcome, thanks!

Nik

Best Answer

  • Mattsco
    Mattsco Dataiker, Registered Posts: 125 Dataiker
    Answer ✓

    Hi Nik,

    You can add a check on the metric row_count.
    A check is a condition that depends on a metric, here the check would be a success if it's above or equal 1:

    Capture d’écran 2020-07-20 à 23.27.15.png

    If not the check is going to fail.

    So then in your scenario
    - step 3 is: run this check.
    - step 4 is: build dataset B if no prior step failed. (you have this option in the step options)

    Matt

Answers

Setup Info
    Tags
      Help me…