mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
feat(dbt): create plugin (#11635)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
parent
07454029bd
commit
5d3e86e2a4
3 changed files with 53 additions and 0 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -10,3 +10,4 @@ plugins/universalarchive/ @Konfekt
|
|||
plugins/wp-cli/ @joshmedeski
|
||||
plugins/zoxide/ @ajeetdsouza
|
||||
plugins/starship/ @axieax
|
||||
plugins/dbt/ @msempere
|
||||
|
|
29
plugins/dbt/README.md
Normal file
29
plugins/dbt/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# dbt plugin
|
||||
|
||||
## Introduction
|
||||
|
||||
The `dbt plugin` adds several aliases for useful [dbt](https://docs.getdbt.com/) commands and
|
||||
[aliases](#aliases).
|
||||
|
||||
To use it, add `dbt` to the plugins array of your zshrc file:
|
||||
|
||||
```
|
||||
plugins=(... dbt)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| ------ | ------------------------------------------------ | ---------------------------------------------------- |
|
||||
| dbtlm | `dbt ls -s state:modified` | List modified models only |
|
||||
| dbtrm | `dbt run -s state:modified` | Run modified models only |
|
||||
| dbttm | `dbt test -m state:modified` | Test modified models only |
|
||||
| dbtrtm | `dbtrm && dbttm` | Run and test modified models only |
|
||||
| dbtrs | `dbt clean; dbt deps; dbt seed` | Re-seed data |
|
||||
| dbtfrt | `dbtrs; dbt run --full-refresh; dbt test` | Perform a full fresh run with tests |
|
||||
| dbtcds | `dbt docs generate; dbt docs serve` | Generate docs without compiling |
|
||||
| dbtds | `dbt docs generate --no-compile; dbt docs serve` | Generate and serve docs skipping doc. re-compilation |
|
||||
|
||||
## Maintainer
|
||||
|
||||
### [msempere](https://github.com/msempere)
|
23
plugins/dbt/dbt.plugin.zsh
Normal file
23
plugins/dbt/dbt.plugin.zsh
Normal file
|
@ -0,0 +1,23 @@
|
|||
# list modified models only
|
||||
alias dbtlm="dbt ls -s state:modified"
|
||||
|
||||
# run modified models only
|
||||
alias dbtrm="dbt run -s state:modified"
|
||||
|
||||
# test modified models only
|
||||
alias dbttm="dbt test -m state:modified"
|
||||
|
||||
# run and test modified models only
|
||||
alias dbtrtm="dbtrm && dbttm"
|
||||
|
||||
# re-seed data
|
||||
alias dbtrs="dbt clean; dbt deps; dbt seed"
|
||||
|
||||
# perform a full fresh run with tests
|
||||
alias dbtfrt="dbtrs; dbt run --full-refresh; dbt test"
|
||||
|
||||
# generate and serve docs
|
||||
alias dbtcds="dbt docs generate; dbt docs serve"
|
||||
|
||||
# generate and serve docs skipping doc. re-compilation
|
||||
alias dbtds="dbt docs generate --no-compile; dbt docs serve"
|
Loading…
Reference in a new issue