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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
BriefStop
Frequent Visitor

Get Metadata of All Tables

2024-11-12_21-52-54.pngHi everyone, I have experience taking metadata info of all Files in a folder in the Get Metadata activity but I'm not sure how I can do the same for Tables.

I want to take the name of all of the tables available in Get Metadata, filter for everything except certain tables in Filter and then pass them to be copied from one lakehouse to another through a For Each activity with a Copy Data activity.

I think I have to write a dynamic expression for this but not sure what it would be. 

 

Does anyone know how to do this?

1 ACCEPTED SOLUTION
spencer_sa
Super User
Super User

It appears that the Get Metadata activity when set to look at tables requires there to be a table name supplied, so you can't just say 'enumerate all tables'.
Given that limitation, the way I'd probably handle this is a notebook that (either via API calls or via sempy-labs) gets a list of tables and outputs them via notebookutils.notebook.exit(<JSON string of list of table names>), convert to an array and then use that list in your filter.

View solution in original post

4 REPLIES 4
NandanHegde
Super User
Super User

Can you please be more clear what you are trying to achieve? Do you want to get list of all tables in lakehouse? And what do you want to do




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
ifistic
New Member

my metadata pipeline say taht my inputfile is a folder. how can i solve it

Sounds like a different problem to the OP's one - they were after enumerating Tables.
If you're after enumerating Files inside Folders, then it'll depend on whether you always know the Folder it lives in or not.
If you know the folder, then just add that to the metadata step;

spencer_sa_0-1732012110422.png

If you don't know the folder name until runtime, then you're into a ForEach with an If condition on FileType = 'Folder', and then feed the item name (which is the folder name) into a nested Invoke Pipeline step as a Parameter.  This sub-pipeline then uses Get Metadata on the subfolder.
You could (and it's not necessarily a good idea) make this recursive to traverse any depth of folder structure.

spencer_sa
Super User
Super User

It appears that the Get Metadata activity when set to look at tables requires there to be a table name supplied, so you can't just say 'enumerate all tables'.
Given that limitation, the way I'd probably handle this is a notebook that (either via API calls or via sempy-labs) gets a list of tables and outputs them via notebookutils.notebook.exit(<JSON string of list of table names>), convert to an array and then use that list in your filter.

Helpful resources

Announcements
May FBC25 Carousel

Fabric Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors