cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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.

Thanks for reading and like if this is useful and for improvements or feedback please comment.

 

โ€ƒ

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group