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.
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/PKG-INFO +1 -1
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/pyproject.toml +1 -1
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/catalog/check_columns.py +22 -6
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/config_file_validator.py +1 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/version.py +1 -1
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/LICENSE +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/README.md +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/__init__.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/README.md +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/catalog_latest.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/manifest_latest.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/run_results_latest.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/check_base.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/common.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_exposures.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_lineage.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_macros.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_metadata.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_models.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_sources.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/run_results/check_run_results.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/config_file_parser.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/logger.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/main.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/runner.py +0 -0
- {dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/utils.py +0 -0
|
@@ -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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
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
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_exposures.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.28.0 → dbt_bouncer-1.29.0}/src/dbt_bouncer/checks/run_results/check_run_results.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|