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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
GHerz
Frequent Visitor

Error when called StoreProcedure from Pipeline / failed to generate query plan

Dear all, 

 

I am calling a stored procedure in my Fabric DWH from a pipeline. 

The Proc is for incremental data load. 

 

It performs the following operations in order to merge a table with new/modified records into the main table.

- Update modified records

- Insert new records

 

That works well for a lot of tables, but for few tables I'm get the following error message during the update step:

 

"Request to perform an external distributed computation has failed with error "100001;Failed to generate query plan.".

Statement ID: {C98...."

 

Can someone help with an idea what this is about and how to solve?

 

Thanks and best regards!!

 

1 ACCEPTED SOLUTION
v-yilong-msft
Community Support
Community Support

Hi @GHerz ,

I noticed in your error you mentioned “100001;Failed to generate query plan.”. This error is due to a query plan generation issue in distributed environments such as Microsoft Fabric DWH.

 

Sometimes, complex queries, especially those involving COUNT(DISTINCT ...) can cause problems. Simplifying the query or using a function such as APPROX_COUNT_DISTINCT may help.

 

Errors may be related to the distribution of queries across nodes. Ensure that data distribution and degree of parallelism (DOP) are properly configured.

vyilongmsft_0-1726624320623.png

If you want to know more about this error, I think you can look at this topic: PolyBase error - 100001;Failed to generate query plan. - Microsoft Community Hub

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yilong-msft
Community Support
Community Support

Hi @GHerz ,

I noticed in your error you mentioned “100001;Failed to generate query plan.”. This error is due to a query plan generation issue in distributed environments such as Microsoft Fabric DWH.

 

Sometimes, complex queries, especially those involving COUNT(DISTINCT ...) can cause problems. Simplifying the query or using a function such as APPROX_COUNT_DISTINCT may help.

 

Errors may be related to the distribution of queries across nodes. Ensure that data distribution and degree of parallelism (DOP) are properly configured.

vyilongmsft_0-1726624320623.png

If you want to know more about this error, I think you can look at this topic: PolyBase error - 100001;Failed to generate query plan. - Microsoft Community Hub

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Yilong Zhou

 

your comment pointed me in the right direction. 

My Procedure, that runs in the DWH, uses a view from the Lakehouse. 

I tried to materialize the view into a DWH Table and using this table instead seems to solve my problem.

Thanks, Gunnar

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

November Update

Fabric Monthly Update - November 2024

Check out the November 2024 Fabric update to learn about new features.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.