If environment on dbt run

is it possible to do something like this to limit data in development?

I would like to limit select in stg_ models in development and running dbt run on my development schema. but not in job deployment runs.

select * from {{ source(…) }}
{{ if not job run }} limit 1000 {{ end }}
{{ if environment == development }} limit 1000 {{ end }}

maybe I’m doing something wrong and there is a better solution for this.

thanks, peter

Hi @peterkoman,
Did you read this post ? Conditionally running dbt tests / Only running dbt tests in production
You may find there a way to implement your idea.

good dbt-ing !

1 Like