<?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: Is there a function similar to split_part, json_extract_scalar? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17471#M11492</link>
    <description>&lt;P&gt;&lt;B&gt;pyspark.sql.functions.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;get_json_object&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;(&lt;I&gt;col&lt;/I&gt;,&amp;nbsp;&lt;I&gt;path&lt;/I&gt;)&lt;/B&gt;&lt;A href="https://spark.apache.org/docs/3.1.2/api/python/_modules/pyspark/sql/functions.html#get_json_object" alt="https://spark.apache.org/docs/3.1.2/api/python/_modules/pyspark/sql/functions.html#get_json_object" target="_blank"&gt;&lt;B&gt;[source]&lt;/B&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extracts json object from a json string based on json path specified, and returns json string of the extracted json object. It will return null if the input json string is invalid.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
    <pubDate>Sat, 10 Dec 2022 11:55:00 GMT</pubDate>
    <dc:creator>Ankush</dc:creator>
    <dc:date>2022-12-10T11:55:00Z</dc:date>
    <item>
      <title>Is there a function similar to split_part, json_extract_scalar?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17470#M11491</link>
      <description>&lt;P&gt;I am using spark_sql version 3.2.1. Is there a function that can replace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split_part,&lt;/P&gt;&lt;P&gt;json_extract_scalar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are not?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 03:38:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17470#M11491</guid>
      <dc:creator>dulu</dc:creator>
      <dc:date>2022-12-10T03:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function similar to split_part, json_extract_scalar?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17471#M11492</link>
      <description>&lt;P&gt;&lt;B&gt;pyspark.sql.functions.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;get_json_object&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;(&lt;I&gt;col&lt;/I&gt;,&amp;nbsp;&lt;I&gt;path&lt;/I&gt;)&lt;/B&gt;&lt;A href="https://spark.apache.org/docs/3.1.2/api/python/_modules/pyspark/sql/functions.html#get_json_object" alt="https://spark.apache.org/docs/3.1.2/api/python/_modules/pyspark/sql/functions.html#get_json_object" target="_blank"&gt;&lt;B&gt;[source]&lt;/B&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extracts json object from a json string based on json path specified, and returns json string of the extracted json object. It will return null if the input json string is invalid.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 11:55:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17471#M11492</guid>
      <dc:creator>Ankush</dc:creator>
      <dc:date>2022-12-10T11:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function similar to split_part, json_extract_scalar?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17473#M11494</link>
      <description>&lt;P&gt;Thanks @Ankush Jadhao​&amp;nbsp; for answer, I tried but only returns the first result in the cell. They seem to only take the first character with the correct result. I need out put like the table below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="hinh22"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1013i43C6CC8CBF10ACCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="hinh22" alt="hinh22" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a way to split the characters in the item_order_detail column into 2 columns itemID and itemName. As below output table uses SQL function in databricks with&amp;nbsp;&lt;B&gt;spark_sql version 3.2.1.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="hinh223"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1024i5B0D635E53D52BC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="hinh223" alt="hinh223" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 04:52:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-function-similar-to-split-part-json-extract-scalar/m-p/17473#M11494</guid>
      <dc:creator>dulu</dc:creator>
      <dc:date>2022-12-16T04:52:31Z</dc:date>
    </item>
  </channel>
</rss>

