1. Home
  2. Docs
  3. Configure models
  4. Define tags

Define tags

Tags #

{{ block "CONFIG" .}}
  {{ setTags "blub" "bla"}}
  {{ setTagColors "#FF0000" "#00FF00"}}
{{end}}

Tags can be used to run only parts of the workflow.

Include in workflow run #

lesql run zzzexampleproject --tags tag1

This will only run models which have tag1 set

Exclude in workflow run #

lesql run zzzexampleproject --skip-tags tag1

This will run the complete workflow, but no models which have tag1 set

Show workflow #

lesql project zzzexampleproject workflow

This shows tags and tagColors in workflow yaml:

workflow:
- name: test3
  tags:
  - text: blub
    color: '#FF0000'
  - text: bla
    color: '#00FF00'
  type: exec
  parents:
  - test2
  exec: lesql run zzzexampleproject -m 000-test3.le.sql
- name: test2
  tags:
  - text: abc
    color: ""
  type: exec
  parents:
  - test1
  exec: lesql run zzzexampleproject -m 001-test2.le.sql