# Graph Operators

Graph operators in dbt are special syntax used with the `--select` flag to target specific parts of your project's execution graph (DAG). This graph represents the dependencies between your models, with each model as a node and the dependencies as edges.

The graph operators allow you to navigate this execution graph and select subsets of your project's resources. They're like secret codes to tell dbt exactly which models you want to work with, whether it's running, testing, or listing them.

<figure><img src="/files/f6tEc7NHdheyYLCBAoGR" alt=""><figcaption></figcaption></figure>

### Operators

#### Wildcard Operator (`*`)

Run all models in a schema.

```bash
dbt run --select my_schema.*
```

#### Path Operator

No special character needed, just use the path.

```bash
dbt run --select models/staging
```

#### Parent/Child Operator (`+`)

The plus before a model name selects the model and its parents. The plus after a model name selects the model and its children.

```bash
dbt run --select +final_model
dbt run --select parent_model+
```

#### Exclusion Operator (`@`)

Select parents or children, without the original model.

```bash
dbt run --select @model_name
dbt run --select model_name@
```

#### Selection Operator (`,`)

Run multiple models.

```bash
dbt run --select model1,model2,model3
```

#### Intersection Operator (`,`)

Get the intersection of multiple selectors.

```bash
dbt run --select tag:nightly,staging.*
```

### Pro Tips

* Combine operators for laser-focused selection:

```bash
dbt run --select tag:nightly,+final_model
```

* Use `dbt ls` to preview your selection:

```bash
dbt ls --select tag:nightly,+final_model
```

* Refresh two generations of parents and all children of critical models:

```bash
dbt run --select +2tag:critical+
```

* Test everything related to final reports except the reports themselves:

```bash
dbt test --select @tag:final_report@
```

* Remember, the order of operators matters, as dbt processes them from left to right.

With these graph operators, you can create powerful, precise dbt commands to execute exactly the models you need in your data transformation pipelines.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/concepts/dbt-fundamentals/running-dbt/mastering-the-dbt-cli/graph-operators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
