post-hook

⚠️
 

Heads up!

This is a work in progress document. While this configuration applies to multiple resource types, the documentation has only been written for seeds.

Definition

A SQL statement (or list of SQL statements) to be run after a model is built / a seed is built.

Post-hooks can also call macros that return SQL statements.

Examples

Grant select privileges on a seed

dbt_project.yml
seeds:
post-hook: "grant select on {{ this }} to group reporter"

Grant multiple select privileges on a seed

dbt_project.yml
seeds:
post-hook:
- "grant select on {{ this }} to group reporter"
- "grant select on {{ this }} to group transformer"

Call a macro to grant select privileges on a seed

dbt_project.yml
seeds:
post-hook: "{{ grant_select(this) }}"