Forum Discussion
How to use the get metadata output json in a notebook
Hello everyones
I need to use the json output folder of a get metadata activity in a notebook.
How Can i do ?
Thanks for your help
Ben
- Anonymous2 years ago
Hi Bendelyon ,
Thanks for using Fabric Community.
Did you tried checking this - Microsoft Spark Utilities (MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
We can get the list of files present inside lakehouse using Code -files = mssparkutils.fs.ls("path")
Please let me know if you have further queries.
7 Replies
- Expiscornovus
Most Valuable Professional
Hi Bendelyon,
Do you want to reuse the output in another activity of your pipeline, if so what are you trying to do with the output? Can you share a bit more details about this?
Normally you should be able to reuse the output as dynamic content:
Or by using expressions:
@activity('Get Metadata1').outputhttps://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions
- Bendelyon
Helper I
I want to use the @activity@activity('Get Metadata1').output.childitems to make a python list and reuse it in a notebook.
The easier gonna be to use all of the activities in the same pipeline.
Do not know if i could do this ?
Thanks
- @activity('Get Metadata1').output
- Bendelyon
Helper I
For more details
This IS ma schema
Parent folder A1
Child folder a
Csv
Parent folder A2
Child folder a
Csv
Parent folder A3
Child folder a
Csv
Etc
...
My Idea IS to use 'get metadata' to get the name of the folder (A1, A2, A3) and make a python list in a notebook to iterate and consolidate the csv files.
Hope you could understand.
- AnonymousNot applicable
Hi Bendelyon ,
Thanks for using Fabric Community.
Did you tried checking this - Microsoft Spark Utilities (MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft Learn
We can get the list of files present inside lakehouse using Code -files = mssparkutils.fs.ls("path")
Please let me know if you have further queries.