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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Fabric Update Carousel

Fabric Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.