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
Anonymous
Not applicable

Has the ability to refresh a dataset with a dynamic SQL stored procedure been disabled?

Up until today, I had a dataset that was able to be refreshed perfectly fine through the Service.  This particular query has a single database as a source, which is an Azure Database.  The dataset uses 4 queries to get data from the database.  2 which are views, and 2 which use Stored Procedures that take in a few parameters.

 

In the case of the Stored Prodedure, the parameters require a filter string and a Start Date/End Date for the returned rows.  The dates change every day as its up until current.

 

Here is what my code calling one of the stored procedures looks like in Power Query:

 

Source = Sql.Database("<MyServerName>.database.windows.net", "<MyDataBase>", [Query="Exec Example.[sp_ExampleStoredProcedure] 0, " & fnStartDate & ", " & fnEndDate & ", 'EP231%'", HierarchicalNavigation=true, CommandTimeout=#duration(0, 0, 90, 0)]),

(i've changed some names for privacy reasons)

 

The functions that make the parameters dynamic are:

let
    Result = "'" & DateTime.ToText(Date.AddYears(DateTime.LocalNow(), -2), "yyyy") & "-01-01'"
in
    Result

and

let
    Result = "'" & DateTime.ToText(DateTime.LocalNow(), "yyyy-MM-dd") & "'"
in
    Result

 

When i check the service for this dataset, i no longer get the option to refresh the dataset, or even set "Connect directly".  When i look at the refresh history, you can see where it previously worked and then it starts to fail today.  If i remove the Stored Procedures from the dataset, i'm able to select "Connect Directly" again.  I only found this coincedently when i went to make minor updates this morning to a report.Capture.PNG

 

 

The error now stating:

Data source error:
Unable to refresh the model (id=1767871) because it references an unsupported data source.
Cluster URI: WABI-SOUTH-EAST-ASIA-redirect.analysis.windows.net
Activity ID: 725ea1be-d2db-4f55-ace8-9a91ccc4b307
Request ID: af57b3a0-5ce2-437a-aba8-2f8e6e08e1b8
Time: 2018-04-09 00:25:48Z

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Microsoft have solved this on the backend and it is working again.

View solution in original post

12 REPLIES 12

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.

Top Solution Authors
Top Kudoed Authors