You can create a .dbtignore file in the root of your dbt project to specify files that should be entirely ignored by dbt. The file behaves like a .gitignore file, using the same syntax. Files and subdirectories matching the pattern will not be read, parsed, or otherwise detected by dbt—as if they didn't exist.
# .dbtignore# ignore individual .py filesnot-a-dbt-model.pyanother-non-dbt-model.py# ignore all .py files**.py# ignore all .py files with "codegen" in the filename*codegen*.py