Skip to content
Back to skills

1150 Operators Ef7aded4

ASecurity

Operators combine operands and other conditions into complex expressions using boolean logic and transformations.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
code-qualitypythonexpressdebugging

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1150-operators_ef7aded4 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1150 Operators Ef7aded4?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1150 Operators Ef7aded4
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1150-operators-ef7aded4/badge)](https://www.skillsdirectory.com/skills/tools-only-1150-operators-ef7aded4)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Declarative Automation: Operators

Operators combine operands and other conditions into complex expressions using boolean logic and transformations.

## Boolean Operators

**`&` (AND)**: Both conditions must be true:

```python
import dagster as dg

condition = (
    dg.AutomationCondition.newly_updated()
    & ~dg.AutomationCondition.in_progress()
)
```

**`|` (OR)**: Either condition must be true:

```python
condition = (
    dg.AutomationCondition.missing()
    | dg.AutomationCondition.newly_updated()
)
```

**`~` (NOT)**: Negates the condition:

```python
condition = ~dg.AutomationCondition.any_deps_missing()
```

## Transformation Operators

### since(reset_condition)

Converts events into status. Becomes true when the operand becomes true and remains true until the reset condition becomes true.

```python
# True from when dependency updates until asset is requested
condition = dg.AutomationCondition.any_deps_updated().since(
    dg.AutomationCondition.newly_requested()
)
```

**Pattern**: `A.since(B)` means "A has occurred more recently than B"

**Use case**: Create persistent states from transient events. "Upstream updated" is an event, but "upstream updated since I was last requested" is a status.

### newly_true()

Converts status into an event. True only on the tick when the operand transitions from false to true.

```python
# True only on the tick when the asset becomes missing
condition = dg.AutomationCondition.missing().newly_true()
```

**Use case**: Prevent repeated actions during persistent states. `missing()` stays true for many ticks, but `missing().newly_true()` is only true once.

### since_last_handled()

Convenience method equivalent to `.since(newly_requested() | newly_updated() | initial_evaluation())`.

```python
condition = dg.AutomationCondition.any_deps_updated().since_last_handled()
```

True from when the condition becomes true until the asset is requested, updated, or the condition is first applied.

## Dependency Operators

### any_deps_match(condition)

True if the condition is true for at least one partition of any upstream dependency.

```python
condition = dg.AutomationCondition.any_deps_match(
    dg.AutomationCondition.missing()
)
```

Supports filtering with `.allow()` and `.ignore()`.

### all_deps_match(condition)

True if the condition is true for at least one partition of all upstream dependencies.

```python
condition = dg.AutomationCondition.all_deps_match(
    dg.AutomationCondition.newly_updated()
)
```

Requires every upstream asset to have at least one partition matching the condition.

## Dependency Filtering

### allow(selection)

Restricts which dependencies are checked to only those in the `AssetSelection`:

```python
# Only consider dependencies in the "important" group
condition = dg.AutomationCondition.any_deps_match(
    dg.AutomationCondition.missing()
).allow(dg.AssetSelection.groups("important"))
```

Creates an intersection: `dep_keys & allowed_selection`

### ignore(selection)

Excludes dependencies in the `AssetSelection` from being checked:

```python
# Ignore the "foo" asset when checking for updates
condition = dg.AutomationCondition.any_deps_updated().ignore(
    dg.AssetSelection.assets("foo")
)
```

Creates a subtraction: `dep_keys - ignored_selection`

### Propagation Through Boolean Operators

When applied to `AND`/`OR` conditions, `.allow()` and `.ignore()` propagate to all sub-conditions:

```python
# Applies allow() to all dependency checks within eager()
condition = dg.AutomationCondition.eager().allow(
    dg.AssetSelection.groups("critical")
)
```

## Check Operators

### any_checks_match(condition, blocking_only)

True if any of the asset's checks match the condition.

```python
condition = dg.AutomationCondition.any_checks_match(
    dg.AutomationCondition.check_failed(),
    blocking_only=True,
)
```

Parameters:

- `condition`: Condition to evaluate against checks
- `blocking_only` (bool): If True, only considers blocking checks (default: False)

### all_checks_match(condition, blocking_only)

True if all of the asset's checks match the condition.

```python
condition = dg.AutomationCondition.all_checks_match(
    dg.AutomationCondition.check_passed(),
    blocking_only=True,
)
```

## Labeling

### with_label(label)

Adds a human-readable label to a condition for debugging and UI display:

```python
condition = (
    dg.AutomationCondition.any_deps_updated()
    .since(dg.AutomationCondition.newly_requested())
).with_label("updated_since_requested")
```

Labels appear in condition evaluation traces in the Dagster UI, making complex conditions easier to understand.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.