dbt-labs / dbt-labs/dbt-project-evaluator

Store the compiled code from hooks, or statistics on it

Open
#428 9 comments 0 reactions 0 assignees View on GitHub
enhancement Stale
Dominant language
Shell
Stars
577
Forks
93
Avg merge
9h 46m
Merged PRs (30d)
1

Description

### Describe the feature
As a project admin, I want to be able to analyze the code written in hooks on dbt models. dbt hooks can execute arbitrary SQL statements. The goal of capturing this data is to be able to catch situations in which business logic is embedded in hooks instead of being coded in dbt models themselves.

### Describe alternatives you've considered
- Linters might be able to achieve something similar. Scanning SQL Fluff's dbt [templater](https://docs.sqlfluff.com/en/stable/configuration.html#dbt-templater) I didn't see any obvious controls for hooks.

- If storing the SQL code itself is problematic because of practical, security reasons, it might be useful to compute summary statistics e.g. total number of lines

### Additional context
By having additional tools to align the dbt codebase, dbt users can better leverage additional features like restarting jobs from the point of failure.

### Who will this benefit?
Groups migrating from legacy SQL systems to dbt.

### Are you interested in contributing this feature?
Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.