<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot read JSON from /Volumes in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92600#M38473</link>
    <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just doing this in the SQL Editor (not in python notebook or scala). I don't know how to get the runtime version .. lmk how to get it &amp;amp; I'll add that info.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 15:50:25 GMT</pubDate>
    <dc:creator>sathyafmt</dc:creator>
    <dc:date>2024-10-02T15:50:25Z</dc:date>
    <item>
      <title>Cannot read JSON from /Volumes</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92180#M38380</link>
      <description>&lt;P class=""&gt;I am trying to read in a JSON file with this in SQL Editor &amp;amp; it fails with &lt;STRONG&gt;None.get&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;CREATE TEMPORARY VIEW multilineJson
USING json
OPTIONS (path="/Volumes/my_catalog/my_schema/jsondir/test.json", multiline=true);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;None.get &lt;/STRONG&gt;is all the error it has.&lt;/SPAN&gt;&lt;SPAN class=""&gt;The permissions are fine, I have granted all privileges to all users &amp;amp; I am able to:&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class=""&gt;LIST &lt;/SPAN&gt;&lt;SPAN class=""&gt;'/Volumes/my_catalog/my_schema/jsondir/test.json'&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN class=""&gt; without errors. T&lt;/SPAN&gt;&lt;SPAN class=""&gt;he Diagnose error co-pilot wants me to use s3 path...&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;What does the error &lt;EM&gt;None.get&lt;/EM&gt; probably mean ? &lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;I looked &lt;/SPAN&gt;&lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN class=""&gt; Query History &amp;amp; it has the same error&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Are&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;Volumes not supported &lt;/SPAN&gt;&lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN class=""&gt; path ? I tried with &lt;EM&gt;path="dbfs:/Volumes/my_catalog/my_schema/jsondir/test.json"&amp;nbsp;&lt;/EM&gt;also, but&amp;nbsp;with no success.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I also tried with&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;CREATE TEMPORARY VIEW multilineJson(author STRING, efficacy DOUBLE, rating INTEGER, custom_labels VARIANT&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;)&lt;/EM&gt;&amp;nbsp;.. and same error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Sample JSON used -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "author": "user1",
    "efficacy": 0.0,
    "rating": 5,
    "custom_labels": [ "label1", "label2" ]
  }, 
  {
    "author": "user2",
    "efficacy": 0.9,
    "rating": 4,
    "custom_labels": [ "label3", "label4" ]
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks !&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 20:31:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92180#M38380</guid>
      <dc:creator>sathyafmt</dc:creator>
      <dc:date>2024-09-28T20:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read JSON from /Volumes</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92210#M38387</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/123585"&gt;@sathyafmt&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;None.get is a scala erros that suggests that a value does not exist.&lt;BR /&gt;Maybe it is about the path?&lt;BR /&gt;I wonder whether you can run the below code to make sure that the file is read to dataframe:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;df = spark.read.option("multiline", "true").json("/Volumes/my_catalog/my_schema/jsondir/test.json")
df.show()&lt;/LI-CODE&gt;&lt;P&gt;If yes, try to create your view using python:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;df.createOrReplaceTempView("my_view")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 18:16:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92210#M38387</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-09-29T18:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read JSON from /Volumes</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92255#M38392</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/123585"&gt;@sathyafmt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What runtime are you on&lt;/SPAN&gt;? There could be some limitations applied to Scala depending on runtime you choose.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 07:03:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92255#M38392</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-09-30T07:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read JSON from /Volumes</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92600#M38473</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just doing this in the SQL Editor (not in python notebook or scala). I don't know how to get the runtime version .. lmk how to get it &amp;amp; I'll add that info.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 15:50:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92600#M38473</guid>
      <dc:creator>sathyafmt</dc:creator>
      <dc:date>2024-10-02T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read JSON from /Volumes</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92629#M38482</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/123585"&gt;@sathyafmt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you using Serverless SQL Warehouse?&lt;BR /&gt;It seems accessing Volumes in Serverless SQL Warehouse is not implemented yet.&lt;/P&gt;&lt;P&gt;When running the code in SQL Warehouse I am getting the same error as you:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filipniziol_1-1727938886360.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11659i86137574ED4D11CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filipniziol_1-1727938886360.png" alt="filipniziol_1-1727938886360.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When running in notebook, it works just fine&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filipniziol_0-1727937970832.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11658iB9FF648E103D2AF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filipniziol_0-1727937970832.png" alt="filipniziol_0-1727937970832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could you check whether you can create a table and it reads from the directory?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;CREATE TABLE my_json_table
USING json
OPTIONS (
  path '/Volumes/my_catalog/my_schema/jsondir/test.json',
  multiline 'true'
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When running this using SQL Serverless Warehouse I got an error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filipniziol_2-1727939904989.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11660iA65033E99B5D6853/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filipniziol_2-1727939904989.png" alt="filipniziol_2-1727939904989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then when trying to enable volumes I got an error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filipniziol_3-1727939950286.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11661i15368B1AB55ADAEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filipniziol_3-1727939950286.png" alt="filipniziol_3-1727939950286.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To sum up I believe as of now in Serverless SQL Warehouse volumes are not supported.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 07:20:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92629#M38482</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-10-03T07:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read JSON from /Volumes</title>
      <link>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92683#M38506</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;- Yes, I was on Serverless SQL Warehouse. It works with "CERATE TABLE .. " thx! I am surprised that the warehouse type is impacting this feature.&lt;/P&gt;&lt;P&gt;But I got the SQL from databricks documentation -&lt;A href="https://docs.databricks.com/en/query/formats/json.html#multi-line-mode" target="_blank"&gt;https://docs.databricks.com/en/query/formats/json.html#multi-line-mode&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;amp; I was hoping it would work..&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 17:54:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/cannot-read-json-from-volumes/m-p/92683#M38506</guid>
      <dc:creator>sathyafmt</dc:creator>
      <dc:date>2024-10-03T17:54:07Z</dc:date>
    </item>
  </channel>
</rss>

