Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckColumnDescAreSame(ChecksInsight):
NAME = "Column descriptions consistent for same column names"
NAME = "column_name_inconsistent_desc"
ALIAS = "column_descriptions_are_same"
DESCRIPTION = "Column description for the same column name should be same "
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class CheckColumnNameContract(ChecksInsight):
NAME = "Column name follows contract pattern"
NAME = "column_name_pattern_violation"
ALIAS = "column_name_contract"
DESCRIPTION = "Column names should adhere to the contract pattern defined for the data type. "
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckMacroArgsHaveDesc(ChecksInsight):
NAME = "Check macro arguments has description"
NAME = "macro_arg_no_desc"
ALIAS = "check_macro_args_have_desc"
DESCRIPTION = "Macro arguments should have a description. "
REASON_TO_FLAG = "Clear descriptions for macro arguments are crucial as they prevent misunderstandings, enhance user comprehension, and simplify maintenance. This leads to more accurate data analysis and efficient workflows."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckMacroHasDesc(ChecksInsight):
NAME = "Macro has documentation"
NAME = "macro_no_docs"
ALIAS = "check_macro_has_desc"
DESCRIPTION = "Macros should be documented."
REASON_TO_FLAG = "Undocumented macros can cause misunderstandings and inefficiencies in data modeling and analysis, as they make it difficult to understand their purpose and usage. Clear descriptions are vital for accuracy and streamlined workflow."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class CheckModelHasAllColumns(ChecksInsight):
NAME = "Model has all columns as per catalog"
NAME = "model_missing_columns"
ALIAS = "check_model_has_all_columns"
DESCRIPTION = "Models should have all the columns as per the catalog."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class CheckModelHasMetaKeys(ChecksInsight):
NAME = "Model has all valid keys in metadata"
NAME = "model_invalid_meta_keys"
ALIAS = "check_model_has_valid_meta_keys"
DESCRIPTION = "Model always has a list of valid metadata keys."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckModelHasPropertiesFile(ChecksInsight):
NAME = "Model has properties file"
NAME = "model_no_schema_file"
ALIAS = "check_model_has_properties_file"
DESCRIPTION = "Models should have a properties/schema file (.yml) defined."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckModelHasTestsByGroup(ChecksInsight):
NAME = "Model has tests by group"
NAME = "model_insufficient_tests_by_group"
ALIAS = "check_model_has_tests_by_group"
DESCRIPTION = "Check if models have a number of tests for specific test groups."
REASON_TO_FLAG = "Models should have tests with specific groups for proper validation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckModelHasTestsByName(ChecksInsight):
NAME = "Model has tests by name"
NAME = "model_missing_required_tests"
ALIAS = "check_model_has_tests_by_name"
DESCRIPTION = "Checks that the model has tests with specific names."
REASON_TO_FLAG = "Models should have tests with specific names for proper validation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckModelHasTestsByType(ChecksInsight):
NAME = "Model has tests by type"
NAME = "model_insufficient_tests_by_type"
ALIAS = "check_model_has_tests_by_type"
DESCRIPTION = "Checks that the model has tests with specific types."
REASON_TO_FLAG = "Models should have tests with specific types for proper validation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckModelMaterializationByChilds(ChecksInsight):
NAME = "Model materialization by children"
NAME = "model_suboptimal_materialization"
ALIAS = "check_model_materialization_by_childs"
DESCRIPTION = "Fewer children than threshold ideally should be view or ephemeral, more or equal should be table or incremental."
REASON_TO_FLAG = "The model is flagged due to inappropriate materialization: models with child counts above the threshold require robust and efficient data processing, hence they should be materialized as tables or incrementals for optimized query performance and data management."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class CheckModelNameContract(ChecksInsight):
NAME = "Valid Mmdel name by folder"
NAME = "model_name_pattern_violation"
ALIAS = "model_name_by_folder"
DESCRIPTION = (
"Check that model name abides to a contract (similar to check-column-name-contract). A contract consists of a regex pattern."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckModelParentsAndChilds(ChecksInsight):
NAME = "Model has specific number of parents or/and childs"
NAME = "model_excessive_dependencies"
ALIAS = "check_model_parents_and_childs"
DESCRIPTION = "Ensures the model has a specific number (max/min) of parents or/and childs."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckModelParentsDatabase(ChecksInsight):
NAME = "Check model parents database"
NAME = "model_invalid_database"
ALIAS = "check_model_parents_database"
DESCRIPTION = "Ensures the parent models or sources are from certain database."
REASON_TO_FLAG = "The model has a different database as parent model or source."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckModelParentsSchema(ChecksInsight):
NAME = "Model Parents are from an allowed list of schemas"
NAME = "model_invalid_schema"
ALIAS = "check_model_parents_schema"
DESCRIPTION = "Ensures the parent models or sources are from certain schema."
REASON_TO_FLAG = "The model has a different schema as parent model or source."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckModelTags(ChecksInsight):
NAME = "Model only has valid tags"
NAME = "model_invalid_tags"
ALIAS = "check_model_tags"
DESCRIPTION = "Ensures that the model has only valid tags from the provided list."
REASON_TO_FLAG = "The model has tags that are not in the valid tags list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceChilds(ChecksInsight):
NAME = "Source has allowed number of children"
NAME = "source_excessive_dependencies"
ALIAS = "check_source_childs"
DESCRIPTION = "Check the source has a specific number (max/min) of childs"
REASON_TO_FLAG = "The source has a number of childs that is not in the valid range"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class CheckSourceColumnsHaveDescriptions(ChecksInsight):
NAME = "Source columns have descriptions"
NAME = "source_columns_no_description"
ALIAS = "check_source_columns_have_desc"
DESCRIPTION = "Ensures that the source has columns with descriptions in the properties file (usually schema.yml)."
REASON_TO_FLAG = "Missing descriptions for columns in the source can lead to confusion and inconsistency in analysis. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class CheckSourceHasAllColumns(ChecksInsight):
NAME = "Source has all columns"
NAME = "source_missing_columns"
ALIAS = "check_source_has_all_columns"
DESCRIPTION = "Ensures that all columns in the database are also specified in the properties file. (usually schema.yml)."
REASON_TO_FLAG = "Missing columns in the source can lead to confusion and inconsistency in analysis. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceHasFreshness(ChecksInsight):
NAME = "Source has freshness options"
NAME = "source_no_freshness"
ALIAS = "check_source_has_freshness"
DESCRIPTION = "Ensures that the source has freshness options"
REASON_TO_FLAG = "Missing freshness options for the source can lead to confusion and inconsistency in analysis. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceHasLoader(ChecksInsight):
NAME = "Source has loader"
NAME = "source_no_loader"
ALIAS = "check_source_has_loader"
DESCRIPTION = "Check if the source has a loader"
REASON_TO_FLAG = "Missing loader for the source can lead to confusion and inconsistency in analysis. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class CheckSourceHasMetaKeys(ChecksInsight):
NAME = "Source has required metadata keys"
NAME = "source_invalid_meta_keys"
ALIAS = "check_source_has_meta_keys"
DESCRIPTION = "Check if the source has required metadata keys"
REASON_TO_FLAG = "Missing meta keys in the source can lead to inconsistency in metadata management and understanding of the source. It's important to ensure that the source includes all the required meta keys as per the configuration."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceHasTests(ChecksInsight):
NAME = "Source has tests"
NAME = "source_no_tests"
ALIAS = "check_source_has_tests"
DESCRIPTION = "Check if the source has tests"
REASON_TO_FLAG = "The source table is missing tests. Ensure that the source table has tests."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckSourceHasTestsByGroup(ChecksInsight):
NAME = "Source has tests by group"
NAME = "source_insufficient_tests_by_group"
ALIAS = "check_source_has_tests_by_group"
DESCRIPTION = "Check if sources have a number of tests for specific test groups."
REASON_TO_FLAG = "Sources should have tests with specific groups for proper validation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class CheckSourceHasTestsByName(ChecksInsight):
NAME = "Source has tests by name"
NAME = "source_missing_required_tests"
ALIAS = "check_source_has_tests_by_name"
DESCRIPTION = "Checks that the source has tests with specific names."
REASON_TO_FLAG = "Sources should have tests with specific names for proper validation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceHasTestsByType(ChecksInsight):
NAME = "Source has tests by type"
NAME = "source_insufficient_tests_by_type"
ALIAS = "check_source_has_tests_by_type"
DESCRIPTION = "Checks that the source has tests with specific types."
REASON_TO_FLAG = "Sources should have tests with specific types for proper validation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceTableHasDescription(ChecksInsight):
NAME = "Source table has description"
NAME = "source_no_description"
ALIAS = "check_source_table_has_desc"
DESCRIPTION = "Ensures that the source table has a description"
REASON_TO_FLAG = "Missing description for the source table can lead to confusion and inconsistency in analysis. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class CheckSourceTags(ChecksInsight):
NAME = "Source has tags"
NAME = "source_invalid_tags"
ALIAS = "check_source_tags"
DESCRIPTION = "The source has only valid tags from the provided list."
REASON_TO_FLAG = "The source has tags that are not in the valid tags list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MissingPrimaryKeyTests(DBTTestInsight):
NOT_NULL = "not_null"
UNIQUE = "unique"
UNIQUE_COMBINATION_OF_COLUMNS = "unique_combination_of_columns"
NAME = "Missing primary key tests"
NAME = "missing_primary_keys_tests"
ALIAS = "missing_primary_key_tests"
DESCRIPTION = "Checks if the model has a primary key test. "
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DBTTestCoverage(DBTTestInsight):
It aims to ensure that a minimum percentage of tests are applied to each model to maintain data integrity.
"""

NAME = "Low test coverage in dbt models"
NAME = "low_test_coverage"
ALIAS = "dbt_low_test_coverage"
DESCRIPTION = "Checks if the project test coverage is below the minimum threshold. "
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DBTDocumentationStaleColumns(DBTGovernanceInsight):
DBTDocumentationStaleColumns identifies columns that have been documented but are no longer present in the model.
"""

NAME = "Documentation of stale columns"
NAME = "model_stale_column_desc"
ALIAS = "documentation_on_stale_columns"
DESCRIPTION = (
"Identify columns that have been documented but are no longer present in the model. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DBTExposureDependentOnPrivateModels(DBTGovernanceInsight):
DBTExposureDependentOnPrivateModels identifies exposures that are dependent on private models.
"""

NAME = "Exposures dependent on private models"
NAME = "exposure_private_dependency"
ALIAS = "exposures_dependent_on_private_models"
DESCRIPTION = "Identify exposures that are dependent on private models. "
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DBTPublicModelWithoutContracts(DBTGovernanceInsight):
DBTUndocumentedPublicModels identifies public models that are not documented.
"""

NAME = "Public models without contracts"
NAME = "public_model_no_contract"
ALIAS = "public_models_without_contracts"
DESCRIPTION = "Identify public models that don't have contracts."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DBTMissingDocumentation(DBTGovernanceInsight):
DBTDocumentationStaleColumns identifies columns that have been documented but are no longer present in the model.
"""

NAME = "Missing documentation"
NAME = "model_undocumented_columns"
ALIAS = "missing_documentation"
DESCRIPTION = (
"Detects columns and models in the dbt project that lack documentation. Proper documentation is essential "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DBTUndocumentedPublicModels(DBTGovernanceInsight):
DBTUndocumentedPublicModels identifies public models that are not documented.
"""

NAME = "Undocumented public models"
NAME = "undocumented_public_models"
ALIAS = "undocumented_public_models"
DESCRIPTION = "Identify public models that don't have documentation."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DBTDirectJoinSource(DBTModellingInsight):
"""

ALIAS = "source_staging_model_integrity"
NAME = "Source-Staging Model Integrity"
NAME = "direct_join_to_source"
DESCRIPTION = "A model should not have direct joins to both sources and other staging models. "
REASON_TO_FLAG = (
"Flagged when a model directly joins a source and a model without a staging intermediary. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class DBTDownstreamModelsDependentOnSource(DBTModellingInsight):
in a dbt project that depend directly on a source node.
"""

NAME = "Downstream models dependent on source"
ALIAS = "downstream_source_dependence"
NAME = "model_downstream_source_dependency"
ALIAS = "downstream_source_dependency"
DESCRIPTION = "Downstream models should not depend directly on source nodes. "
REASON_TO_FLAG = (
"Direct dependency of marts or intermediate models on a source node suggests a missing staging model. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DBTDuplicateSources(DBTModellingInsight):
Ref: https://github.com/dbt-labs/dbt-project-evaluator/blob/main/models/marts/dag/fct_duplicate_sources.sql
"""

NAME = "Duplicate sources"
NAME = "duplicate_source"
ALIAS = "Duplicate_Sources"
DESCRIPTION = "Duplicate sources should be avoided."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DBTHardCodedReferences(DBTModellingInsight):
Checks if the dbt model has hard coded references to other models.
"""

NAME = "Hard coded references"
NAME = "hardcoded_refs"
ALIAS = "hard_coded_references"
DESCRIPTION = "Models should not have hard-coded references to tables"
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ class DBTRejoiningOfUpstreamConcepts(DBTModellingInsight):
model has no other downstream dependencies.
"""

NAME = "Rejoining of upstream Concepts"
NAME = "upstream_rejoins"
ALIAS = "rejoining_upstream_concepts"
DESCRIPTION = (
"Detects scenarios where a parent's direct child is also a direct child of another one " "of the parent's direct children."
)
DESCRIPTION = "Detects scenarios where a parent's direct child is also a direct child of another one of the parent's direct children."
REASON_TO_FLAG = (
"Flagged to identify cases where a parent model has a direct child that is also a direct child "
"of another one of the parent's direct children. Such patterns can suggest loops or redundancies in the DAG."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DBTModelFanout(DBTModellingInsight):
of direct leaf children, indicating a high model fanout.
"""

NAME = "Model fanout analysis"
NAME = "model_excessive_fanout"
ALIAS = "model_fanout"
DESCRIPTION = "Identifies parent models with an unusually high number of children. "
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DBTModelsMultipleSourcesJoined(DBTModellingInsight):
DBTModelsMultipleSourcesJoined identifies models in a dbt project that reference more than one source.
"""

NAME = "Multiple sources joined"
NAME = "multi_source_joins"
ALIAS = "multiple_sources_joined"
DESCRIPTION = "Models should not directly join multiple sources."
REASON_TO_FLAG = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DBTRootModel(DBTModellingInsight):
meaning these models cannot be traced back to a declared source or model.
"""

NAME = "Root model traceability"
NAME = "orphan_models"
ALIAS = "root_model"
DESCRIPTION = "Identifies models in a dbt project with 0 direct parents, meaning these models cannot be traced back to a declared source or model."
REASON_TO_FLAG = (
Expand Down
Loading
Loading