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: 

Cannot read JSON from /Volumes

sathyafmt
Visitor

I am trying to read in a JSON file with this in SQL Editor & it fails with None.get 

 

 

CREATE TEMPORARY VIEW multilineJson
USING json
OPTIONS (path="/Volumes/my_catalog/my_schema/jsondir/test.json", multiline=true);

 

None.get is all the error it has.The permissions are fine, I have granted all privileges to all users & I am able to: LIST '/Volumes/my_catalog/my_schema/jsondir/test.json' without errors. The Diagnose error co-pilot wants me to use s3 path...

  1. What does the error None.get probably mean ? [I looked in Query History & it has the same error]
  2. Are Volumes not supported in path ? I tried with path="dbfs:/Volumes/my_catalog/my_schema/jsondir/test.json" also, but with no success.
  3. I also tried with 
    CREATE TEMPORARY VIEW multilineJson(author STRING, efficacy DOUBLE, rating INTEGER, custom_labels VARIANT) .. and same error.

Sample JSON used - 

 

[
  {
    "author": "user1",
    "efficacy": 0.0,
    "rating": 5,
    "custom_labels": [ "label1", "label2" ]
  }, 
  {
    "author": "user2",
    "efficacy": 0.9,
    "rating": 4,
    "custom_labels": [ "label3", "label4" ]
  }
]

 

 Thanks !

0 REPLIES 0

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