Logging file names in cosmos db using ADF

PC 6 Reputation points
2021-03-23T06:37:22.75+00:00

Hello ,

I have one scenario to implement: I am reading files in ADLS using ADF and copying into another location. While doing that, I need to capture file names and store in cosmos db. Does anybody has done such scenario, please suggest. TIA.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,650 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,422 Reputation points Microsoft Employee
    2021-03-23T19:21:31.787+00:00

    Hi @purushothamchanda-2222,

    Thanks for your query.

    After copying the files, once the initial copy activity is succeeded, you can use a getMetadata activity to get the list of file names from source and use the output value to copy to your desired sink (in this case to the db collection in cosmos database).

    Hope this helps. Do let us know if you have further query.

    Thanks

    ----------

    Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.