-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
RefinementMaintainer input neededMaintainer input neededenhancementNew feature or requestNew feature or request
Description
Is this a new bug in dbt-core?
- I believe this is a new bug in dbt-core
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Adding reference to any files in the dbt_packages folder to the .dbtignore file does not lead to these being ignored. This may be needed as you wish to ignore certain files from the package (e.g. a sources or other yaml file that clashes, or docs. Models/seeds could be disabled via the project yaml).
Expected Behavior
These files would be ignored on a compile or a run.
Steps To Reproduce
- Initialise a new project
- Install a package that contains some models or seeds, e.g. :
packages: - package: snowplow/snowplow_web version: [">=0.15.0"] - Create and ddd the whole package folder to the
.dbtignorefile:dbt_packages/snowplow_web/* - Run
dbt runand notice that all models from the package is still included in the run.
Edit with a slightly easier example
- Install the dbt_utils package
packages: - package: dbt-labs/dbt_utils version: 1.1.1 - Create and add the whole package folder to the
.dbtignorefile:dbt_packages - Create a model that uses a dbt_utils macro, e.g. date_spine:
{{ dbt_utils.date_spine( datepart="day", start_date="cast('2019-01-01' as date)", end_date="cast('2020-01-01' as date)" ) }} - Do a
dbt runand this model passes, when it should fail (which you can verify by removing the package and doing adbt clean, which should be the equivalent state if the package was being ignored).
End Edit
Relevant log output
No response
Environment
- OS: Mac OS
- Python: 3.9.13
- dbt:
Core:
- installed: 1.5.1
- latest: 1.5.3 - Update available!
Your version of dbt-core is out of date!
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
- databricks: 1.5.4 - Update available!
- bigquery: 1.5.1 - Update available!
- snowflake: 1.5.1 - Update available!
- redshift: 1.5.4 - Update available!
- postgres: 1.5.1 - Update available!
- spark: 1.5.0 - Up to date!Which database adapter are you using with dbt?
Postgres
Additional Context
This PR introduced the feature, but I am not sure where in here these would be being not included in the ignore...
#5897
aayushr7, dwreeves and JeanLouisLamezec
Metadata
Metadata
Assignees
Labels
RefinementMaintainer input neededMaintainer input neededenhancementNew feature or requestNew feature or request