cancel
Showing results for 
Search instead for 
Did you mean: 
Databricks Free Trial Help
Engage in discussions about the Databricks Free Trial within the Databricks Community. Share insights, tips, and best practices for getting started, troubleshooting issues, and maximizing the value of your trial experience to explore Databricks' capabilities effectively.
cancel
Showing results for 
Search instead for 
Did you mean: 

Essential-PySpark-for-Scalable-Data-Analytics "wordcount-sql.ipynb"

ChristopherAlan
New Contributor II

I'm working through the code at the following, but getting an error:

https://github.com/PacktPublishing/Essential-PySpark-for-Scalable-Data-Analytics/blob/main/Chapter01...

Code:
%sql DROP TABLE IF EXISTS word_counts; CREATE TABLE word_counts (word STRING) USING csv OPTIONS("delimiter"=" ") LOCATION "/databricks-datasets/README.md"

Error:
UnityCatalogServiceException: [RequestId=e8a962d8-82f1-48d0-9cb8-9758daefb92d ErrorClass=INVALID_PARAMETER_VALUE] GenerateTemporaryPathCredential uri /dbfs/databricks-datasets/README.md is not a valid URI. Error message: INVALID_PARAMETER_VALUE: Missing cloud file system scheme.

Details:
I'm using the Databricks Community Edition, with an Apache Spark Cluster on AWS for compute. I can see that the file is an internal file and is available in the list using "%fs ls /databricks-datasets/"

Questions:

Can anyone point me in the right direction on how to resolve this?  I'd like to make sure I can properly work with SQL and the internal files provided with the community edition in order to complete all my learning objectives. 

#community edition

1 REPLY 1

ChristopherAlan
New Contributor II

Correction:  The error message from the screenshot is when I tried to add the dbms: prefix to the URL.  The error message without that prefix is the following:

UnityCatalogServiceException: [RequestId=dbda5aee-b855-9ed9-abf8-3ee0e0dcc938 ErrorClass=INVALID_PARAMETER_VALUE] GenerateTemporaryPathCredential uri /databricks-datasets/README.md is not a valid URI. Error message: INVALID_PARAMETER_VALUE: Missing cloud file system scheme.

I also tried the s3: prefix, but I realize this is not an externally hosted file, as all the literature says that this is an internal file.  

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now