Forum Discussion

mwferris's avatar
mwferris
Frequent Visitor
23 days ago

DBT Job test warnings causing job failure

I have tests configured to have a severity of warn, and these are still causing my dbt job to fail. I am not using any of the dbt features that cause warnings to be escalated to errors. Is this expected? 

 

 

From the dbt run_results, the dbt job invocation command:

dbt build --threads 4 --no-debug --no-defer --no-log-cache-events --log-format json --log-level-file info --log-level info --log-path logs/ --no-print --no-quiet --no-send-anonymous-usage-stats --target-path target/ --no-use-colors-file --no-use-colors --no-use-experimental-parser --write-json

 

from dbt.log, the summary of errors/warnings

{"data": {"stats": {"error": 0, "noop": 0, "pass": 2, "skip": 0, "total": 3, "warn": 1}}, "info": {"category": "", "code": "Z023", "extra": {}, "invocation_id": "45d294d3-bd9e-4335-948f-66b40bc78e3d", "level": "info", "msg": "Done. PASS=2 WARN=1 ERROR=0 SKIP=0 NO-OP=0 TOTAL=3", "name": "StatsLine", "pid": 956, "thread": "MainThread", "ts": "2026-07-31T17:48:35.660715Z"}}

 

5 Replies

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Impactful Individual

    Hi mwferris ,

     

    Based on the command and the dbt summary you shared, I would not expect this run to fail under standard dbt behaviour.

     

    Your invocation does not include --warn-error or --warn-error-options, and the final dbt statistics show:

     

    PASS=2 WARN=1 ERROR=0

     

    A test configured with severity: warn should return a warning status rather than an error, and dbt warnings should not produce a failing exit code unless they are explicitly promoted to errors.

     

    This makes me suspect that the Fabric dbt Job wrapper may be interpreting any non-pass test result as a failed job, even though the underlying dbt process completed with warnings only.

     

    I would check two things first:

    1. Open the complete dbt log or run_results.json and confirm the final dbt exit code.
    2. Check whether the Fabric job failure details contain a separate platform-level error after the dbt command completes.

    If the exit code is 0 and run_results.json contains only warn and pass statuses, then the test configuration is behaving correctly and the failure is likely coming from Fabric’s job-status evaluation rather than dbt itself.

     

    As a temporary diagnostic, you could run the same project locally or through another dbt runner using the identical command. If that completes successfully with the same warning, it would further isolate the issue to the Fabric dbt Job implementation.

     

    I would also raise a Fabric support ticket or product issue and include:

    • the dbt Job run ID,
    • the full invocation command,
    • the dbt version and adapter version,
    • run_results.json,
    • the final process exit code,
    • the Fabric job failure details.

    From the evidence shown here, I do not believe a severity: warn test should be failing the underlying dbt build unless warnings are being escalated elsewhere.

    • mwferris's avatar
      mwferris
      Frequent Visitor

      The dbt job exit code is not logged when run through a DBT Job as far as I can tell. Running this locally does not return any error codes.

      • ShivekMaharaj's avatar
        ShivekMaharaj
        Impactful Individual

        Hi mwferris,

         

        Thanks for confirming that the same project completes locally without errors.

         

        That makes me more confident that the warning is being handled correctly by dbt, but interpreted as a failure by the Fabric dbt Job wrapper.

         

        According to dbt’s test severity behaviour, a test configured with severity: warn should remain a warning unless warnings are explicitly promoted to errors. Your command does not include --warn-error, and the final result shows:

        PASS=2 WARN=1 ERROR=0

        Since Fabric does not expose the process exit code in the job output, I would now focus on the complete job logs and Fabric’s final status evaluation.

         

        Microsoft documents that the full dbt execution logs are available through OneLake dbt Job logging, including details that may be missing or truncated in the normal run view.

         

        I would check the final section of dbt.log and run_results.json for:

        • Whether dbt reports successful completion
        • Any exception after the dbt command finishes
        • The final invocation status
        • A Fabric-specific error added after the dbt result is produced

        If those logs still show a successful dbt completion with warnings only, I think this is strong evidence of a Fabric dbt Job status-handling issue rather than a problem with your test configuration.

         

        At that point, I would include the full OneLake logs, job ID, Fabric region and dbt adapter/version in a support case or product issue.

         

        Please keep us posted if the complete logs reveal anything after the dbt summary. This looks like a useful edge case for the dbt Job team to investigate.

  • v-sathmakuri's avatar
    v-sathmakuri
    Community Support

    Hi mwferris ,

     

    Thank you for reaching out to fabric ocmmunity.

     

    Could you review the suggestion provided by ShivekMaharaj  and let us know if you have any additional questions, we are happy to address. 

     

    Thanks!!

  • v-sathmakuri's avatar
    v-sathmakuri
    Community Support

    Hi mwferris  ,

     

    Could you please check the provided suggestions and let us know if you have any further questions.

     

    Thanks!!