Search code examples
metadataetlazure-data-factory

Azure Data Factory Cannot Read Metadata Folder


I hope you guys keep health and keep strong in Pandemic covid-19.

I have some question on Azure Data Factory. btw I have create some pipeline with Metadata activity with detail below:

I have file in Folder and Subfolder like this:

enter image description here

  1. I have metadata activity with for each with first get metadata child item (in folder) like this:

enter image description here

  1. metadata with last modified like this (if you setting like this, metadata only read last modified subfolder enter image description here

  2. after that add variable I use @item().Name to read file in that folder like this: enter image description here

after running metadata which have subfolder, I've get error like this: the error give info that with @item().Name cannot read subfolder on that folder. the metadata for each file is success, but error like this which on my activity cannot read metadata subfolder . enter image description here

many big thanks to have answer, Thank You


Solution

  • If you need to access the folder

    Create a clone of same dataset and setup parameter as below, leave the file field empty.

    enter image description here

    enter image description here

    enter image description here

    If you need to access the file inside directory, use condition @equals(item().type,'Folder') to identity directory then inside that use dataset with parameters for directory and file.

    enter image description here

    enter image description here

    enter image description here