Rules

Below are groups of frequently used rules that can be included in your custom webhooks and combined with the webhook templates presented next.

Execution status

Success

Every successful execution that has encountered any data.

{
  ...
  "rules": [
    {
      "variable_name": "STATUS",
      "operation": "EQUAL",
      "value": "FINISHED"
    },
    {
      "variable_name": "ROWS",
      "operation": "GREATER_THAN",
      "value": "0"
    }
  ],
  ...
}

Failed

Every execution that results in a failure.

Dependent jobs

Filter only the main tables (endpoints with nested tables generate a separate webhook for each table when this rule is not used).

{
  ...
  "rules": [
    {
      "variable_name": "NESTED_TABLE",
      "operation": "EQUAL",
      "value": "false"
    },
  ],
  ...
}

Time

Executions during weekdays between 00:00 BRT and 08:00 BRT.

{
  ...
  "rules": [
    {
      "variable_name": "FINISHED_AT_WEEKDAY",
      "operation": "IN",
      "value": ["1", "2", "3", "4", "5"]
    },
    {
      "variable_name": "FINISHED_AT_TIME",
      "operation": "GREATER_THAN",
      "value": '02:59'
    },
    {
      "variable_name": "FINISHED_AT_TIME",
      "operation": "LESS_THAN",
      "value": "11:00"
    }
  ],
  ...
}

Execution type

Filter only Full Refresh executions.

{
  ...
  "rules": [
    {
      "variable_name": "FORCE_HISTORY",
      "operation": "EQUAL",
      "value": "true"
    },
  ],
  ...
}

Schedules

Filter only scheduled executions.

{
  ...
  "rules": [
    {
      "variable_name": "TRIGGERED_BY",
      "operation": "EQUAL",
      "value": "Erathos Schedule"
    },
  ],
  ...
}

Orchestration

Filter only executions triggered programmatically.

{
  ...
  "rules": [
    {
      "variable_name": "IS_ORCHESTRATION",
      "operation": "EQUAL",
      "value": "true"
    },
  ],
  ...
}

Last updated