Update docs

This commit is contained in:
Benoit Perigaud
2024-04-25 16:20:42 +02:00
parent f6ebf38811
commit c583b3c408
4 changed files with 14 additions and 3 deletions

View File

@@ -92,6 +92,13 @@ vars:
chained_views_threshold: 8
```
## SQL code analysis
| variable | description | default |
| ----------- | ----------- | ----------- |
| `comment_chars` | a list of strings used for inline comments | `["--"]` |
| `token_costs` | a dictionary of SQL tokens (words) and associated complexity weight, <br>used to estimate models complexity | see in the `dbt_project.yml` file of the package |
## Execution
| variable | description | default |

View File

@@ -1,6 +1,8 @@
# Querying columns with SQL
# Querying columns names and descriptions with SQL
The model `stg_columns` ([source](https://github.com/dbt-labs/dbt-project-evaluator/tree/main/models/staging/graph/stg_columns.sql)), created with the package, lists all the columns from all the dbt nodes (models, sources, tests, snapshots)
The model `stg_columns` ([source](https://github.com/dbt-labs/dbt-project-evaluator/tree/main/models/staging/graph/stg_columns.sql)), created with the package, lists all the columns configured in all the dbt nodes (models, sources, tests, snapshots).
It will not list the columns of the models that have not explicitly been added to the YAML files.
You can use this model to help with questions such as:

View File

@@ -17,6 +17,8 @@ Building additional models and snapshots on top of this model could allow:
## Getting insights on potential refactoring work
- identifying models with a lof of lines of code
- identifying the models with the highest level of complexity leveraging the column `sql_complexity` from the table `int_all_graph_resources`, based on the weights defined in the `token_costs` variable
- looking at the longest "chains" of models in a project
- reviewing models with many/few direct dependents
- identifying potential bottlenecks

View File

@@ -81,7 +81,7 @@ nav:
- Configuring exceptions to the rules: customization/exceptions.md
- Excluding packages and models/sources based on path: customization/excluding-packages-and-paths.md
- Display issues in the logs: customization/issues-in-log.md
- Querying columns: customization/querying-columns.md
- Querying columns names and descriptions: customization/querying-columns-names-and-descriptions.md
- Run in CI Check: ci-check.md
- Querying the DAG: querying-the-dag.md
- Contributing: contributing.md