<?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 VIEW JSON result value in view which based on volume in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/65910#M32951</link>
    <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;I have the following case:&lt;/P&gt;&lt;P&gt;It has been decided that the json file will be read from a following definition ( from volume) , which more or less looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE VIEW  [catalog_name].[schema_name].v_[object_name]
AS
SELECT result, _metadata.file_path  as etl_full_path, _metadata.file_modification_time as etl_inserted_at  FROM json.`dbfs:/Volumes/[catalog_name]/[schema_name]/[volume_name]/object=[object_name]/`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to read this view using SQL warehouse and I can not view result column value - there is a&amp;nbsp; NULL value&amp;nbsp;&lt;/P&gt;&lt;P&gt;despite the flag is turn on&amp;nbsp; in view properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;view.sqlConfig.spark.sql.legacy.json.allowEmptyString.enabled=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Apr 2024 15:06:52 GMT</pubDate>
    <dc:creator>Cami</dc:creator>
    <dc:date>2024-04-09T15:06:52Z</dc:date>
    <item>
      <title>VIEW JSON result value in view which based on volume</title>
      <link>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/65910#M32951</link>
      <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;I have the following case:&lt;/P&gt;&lt;P&gt;It has been decided that the json file will be read from a following definition ( from volume) , which more or less looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE VIEW  [catalog_name].[schema_name].v_[object_name]
AS
SELECT result, _metadata.file_path  as etl_full_path, _metadata.file_modification_time as etl_inserted_at  FROM json.`dbfs:/Volumes/[catalog_name]/[schema_name]/[volume_name]/object=[object_name]/`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to read this view using SQL warehouse and I can not view result column value - there is a&amp;nbsp; NULL value&amp;nbsp;&lt;/P&gt;&lt;P&gt;despite the flag is turn on&amp;nbsp; in view properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;view.sqlConfig.spark.sql.legacy.json.allowEmptyString.enabled=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 15:06:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/65910#M32951</guid>
      <dc:creator>Cami</dc:creator>
      <dc:date>2024-04-09T15:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW JSON result value in view which based on volume</title>
      <link>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/65969#M32976</link>
      <description>&lt;P&gt;Thank you for response.&lt;/P&gt;&lt;P&gt;But there no issue with NULL value when I query view created on my cluster which has set the flag&lt;/P&gt;&lt;P&gt;spark.sql.legacy.json.allowEmptyString.enabled = True&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Without that flag on session or cluster I get NULL value querying json.&lt;BR /&gt;The issue with a NULL value occurs when I query view via SQL warehouse compute.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 05:23:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/65969#M32976</guid>
      <dc:creator>Cami</dc:creator>
      <dc:date>2024-04-10T05:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW JSON result value in view which based on volume</title>
      <link>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/104894#M41927</link>
      <description>&lt;P&gt;You must be getting the below error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="ant-typography css-cs8bxj" href="https://docs.databricks.com/error-messages/error-classes.html#config_not_available" target="_blank" rel="noopener noreferrer" data-component-id="notebook.command.output.errorClass.link" data-component-type="typography_link"&gt;CONFIG_NOT_AVAILABLE&lt;/A&gt;&lt;SPAN&gt;] Configuration spark.sql.legacy.json.allowEmptyString.enabled is not available.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;that's because in a warehouse this config is not configurable. SQL editor won't be the best choice for this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Not sure where you are setting&amp;nbsp;view.sqlConfig.spark.sql.legacy.json.allowEmptyString.enabled. Is it in an interactive cluster?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The JSON data source parser in Spark 3.0 treats empty strings as null for certain data types and throws exceptions for others, which can be adjusted with&amp;nbsp;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;&lt;SPAN class="c-mrkdwn__highlight"&gt;spark.sql.legacy.json.allowEmptyString.enabled&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;set to&amp;nbsp;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;true&lt;/CODE&gt;. But this only is for a cluster and not warehouse or serverless.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 11:09:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/view-json-result-value-in-view-which-based-on-volume/m-p/104894#M41927</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-01-09T11:09:59Z</dc:date>
    </item>
  </channel>
</rss>

