Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Osamelgendy
Frequent Visitor

dbt job schema not working as expected

I'm writing schema.yml file, and defining tests.
When putting test as 'warn', it still fails as if I'm not putting the 'warn' config.
I have to remove the whole test so the job can test successfully. Same goes with 'unique'

 

Somone facing the same issue?

1 ACCEPTED SOLUTION
v-karpurapud
Community Support
Community Support

Hi @Osamelgendy 


Thank you for confirming that your schema.yml is structured correctly.
 

It’s worth looking at how the dbt job is being executed. In dbt, tests set to severity: warn should not cause the run to fail. If your Fabric job is still failing, it likely means dbt is returning a non-zero exit code.


One thing to check is whether the job is using the --warn-error flag (or something similar), as this can turn warnings into errors and cause the run to fail even when the test is set to severity: warn.

 

Also, review the exact command being used in Fabric (for example, dbt test vs dbt build) and check the job logs. The logs should show whether dbt is treating the test as a warning or an error.

 

In Fabric, job status is determined by the process exit code, not just the warning or error label:

https://learn.microsoft.com/en-us/fabric/data-factory/dbt-job-configure

So if the job is marked as failed, it means dbt is still exiting with an error.

If you can share your schema.yml and the command used in the job, it will help narrow down the exact cause.

 If you have any further questions, feel free to reach out and we'll be glad to assist.
 
Regards,

Microsoft Fabric Community Support Team.

 

View solution in original post

6 REPLIES 6
v-karpurapud
Community Support
Community Support

Hi @Osamelgendy 

We have not received a response from you regarding the query and were following up to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

 

Thank You.

v-karpurapud
Community Support
Community Support

Hi @Osamelgendy 

I wanted to follow up to see if you’ve had a chance to review the information shared. If you have any additional questions, please let us know. Has your issue been resolved, or are there more details you can provide so we can assist further?

Thank You.

v-karpurapud
Community Support
Community Support

Hi @Osamelgendy 


Thank you for confirming that your schema.yml is structured correctly.
 

It’s worth looking at how the dbt job is being executed. In dbt, tests set to severity: warn should not cause the run to fail. If your Fabric job is still failing, it likely means dbt is returning a non-zero exit code.


One thing to check is whether the job is using the --warn-error flag (or something similar), as this can turn warnings into errors and cause the run to fail even when the test is set to severity: warn.

 

Also, review the exact command being used in Fabric (for example, dbt test vs dbt build) and check the job logs. The logs should show whether dbt is treating the test as a warning or an error.

 

In Fabric, job status is determined by the process exit code, not just the warning or error label:

https://learn.microsoft.com/en-us/fabric/data-factory/dbt-job-configure

So if the job is marked as failed, it means dbt is still exiting with an error.

If you can share your schema.yml and the command used in the job, it will help narrow down the exact cause.

 If you have any further questions, feel free to reach out and we'll be glad to assist.
 
Regards,

Microsoft Fabric Community Support Team.

 

tayloramy
Super User
Super User

Hi @Osamelgendy

 

Can you post your test schema.yml file so we can better help? 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





stoic-harsh
Solution Supplier
Solution Supplier

Hey @Osamelgendy,

If removing the test makes the job pass, maybe your config is incorrectly structured. In dbt, severity: warn must be defined under config: within the test. Otherwise, it’s ignored and the test defaults to an error.

If your config is correctly structured (severity under config) and the job still fails, check if your orchestration is  configured to fail on warnings.

yes it's correctly structured, where to check if my orchestration is  configured to fail on warnings.?

Helpful resources

Announcements
June Fabric Update Carousel

Fabric Monthly Update - June 2026

Check out the June 2026 Fabric update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.