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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Bendelyon
Frequent Visitor

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

1 ACCEPTED SOLUTION

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.


View solution in original post

7 REPLIES 7
Expiscornovus
Resolver III
Resolver III

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: 

https://learn.microsoft.com/en-us/fabric/data-factory/get-metadata-activity#using-the-get-metadata-a...

 

Or by using expressions:

@activity('Get Metadata1').output

 

https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions

 

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.

 

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.


Hello @Bendelyon ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Hi @Bendelyon ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .
In case if you have any resolution please do share that same with the community as it can be helpful to others .
Otherwise, will respond back with the more details and we will try to help .

Hi @Bendelyon ,

Glad to know that your query got resolved. Please continue using Fabric Community on your further queries.

Hi @Expiscornovus 

 

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

 

Helpful resources

Announcements
Expanding the Synapse Forums

New forum boards available in Synapse

Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Update Carousel

Fabric Monthly Update - April 2024

Check out the April 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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