Skip to main content

Command Palette

Search for a command to run...

One Line Code To Get A List Of Items From All The Fabric/Premium Workspaces

Using Semantic Link v0.5

Updated
S

Principal Program Manager, Microsoft Fabric CAT helping users and organizations build scalable, insightful, secure solutions. Blogs, opinions are my own and do not represent my employer.

What the title says, thanks to the latest version (v0.5) of Semantic Link

!pip install --upgrade semantic-link --q #upgrade to semantic-link v0.5

import sempy.fabric as fabric
import pandas as pd 

df = pd.concat([fabric.list_items(workspace=ws) for ws in fabric.list_workspaces().query('`Is On Dedicated Capacity` == True').Id], ignore_index=True)
df

💡
If you have a large tenant with thousands of workspaces and items, this will be slow. In that case optimize the code to execute in parallel using ThreadPoolExecutor
L

Thanks for.your quick response. Unfortunately dataflows are not listed as item types available in the Items API. https: learn.microsoft.com/en-us/rest/api/fabric/admin/items/list-items?tabs=HTTP

Appreciate any help on this.

Thanks Luis

L

really great. Thanks for sharing this Sandeep Pawar.

One question thought.. Dataflows Gen1 does not seem to be included in list_items (neither in list_dataflows).

Any suggestion how I can get the list of dataflows Gen1 using sempy?

thanks

S

Check out the items API

J

you beautiful beautiful man

1
One Line Code To Get A List Of Items From All The Fabric/Premium Works