cancel
Showing results for 
Search instead for 
Did you mean: 
Training offerings
Explore discussions on Databricks training programs and offerings within the Community. Get insights, recommendations, and support from peers to maximize your learning experience and advance your skills in data analytics and machine learning.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks Learning 02 - Working With Notebooks - Error when running code to read CSV

mikedcxx
New Contributor II

Hi,

I'm going through the Databricks course Get Started with Databricks for Machine Learning. When I run the following code in the 02 - Working With Notebooks notebook I get an error:

 

SELECT * FROM csv.`${DA.paths.datasets}/retail/customers.csv`
 
The error I receive is AnalysisException: [PATH_NOT_FOUND] Path does not exist: dbfs:/retail/customers.csv.; line 1 pos 14.
 
I have the proper permission set up according to the instructions in the notebook and installed everything in the notebook file provided on the course page. Does anyone know why this may be happening?

 

4 REPLIES 4

Kaniz_Fatma
Community Manager
Community Manager

Hi @mikedcxx,

 

Incorrect File Path: The file path might be incorrect. Please double-check the file path and make sure it points to the correct location of your customers.csv file.

File Not Uploaded: The customers.csv file might not have been uploaded to DBFS. You can upload files to DBFS using the Databricks CLI, DBFS API, Databricks file browser, or by runn....

Accessing Local File: If the file is on the local node instead of DBFS, you might need to use the pr.... For example, if your file is in a local directory, you could access it like this: file:/path/to/your/file.

Permission Issues: Even though you mentioned that you have set up the proper permissions, it might be worth rechecking. Ensure that the Databricks cluster has the necessary permissions to access the file.

 

Remember, the path to the file in DBFS is usually prefixed with dbfs:/. If the file is in the local file system of the driver node of a cluster, you can use file:/.

 

If none of these solutions works, please provide more details.

 

Hope this helps! 😊

Hi! Thanks for the response. Maybe you can clarify for me. I’m following this course: HTTPS://customer-academy.databricks.com/learn/course/1342/play/15169/demo-working-with-notebooks 

I imported the notebook using the import URL on that page. I assume that would also import the data used in the notebook. If it is part of the import then where does the data reside in databricks so I can use the correct path?

Thank you for posting your concern on Community! To expedite your request, please list your concerns on our ticketing portal. Our support staff would be able to act faster on the resolution (our standard resolution time is 24-48 hours).

Kaniz_Fatma
Community Manager
Community Manager

Thank you for posting your question in our community! We are happy to assist you.

To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?

This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance! 
 

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