dbt-bouncer 1.28.0__tar.gz → 1.29.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/PKG-INFO +1 -1
  2. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/pyproject.toml +1 -1
  3. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/catalog/check_columns.py +22 -6
  4. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/config_file_validator.py +1 -0
  5. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/version.py +1 -1
  6. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/LICENSE +0 -0
  7. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/README.md +0 -0
  8. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/__init__.py +0 -0
  9. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/README.md +0 -0
  10. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/catalog_latest.py +0 -0
  11. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/manifest_latest.py +0 -0
  12. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/run_results_latest.py +0 -0
  13. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py +0 -0
  14. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py +0 -0
  15. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py +0 -0
  16. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py +0 -0
  17. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/check_base.py +0 -0
  18. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py +0 -0
  19. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/common.py +0 -0
  20. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_exposures.py +0 -0
  21. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_lineage.py +0 -0
  22. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_macros.py +0 -0
  23. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_metadata.py +0 -0
  24. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_models.py +0 -0
  25. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py +0 -0
  26. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py +0 -0
  27. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_sources.py +0 -0
  28. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py +0 -0
  29. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/run_results/check_run_results.py +0 -0
  30. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/config_file_parser.py +0 -0
  31. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/logger.py +0 -0
  32. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/main.py +0 -0
  33. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/runner.py +0 -0
  34. {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dbt-bouncer
3
- Version: 1.28.0
3
+ Version: 1.29.0
4
4
  Summary: Configure and enforce conventions for your dbt project.
5
5
  License: MIT
6
6
  Keywords: python,cli,dbt,CI/CD
@@ -39,7 +39,7 @@ name = "dbt-bouncer"
39
39
  readme = "README.md"
40
40
  repository = "https://github.com/godatadriven/dbt-bouncer"
41
41
  requires-python = ">=3.11,<3.14"
42
- version = "1.28.0"
42
+ version = "1.29.0"
43
43
 
44
44
  [project.scripts]
45
45
  dbt-bouncer = "dbt_bouncer.main:cli"
@@ -13,11 +13,11 @@ if TYPE_CHECKING:
13
13
  from dbt_artifacts_parser.parsers.catalog.catalog_v1 import (
14
14
  Nodes as CatalogNodes,
15
15
  )
16
+ from dbt_bouncer.artifact_parsers.parsers_common import DbtBouncerManifest
16
17
  from dbt_bouncer.artifact_parsers.parsers_manifest import (
17
18
  DbtBouncerModelBase,
18
19
  DbtBouncerTestBase,
19
20
  )
20
-
21
21
  from pydantic import model_validator
22
22
 
23
23
  from dbt_bouncer.check_base import BaseCheck
@@ -282,7 +282,9 @@ class CheckColumnsAreAllDocumented(BaseCheck):
282
282
  """All columns in a model should be included in the model's properties file, i.e. `.yml` file.
283
283
 
284
284
  Receives:
285
+ case_sensitive (Optional[bool]): Whether the column names are case sensitive or not. Necessary for adapters like `dbt-snowflake` where the column in `catalog.json` is uppercase but the column in `manifest.json` can be lowercase. Defaults to `false` for `dbt-snowflake`, otherwise `true`.
285
286
  catalog_node (CatalogNodes): The CatalogNodes object to check.
287
+ manifest_obj (DbtBouncerManifest): The DbtBouncerManifest object parsed from `manifest.json`.
286
288
  models (List[DbtBouncerModelBase]): List of DbtBouncerModelBase objects parsed from `manifest.json`.
287
289
 
288
290
  Other Parameters:
@@ -299,7 +301,9 @@ class CheckColumnsAreAllDocumented(BaseCheck):
299
301
 
300
302
  """
301
303
 
304
+ case_sensitive: Optional[bool] = Field(default=True)
302
305
  catalog_node: "CatalogNodes" = Field(default=None)
306
+ manifest_obj: "DbtBouncerManifest" = Field(default=None)
303
307
  models: List["DbtBouncerModelBase"] = Field(default=[])
304
308
  name: Literal["check_columns_are_all_documented"]
305
309
 
@@ -309,11 +313,23 @@ class CheckColumnsAreAllDocumented(BaseCheck):
309
313
  model = next(
310
314
  m for m in self.models if m.unique_id == self.catalog_node.unique_id
311
315
  )
312
- undocumented_columns = [
313
- v.name
314
- for _, v in self.catalog_node.columns.items()
315
- if v.name not in model.columns
316
- ]
316
+
317
+ if self.manifest_obj.manifest.metadata.adapter_type in ["snowflake"]:
318
+ self.case_sensitive = False
319
+
320
+ if self.case_sensitive:
321
+ undocumented_columns = [
322
+ v.name
323
+ for _, v in self.catalog_node.columns.items()
324
+ if v.name not in model.columns
325
+ ]
326
+ else:
327
+ undocumented_columns = [
328
+ v.name
329
+ for _, v in self.catalog_node.columns.items()
330
+ if v.name.lower() not in [c.lower() for c in model.columns]
331
+ ]
332
+
317
333
  assert not undocumented_columns, (
318
334
  f"`{self.catalog_node.unique_id.split('.')[-1]}` has columns that are not included in the models properties file: {undocumented_columns}"
319
335
  )
@@ -225,6 +225,7 @@ def validate_conf(
225
225
  DbtBouncerCatalogNode,
226
226
  )
227
227
  from dbt_bouncer.artifact_parsers.parsers_manifest import (
228
+ DbtBouncerManifest,
228
229
  DbtBouncerModelBase,
229
230
  DbtBouncerSnapshotBase,
230
231
  DbtBouncerSourceBase,
@@ -5,4 +5,4 @@ def version() -> str:
5
5
  str: The version of `dbt-bouncer`.
6
6
 
7
7
  """
8
- return "1.28.0"
8
+ return "1.29.0"
File without changes
File without changes