Expand my Community achievements bar.

SOLVED

how download a file from azure blob

Avatar

Level 1

Hi everyone, 

 

I have a problem when I tried to download a file from the azure blob storage account. I configured the external account and test it uploading a csv file and it works.

 

Now I want to download a cvs from there but the logs said "0 file(s) to transfer", I configure a second file transfer activity with the action "test to see if the file exist" and response the file exist.

 

aarg_0-1632845203768.png

 

I'm not sure if I forgot configure something in the azure account o in campaign.

 

I hope someone can help me and thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @aarg,

As per your above screenshot, I have seen the same behaviour earlier. In the “server folder”, if you put the directory and hat codes file name it doesn’t work. But if you mention the server folder along with file name in a variable it works.

 You can validate that in your workflow as well.

 

Cheers,

Deb

 

View solution in original post

12 Replies

Avatar

Level 3

Hi @aarg ,

Can you provide the logs for the files exists and fle download.

May be the file doesn't exists in the provided path.

- Malarrajan Sundarraj

Avatar

Level 1

The file exist.

When I specify the file name in the file transfer

aarg_0-1632848784677.png

This are logs:

09/28/2021 5:32:45 PM 0 file(s) to transfer
09/28/2021 5:32:45 PM Starting file listing 'http://{myaccount}.blob.core.windows.net/entrada/tips/{fileName}20210928.csv'

 

But if only send the container and the folder, the activity download the file 

aarg_1-1632848968173.png

This are logs:

09/28/2021 5:54:22 PM File transfer completed
09/28/2021 5:54:22 PM Starting transfer of 'http://{myaccount}.blob.core.windows.net/entrada/tips/{filename}20210928.csv' to '{filename}20210928_20210928165422a.csv'
09/28/2021 5:54:22 PM 1 file(s) to transfer
09/28/2021 5:54:21 PM Starting file listing 'http://{myaccont}.blob.core.windows.net/entrada/tips/'

 

Now I want to understand if this is the normal behavior,because is possible the client want to store all the files  and I only want the most recent in campaign describes in the name file,  I'm trying to migrate the SFTP to blob and in the first one I can specify the file name, like this

aarg_2-1632849468686.png

 

Thanks 

 

Avatar

Level 3

Hi @aarg ,

Check on the filename and date concatenation part. Is there any white space in between.

It should match the entire filename and operation should be download.

- Malarrajan Sundarraj

Avatar

Correct answer by
Community Advisor

Hi @aarg,

As per your above screenshot, I have seen the same behaviour earlier. In the “server folder”, if you put the directory and hat codes file name it doesn’t work. But if you mention the server folder along with file name in a variable it works.

 You can validate that in your workflow as well.

 

Cheers,

Deb

 

Avatar

Level 3

Hi @Deb_Tripathy , I'm trying your suggested solution but I still had the same error:
01/04/2022 17:50:31 fileTransfer No file to transfer found
01/04/2022 17:50:31 fileTransfer 0 file(s) to transfer
01/04/2022 17:50:30 fileTransfer Starting file listing 'xxx'

Just to be sure I correctly understood your solution, these are the screen how I set File Transfer activity:
Tab File Transfer

LiviaD1_0-1648806900576.png

Tab Advanced

LiviaD1_1-1648806996822.png


Is it correct? Thank you

Avatar

Community Advisor

Hi @LiviaD1 ,

Can you try enabling the session log and check the workflow log. That may help you fig out the issue and are you sure that the folder and file name are being set up correctly on the variable?

 

Deb_Tripathy_0-1648809379789.png

 

Avatar

Level 3

Hi @Deb_Tripathy , I checked the Display session logs option but I didn't find any advanced or more detailted logs in the Audit tab.

About the folder and filename, I'm sure, I copied it directly from Blob.
Anyway, If you confirm that is the right way to download a file from Blob, I'll try again and then I'll open a support ticket.

Thanks

Avatar

Community Advisor

Hi @LiviaD1 ,

Can you share a screenshot of the workflow audit log?

Also the account/user with which you are trying to access the file in Folder, does it have the required access?

 

Thanks,

Deb

Avatar

Level 3

Hi @Deb_Tripathy,

this is the wkf Audit tab

LiviaD1_0-1649079970336.png

Even if I checked "display the session logs", no more information are provided in the Audit.

About permissions, if in the Server folder I specify only "folder", the file is correctly downloaded so I think that couldn't be a issue linked to permissions.
For example, if I put 2 files in "folder" path, Campaign correctly downloads both, but I need to specify just one for my import wkf (file transfer+dataloading+updatedata). That is why I need to specify the filename in the Server Folder or in the vars.filename

Thanks

Avatar

Community Advisor

Hi @LiviaD1 ,

Can you try "File Listing" instead of "File download" and compare the file name you had mentioned (earlier which was not working) and the one you see on the "Audit Log". It may tell you what is going wrong.

 

Thanks,
Deb

Avatar

Community Advisor

Also in your earlier example you had used "vars.filename" event variable. 

Deb_Tripathy_0-1649083805000.png

 

Instead of that can you use "instance.vars.customFileName", assign the full file path in advanced tab and use the instance variable in "File Transfer" Tab.

Avatar

Administrator

Hi @aarg,

Were you able to resolve this query with the help of any of the given solutions or do you still need more help here? Do let us know.
Thanks!



Sukrity Wadhwa