Scenario questions&ideas

safi
safi Registered Posts: 4 ✭✭

I want to modify the scenarios we use in production. As a developer, I don’t have access to the automation (prod) node, so let me explain the case:

We have 8 different scenarios, each corresponding to a specific DOE type—for example, data ingestion, transportation calculation, dashboard output, etc. The first scenario is triggered on a time-based schedule. Then, each following scenario runs only if the previous one completes successfully.

We don’t want to change this structure because it’s useful—it helps us detect skewed results or manually intervene when something goes wrong.

What I’d like to do is trigger any of these scenarios (for example, the last one) directly at any time, using a run_range variable that I would set manually.

For this, I created JSON files on an FTP server. If I update one of these files, the corresponding scenario detects it and picks up the run_range variable. But currently, I need to maintain 8 separate JSON files—one per scenario. The issue is: if I update multiple files at the same time, all scenarios get triggered at once, which breaks the intended flow.

I’m looking for a way to avoid that.

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,467 Neuron
    Answer ✓

    Use a single JSON file with multiple run_range values, one for each child scenario, also a scenario_id and a datetime_updated. Create a new a file loader scenario that triggers when the consolidated file changes. Load the file in a Python recipe and detect which scenario_id was modified using datetime_updated. Then kick the corresponding scenario passing the run_range as a scenario parameter.

      {
        "scenario_id": "SCN001",
        "run_range": "01-01-2025",
        "datetime_updated": "2025-04-16T10:00:00Z"
      },
      {
        "scenario_id": "SCN002",
        "run_range": "01-01-2025",
        "datetime_updated": "2025-04-14T10:00:00Z"
      },
      {
        "scenario_id": "SCN003",
        "run_range": "01-01-2025",
        "datetime_updated": "2025-04-12T10:00:00Z"
      }
    
Setup Info
    Tags
      Help me…