Skip to content

Commit

Permalink
Add a new docs page 'Querying Columns'
Browse files Browse the repository at this point in the history
  • Loading branch information
gastlich committed Oct 24, 2023
1 parent 860eedb commit 4a327b2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions docs/customization/querying-columns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Querying columns with SQL

The model `int_all_columns` ([source](https://github.com/dbt-labs/dbt-project-evaluator/tree/main/models/marts/core/int_all_columns.sql)), created with the package, lists all the columns from all the dbt nodes (models, sources, seeds, snapshots, analyses)

You can use this model to help with questions such as:

- Are there columns with the same name in different nodes?
- Are there columns that lack descriptions?
- Do any columns share the same name but have different descriptions?
- Are there columns with names that match a specific pattern (regex)?
- Have any prohibited names been used for columns?


## Defining additional tests that match your exact requirements

- writing a model with `ref(int_all_columns)` with custom tests added for a specific use case
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ models:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- unique_id
- column_name
- name
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ models:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- unique_id
- column_name
- name

- name: stg_sources
description: "Staging model from the graph variable, one record per source resource."
Expand Down

0 comments on commit 4a327b2

Please sign in to comment.