joellabes
joellabes

Reputation: 138

`dbt run --select x` gives error `Could not find selector named x, expected one of []`

Using dbt 0.20.x and below, the command dbt run --select model_name fails.

It shows the error Runtime Error. Could not find selector named model_name, expected one of [] Code: 10001.

Upvotes: 4

Views: 3270

Answers (1)

joellabes
joellabes

Reputation: 138

In dbt 0.21.0, the node selection syntax was standardised to use --select everywhere. Before this, some commands like dbt run and dbt test used --models instead.

Older versions show the error because argparse is expanding --select to --selector, a different flag.

To fix this issue, either upgrade to dbt 0.21.0 or higher or use --models instead of --select.

Upvotes: 5

Related Questions