cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy files with spaces in the filenames to Azure using copy_to_remote_system function

jeffelliott
Explorer
0 Kudos

We are automating a process to write files to Azure Data Lake Gen2. Some of the filenames contain spaces in the names. We have done some testing using the copy_to_remote_system function to write the files to the ADLS; however, the script returns an error when attempting to write the files. We suspect the spaces in the filenames are causing the issue.

Questions

1. Is it possible to use the copy_to_remote_system function to write files to ADLS where the filenames contain spaces?

2. If yes, how do we do this? Is there a specific way the filenames must be supplied to the function so that the spaces do not cause an issue?

Thank you in advance for the help.

RichS
Participant

I don't know about sending to ADLS but it works using copy_to_remote_system when the target protocol is "Azure Cloud Storage". I did a test where the filename was a variable and contained a space in the name before the file extension.

Have you tried doing a transfer manually with MS Azure Storage Explorer just to see if that works?

jeffelliott
Explorer
0 Kudos

Rich,

Thanks for the response. Yes, I have successfully transferred a file with spaces in the name to ADLS using Azure Storage Explorer.

Just now, I also successfully tested a file transfer using copy_to_remote_system and a file location object configured with "Azure Cloud Storage" as the protocol. Thanks for the suggestion!

Jeff

View Entire Topic
denise_meyer
Employee
Employee
0 Kudos

Thanks for the response. Yes, I have successfully transferred a file with spaces in the name to ADLS using Azure Storage Explorer.

Just now, I also successfully tested a file transfer using copy_to_remote_system and a file location object configured with "Azure Cloud Storage" as the protocol. Thanks for the suggestion!