Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin 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
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.
Solved! Go to Solution.
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.
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.
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.
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:
These are the permissions I have in the SQL endpoint:
These are the permissions I have in the Lakehouse:
Hi @russelp
You can try giving the semantic model permissions to the co-worker :
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.
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?
I also enabled the option below but somehow the default semantic model still doesn't have all the tables from the lakehouse.
User | Count |
---|---|
13 | |
4 | |
3 | |
3 | |
3 |
User | Count |
---|---|
8 | |
8 | |
7 | |
6 | |
5 |