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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
russelp
Helper I
Helper I

Datasetnotfoundexception even though the dataset exists when using sempy fabric functions

Hi,

 

I am currently getting DatasetNotFoundException: Dataset '<datasetId>' not found in workspace '<workspaceId>' 

(Just replaced the actual values with <>)

 

The issue is the dataset actually exists. I can even see the dataset when querying via the API. 

 

import sempy.fabric as fabric
import json

workspaceId = 'workspaceid_here'
client = fabric.FabricRestClient()

try:
    response = client.get(
        f'https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/semanticModels'
    )
    print(response.text)
except Exception as e:
    print(e)

 

 

When I try using the list_columns() function, I get the datasetnotfoundexception error as stated above. (again, actual values were replaced in this post)

 

import sempy.fabric as fabric

df_columns = fabric.list_columns(dataset=datasetid, workspace=workspaceId)
df_columns = df_columns[['Table Name', 'Column Name', 'Data Type']]

display(df_columns)

 

 

Even using list_datasets() returns an IndexError: list index out of range

 

 

import sempy.fabric as fabric
text = fabric.list_datasets() 
display(text)

 

 

Any ideas why this is happening? Why the fabric package functions cannot find the datasets even though they actually exist? 

 

Thank you.

1 ACCEPTED SOLUTION
russelp
Helper I
Helper I

Not sure how to delete this but this has been solved. I just created a new table after enabling the sync the default power BI semantic model and it is now showing the updated dataset tables. 

View solution in original post

8 REPLIES 8
russelp
Helper I
Helper I

Not sure how to delete this but this has been solved. I just created a new table after enabling the sync the default power BI semantic model and it is now showing the updated dataset tables. 

Anonymous
Not applicable

Hi @russelp 
Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.

Hi @Anonymous ! Thank you! I don't want to open up another thread just for this follow up question related to this so, does the sempy fabric function list_datasets() only show my owned datasets? I created my lakehouses and able to see the datasets but when my coworker created one, I am not able to see that new dataset. 

Anonymous
Not applicable

Hi @russelp 
Did your co-worker created the dataset in the same workspace or different workspace?
The list_datasets() function from the sempy.fabric package lists the available semantic models in your workspace. It does not specifically filter datasets based on ownership. If you are unable to see a dataset created by your coworker, it could be due to a variety of reasons such as access permissions, dataset visibility settings.
Read data from semantic models and write data that semantic models can consume using python - Micros...

Hope this helps. Please let me know if you have any further questions.

Hi @Anonymous thank you for answering! Yes, we created our datasets in the same workspace. When she ran the same function, she was able to see only her datasets. We are only seeing our own datasets (when querying from list_datasets()). Which access permissions should we check? Currently, we are both admins in the same workspace so what other access permissions should we take a look at? 

 

Edit: For extra context

These are the permissions I have on the semantic model: 

russelp_0-1718085400988.png

 

These are the permissions I have in the SQL endpoint:

russelp_1-1718085448478.png

These are the permissions I have in the Lakehouse: 

russelp_2-1718085478702.png

 

Anonymous
Not applicable

Hi @russelp 
You can try giving the semantic model permissions to the co-worker :

vnikhilanmsft_0-1718086199534.png

 

vnikhilanmsft_1-1718086253506.png

vnikhilanmsft_2-1718086264591.png

Give the permissions for your co-worker and retry. 
Thanks

 

Hi @Anonymous ,

 

For context, I am working on the default semantic models created from the lakehouse so the add user option is not available. However, I still checked the permissions and we both have all the permissions but still not able to see each other's dataset. 

 

For additional testing, I created a new semantic model to be able to follow your instructions.  Both semantic model and default semantic model now have all the permissions but still not able to see each other's datasets.  This is how our permissions look. We all have the same permissions. 

 

russelp_0-1718087983000.png

 

russelp
Helper I
Helper I

Just got the idea that this might be because the dataset is not refreshed.

1. Can anyone confirm this?

2. If 1 is the reason, how do I refresh the default dataset (coming from a lakehouse or a warehouse in onelake) to reflect the latest changes? Can the default semantic models not be refreshed?

 

russelp_0-1718066799546.png

I also enabled the option below but somehow the default semantic model still doesn't have all the tables from the lakehouse.

russelp_0-1718071936757.png

 

 

Helpful resources

Announcements
May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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