<?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 How to save json data to Delta Table: ParseError on Insert in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-save-json-data-to-delta-table-parseerror-on-insert/m-p/34408#M25163</link>
    <description>&lt;P&gt;I'm trying to save the returned json data from a requests API call to a Delta Table.  I get a ParseError when I INSERT the response object which is in json format.  The error shows the json data and a marker that states a ' or } or ) is missing.  I validated the json data.  Why is the INSERT process trying to parse the json data?  Is there another way to INSERT the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;json_data = response.text&lt;/P&gt;&lt;P&gt;query = f"INSERT INTO database.table VALUES ('{json_data}')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spark.sql(query)&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 14:53:22 GMT</pubDate>
    <dc:creator>Gabriel0007</dc:creator>
    <dc:date>2022-08-17T14:53:22Z</dc:date>
    <item>
      <title>How to save json data to Delta Table: ParseError on Insert</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-save-json-data-to-delta-table-parseerror-on-insert/m-p/34408#M25163</link>
      <description>&lt;P&gt;I'm trying to save the returned json data from a requests API call to a Delta Table.  I get a ParseError when I INSERT the response object which is in json format.  The error shows the json data and a marker that states a ' or } or ) is missing.  I validated the json data.  Why is the INSERT process trying to parse the json data?  Is there another way to INSERT the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;json_data = response.text&lt;/P&gt;&lt;P&gt;query = f"INSERT INTO database.table VALUES ('{json_data}')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spark.sql(query)&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 14:53:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-save-json-data-to-delta-table-parseerror-on-insert/m-p/34408#M25163</guid>
      <dc:creator>Gabriel0007</dc:creator>
      <dc:date>2022-08-17T14:53:22Z</dc:date>
    </item>
  </channel>
</rss>

