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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Reponen
Frequent Visitor

Fabric dbt job fails but same code works on my own laptop

Hi,

 

I have faced few proplems. 

I have test that checks if key is null.

On my ownlaptop it gives pass  but in fabric enviroment it gives failed

 

Also somehow dbt in fabric changes timestamp2(6) -> (7) and fails.

 

Is there way to see combiled dbt code in fabric to pinpoint proplem?

 

-V

4 REPLIES 4
v-ssriganesh
Community Support
Community Support

Hello @Reponen,

We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

Thank you.

v-ssriganesh
Community Support
Community Support

Hi @Reponen,

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @Olufemi7 & @Lodha_Jaydeep for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

 

Thank you for being part of the Microsoft Fabric Community.

Olufemi7
Solution Sage
Solution Sage

Hello @Reponen,

You can see this in Fabric because it’s not the same engine as your local dbt run, so small differences show up.
The null test usually means the data isn’t exactly the same in Fabric (timing, duplicates, actual nulls). The datetime2(6) → (7) change is also normal — Fabric can use higher precision, which then breaks strict tests.
You can check what dbt actually ran: open the job run, go to Artifacts / Logs, and look at manifest.json or the target/compiled output.
What normally helps is compiling locally (dbt compile), then running the compiled SQL in Fabric to see where it differs. If it’s the timestamp, just cast it explicitly, e.g. CAST(column AS DATETIME2(6))

Reference: datetime2 (Transact-SQL)

Lodha_Jaydeep
Responsive Resident
Responsive Resident

Hi @Reponen,

Thanks for reaching, will happy to assist.

 

Yes, you should be able to inspect the compiled dbt SQL, but the exact location depends on how the Fabric dbt job is being run.

 

In a normal dbt project, compiled SQL is generated under target/compiled/

and SQL is often under target/compiled/

 

So first check whether the Fabric job output/artifacts expose the target older. The useful files are usually below:

target/compiled/<project_name>/models/...
target/run/<project_name>/models/...
target/manifest.json
target/run_results.json

 

If fabric do not expose directly you can add debugger step before/after dbt run or dbt test to list or copy target foler to lakehouse for example,

dbt compile ->Inspect->target/compiled

 

For troubleshooting please check dbt version in local and fabric

dbt --version
dbt debug
dbt compile
 
The timestamp2(6) to timestamp2(7) difference suggests the Fabric environment may be using a different adapter, connector, SQL dialect behavior, or package/dbt version than your laptop. Make sure the dbt version and adapter version match locally and in Fabric.
 
Please consdier this as an accepetd solution if it helps, or give some kudos.

Helpful resources

Announcements
April Fabric Update Carousel

Fabric Monthly Update - April 2026

Check out the April 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.