> [!WARNING] > > This might be a design choice. If it is, please close this 😋 ## Summary The [`ignore_patterns` configuration option in the `config.yaml` file](https://sqlmesh.readthedocs.io/en/stable/reference/configuration/#projects) takes a list of glob patterns. However, the globbing isn't recursive: the pattern `/**/` does not match any number of directories. This might be a design choice, but it took me by surprise, as I'm used to `/**/` matching zero or more directories. ## Minimal working example Consider a minimal SQLMesh project with the following structure: ``` config.yaml models/ models.sql domain/ domain.sql user/ user.sql ``` I've checked how SQLMesh ignores files by running `sqlmesh info` and checking the `Models` count in the console. With `ignore_patterns: []`, SQLMesh finds 3 models as expected. With `ignore_patterns: ["models/*.sql"]`, SQLMesh finds 2 models as expected. However, with `ignore_patterns: ["models/**/*.sql"]`, SQLMesh still finds 2 models, whereas I was expecting it to find 0 models.
Warning
This might be a design choice. If it is, please close this 😋
Summary
The
ignore_patternsconfiguration option in theconfig.yamlfile takes a list of glob patterns.However, the globbing isn't recursive: the pattern
/**/does not match any number of directories.This might be a design choice, but it took me by surprise, as I'm used to
/**/matching zero or more directories.Minimal working example
Consider a minimal SQLMesh project with the following structure:
I've checked how SQLMesh ignores files by running
sqlmesh infoand checking theModelscount in the console.With
ignore_patterns: [], SQLMesh finds 3 models as expected.With
ignore_patterns: ["models/*.sql"], SQLMesh finds 2 models as expected.However, with
ignore_patterns: ["models/**/*.sql"], SQLMesh still finds 2 models, whereas I was expecting it to find 0 models.