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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lavdeep
Advocate I
Advocate I

Data connectivity import mode work perfect but getting error direct Query mode

Hi,

 

I want to load data from SQL Server I write SQL query for it. My SQL query code work perfect when I select import Data connectivity mode but getting below error.

please help why I am getting error  ??

 

eeee.PNG

1 ACCEPTED SOLUTION

Hi  @lavdeep ,

 

There are currently a few limitations to using DirectQuery:

 

  • All tables must come from a single database, unless using composite models
  • If the Query Editor query is overly complex, an error will occur. To remedy the error you must either delete the problematic step in Query Editor, or Import the data instead of using DirectQuery. For multi-dimensional sources like SAP Business Warehouse, there is no Query Editor
  • Relationship filtering is limited to a single direction, rather than both directions (though it is possible to enable cross filtering in both directions for DirectQuery as a Preview feature). For multi-dimensional sources like SAP Business Warehouse, there are no relationships defined in the model
  • Time intelligence capabilities are not available in DirectQuery. For example, special treatment of date columns (year, quarter, month, day, so on) is not supported in DirectQuery mode.
  • By default, limitations are placed on DAX expressions allowed in measures; see the following paragraph (after this bulleted list) for more information
  • There is a one-million-row limit for returning data when using DirectQuery. The limit does not affect aggregations or calculations used to create the dataset returned using DirectQuery, only the rows returned. For example, you can aggregate 10 million rows with your query that runs on the data source, and accurately return the results of that aggregation to Power BI using DirectQuery as long as the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be returned from DirectQuery, Power BI returns an error.

 

You can learn more :https://docs.microsoft.com/en-us/power-bi/desktop-use-directquery#limitations-of-directquery,

https://docs.microsoft.com/en-us/power-bi/desktop-directquery-about#implications-of-using-directquer... .

 

Best Regards,

Amy

 

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

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @lavdeep ,

 

From your error message, there is something wrong with the bracket ")" in your SQL query code, maybe miss , excess or in wrong place. Please check it.

 

Best Regards,

Amy

 

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

 

Hi @v-xicai

 

thanks for reply 

If SQL query code incorrect then it should not work with data connectivity import mode but SQL query code execute without any error.  I am getting the error when I select  direct Query mode with same SQL query code

Hi  @lavdeep ,

 

There are currently a few limitations to using DirectQuery:

 

  • All tables must come from a single database, unless using composite models
  • If the Query Editor query is overly complex, an error will occur. To remedy the error you must either delete the problematic step in Query Editor, or Import the data instead of using DirectQuery. For multi-dimensional sources like SAP Business Warehouse, there is no Query Editor
  • Relationship filtering is limited to a single direction, rather than both directions (though it is possible to enable cross filtering in both directions for DirectQuery as a Preview feature). For multi-dimensional sources like SAP Business Warehouse, there are no relationships defined in the model
  • Time intelligence capabilities are not available in DirectQuery. For example, special treatment of date columns (year, quarter, month, day, so on) is not supported in DirectQuery mode.
  • By default, limitations are placed on DAX expressions allowed in measures; see the following paragraph (after this bulleted list) for more information
  • There is a one-million-row limit for returning data when using DirectQuery. The limit does not affect aggregations or calculations used to create the dataset returned using DirectQuery, only the rows returned. For example, you can aggregate 10 million rows with your query that runs on the data source, and accurately return the results of that aggregation to Power BI using DirectQuery as long as the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be returned from DirectQuery, Power BI returns an error.

 

You can learn more :https://docs.microsoft.com/en-us/power-bi/desktop-use-directquery#limitations-of-directquery,

https://docs.microsoft.com/en-us/power-bi/desktop-directquery-about#implications-of-using-directquer... .

 

Best Regards,

Amy

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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