question

PcDE avatar image
0 Votes"
PcDE asked KranthiPakala-MSFT edited

Logging file names in cosmos db using ADF

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KranthiPakala-MSFT avatar image
0 Votes"
KranthiPakala-MSFT answered KranthiPakala-MSFT edited

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.


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @purushothamchanda-2222,

Just checking in to see if the above suggestion was helpful. If this answers your query, please do click “Accept Answer” and/or Up-Vote, as it might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

Thanks

0 Votes 0 ·

Hi @purushothamchanda-2222,

We still have not heard back from you. Just wanted to check if the above suggestion was helpful? If it answers your query, please do click “Accept Answer” and/or Up-Vote, as it might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

0 Votes 0 ·
PcDE avatar image PcDE KranthiPakala-MSFT ·

Hi Kranthi,
sorry for late response. I did use the same already earlier but used GeMetadata and foreach so i can pick individual file names along with some of derived columns. Any suggestion to avoid foreach and get all the data along with derived columns. Thanks

0 Votes 0 ·
Show more comments