I am running DBT cloud job through API, and i am passing DBT run command by using steps_override. if model exists it's running fine but if model does not exist still, I am getting success message

I am running dbt cloud job through API, and i am passing dbt run command by using steps_override. if model exists it’s running fine but if model does not exist still, I am getting success message, But i need to get failed status.

Hi challa!

You can add --warn-error to raise an error

Turning on the WARN_ERROR config will convert dbt warnings into errors. Any time dbt would normally warn, it will instead raise an error. Examples include --select criteria that selects no resources, deprecations, configurations with no associated models, invalid test configurations, or tests and freshness checks that are configured to return warnings.

Hi Marcelo,

Thank for you response. I tried the command you suggested it’s working fine thank you so much.