cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

File copy in adls

databicky
Contributor II

i am using dbutils.fs.copy(abfss://container/provsn/filen[ame.txt,abfss://container/data/sasam.txt)

while.trying this copy method to copy the files it is showing urisyntax exception near the square bracket how can i read and  copy it

5 REPLIES 5

Chaitanya_Raju
Honored Contributor

Can you please post the image of what exactly you tried and what error you are facing , so that it will be helpful to understand the error easily.

 

โ€ƒ

Anonymous
Not applicable

Hi @databicky 

We haven't heard from you since the last response from @Chaitanya_Rajuโ€‹, and I was checking back to see if his suggestions helped you.

Or else, If you have any solution, please share it with the community, as it can be helpful to others. 

Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.

Hemant
Valued Contributor II

Hi @databicky ,

To copy or move data from one folder to another folder in Azure Data Lake Storage (ADLS), you must first create a mount point for that container. A mount point is a directory on your driver that is linked to a specific container in ADLS. Once you have created a mount point, you can access the data in the container as if it were on your DBFS.

Hemant Soni

dplante
Contributor II

From looking at stack trace, it looks like URIException.  Easiest solution would be renaming the file so that there are no square brackets in the filename. 

 

If this is not an option, it might help to URLEncode the path - https://stackoverflow.com/questions/56787003/how-to-fix-an-uriexception-about-an-illegal-character-i...

Also, check this stack overflow - https://stackoverflow.com/questions/68773102/spark-cannot-read-file-with-square-brackets-in-the-file...

 

HTH

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.