Forum Discussion

VaishnaviMu's avatar
VaishnaviMu
Regular Visitor
8 months ago
Solved

Get Metadata activity - How does it work?

I have a folder containing files of multiple formats. I used Get Metadata activity and it has run successfully bringing files of all different formats as output. My questions is, 1. why does the acti...
  • nielsvdc's avatar
    8 months ago

    Hi VaishnaviMu, when you select a specific file format in the Get Metadata activity, the activity doesn’t just filter those file types, it also understands how to interpret the data inside those files. For example, if you choose JSON as the file format, the activity expects files to contain JSON syntax and processes them accordingly. Try selecting XML for a folder in your example: when you click the Preview button, you’ll see an error if the files don’t contain valid XML, because the activity was expecting XML structure.


    On the other hand, when you select Binary as the file format, all files are shown because binary is a generic format. In this case, the activity treats the files as raw, unstructured data without attempting to parse their contents.

     

    Hope this helps. If so, please give a Kudos 👍 or mark as Accepted Solution ✔️.

  • Vinodh247's avatar
    8 months ago
    1. The File format field is required because Fabric Pipelines follow the same connector contract as Dataflow Gen2. The connector expects a format to be declared, even if the activity itself (Get Metadata) does not actually read or parse the file. It is a schema requirement, not a functional one.

    2. Get Metadata does not inspect file content. It only enumerates the file system and returns names, sizes, timestamps, etc. Because it does not read the file, the declared format is ignored at runtime. Binary works as a generic placeholder, so all files are listed regardless of their true type.

    HTH!