<?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>question Re: org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340292#M233303</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/75577"&gt;@Rohan44&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try creating your datafile with each JSON record in a single line, like so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"buyer":{"legalBusinessName":"test1 Company","organisationIdentifications":[{"type":"abcd","identification":"test.bb@tesr"},{"type":"TXID","identification":"12345678"}]},"supplier":{"legalBusinessName":"test Company","organisationIdentifications":[{"type":"abcd","identification":"test28@test"}]},"paymentRecommendationId":"1234-5678-9876-2212-123456","excludedRemittanceInformation":[],"recommendedPaymentInstructions":[{"executionDate":"2022-06-12","paymentMethod":"aaaa","remittanceInformation":{"structured":[{"referredDocumentInformation":[{"type":"xxx","number":"12341234","relatedDate":"2022-06-12","paymentDueDate":"2022-06-12","referredDocumentAmount":{"remittedAmount":2600.5,"duePayableAmount":3000}}]}]}}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2022 10:13:41 GMT</pubDate>
    <dc:creator>araujo</dc:creator>
    <dc:date>2022-04-01T10:13:41Z</dc:date>
    <item>
      <title>org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340269#M233302</link>
      <description>&lt;P&gt;I have one Json file and I have validate it, Its a valid json.&lt;BR /&gt;I am creating Hive table on that file and then select data but its showing&lt;/P&gt;&lt;P&gt;Error: java.io.IOException:&lt;BR /&gt;org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object&lt;BR /&gt;- JSONException: A JSONObject text must end with '}' at 2 [character 3 line 1]&lt;BR /&gt;(state=,code=0)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;when I tried to set below property.&lt;/P&gt;&lt;P&gt;ALTER TABLE test_rahul SET SERDEPROPERTIES ( "ignore.malformed.json" = "true");&lt;BR /&gt;Then It showing Null values for all the fields. Can someone Kindly Help me.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;json File:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"buyer": {&lt;BR /&gt;"legalBusinessName": "test1 Company","organisationIdentifications": [{ "type": "abcd",&lt;BR /&gt;"identification": "test.bb@tesr"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"type": "TXID","identification": "12345678"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;"supplier": {&lt;BR /&gt;"legalBusinessName": "test Company",&lt;BR /&gt;"organisationIdentifications": [&lt;BR /&gt;{&lt;BR /&gt;"type":"abcd","identification": "test28@test"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;"paymentRecommendationId": "1234-5678-9876-2212-123456",&lt;BR /&gt;"excludedRemittanceInformation": [],&lt;BR /&gt;"recommendedPaymentInstructions": [{&lt;BR /&gt;"executionDate": "2022-06-12",&lt;BR /&gt;"paymentMethod": "aaaa",&lt;BR /&gt;"remittanceInformation": {&lt;BR /&gt;"structured": [{&lt;BR /&gt;"referredDocumentInformation": [{&lt;BR /&gt;"type": "xxx",&lt;BR /&gt;"number": "12341234",&lt;BR /&gt;"relatedDate": "2022-06-12",&lt;BR /&gt;"paymentDueDate": "2022-06-12",&lt;BR /&gt;"referredDocumentAmount": {&lt;BR /&gt;"remittedAmount": 2600.5,&lt;BR /&gt;"duePayableAmount": 3000&lt;BR /&gt;}&lt;BR /&gt;}]&lt;BR /&gt;}]&lt;BR /&gt;}&lt;BR /&gt;}]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Jar Added:&lt;/P&gt;&lt;P&gt;ADD JAR json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar;&lt;/P&gt;&lt;P&gt;Create Table:&lt;/P&gt;&lt;P&gt;CREATE EXTERNAL TABLE IF NOT EXISTS `test`.`testerde11`&lt;BR /&gt;(`buyer` STRUCT&amp;lt; `legalBusinessName`:STRING, `organisationIdentifications`:STRUCT&amp;lt; `type`:STRING, `identification`:STRING&amp;gt;&amp;gt;,&lt;BR /&gt;`supplier` STRUCT&amp;lt; `legalBusinessName`:STRING, `organisationIdentifications`:STRUCT&amp;lt; `type`:STRING, `identification`:STRING&amp;gt;&amp;gt;,&lt;BR /&gt;`paymentRecommendationId` STRING, `recommendedPaymentInstructions` ARRAY&amp;lt; STRUCT&amp;lt; `executionDate`:STRING, `paymentMethod`:STRING,&lt;BR /&gt;`remittanceInformation`:STRUCT&amp;lt; `structured`:STRUCT&amp;lt; `referredDocumentInformation`:STRUCT&amp;lt; `type`:STRING,&lt;BR /&gt;`number`:STRING, `relatedDate`:STRING, `paymentDueDate`:STRING, `referredDocumentAmount`:STRUCT&amp;lt; `remittedAmount`:DOUBLE,&lt;BR /&gt;`duePayableAmount`:INT&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;)&lt;BR /&gt;ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'&lt;BR /&gt;WITH SERDEPROPERTIES ( "field.delim"=",","mapping.ts" = "number")&lt;BR /&gt;STORED AS textFILE LOCATION '/user/hdfs/Jsontest/';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Error Message :&lt;/P&gt;&lt;P&gt;select * from test.testerde11;&lt;BR /&gt;Error: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException:&lt;BR /&gt;Row is not a valid JSON Object - JSONException: A JSONObject text must end with '}' at 2 [character 3 line 1] (state=,code=0)&lt;/P&gt;&lt;P&gt;I tried multiple option but didn't worked .Can someone suggest me what is the issue here/or do I need to change the delimiter/add new properties.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 06:04:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340269#M233302</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2022-04-01T06:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340292#M233303</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/75577"&gt;@Rohan44&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try creating your datafile with each JSON record in a single line, like so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"buyer":{"legalBusinessName":"test1 Company","organisationIdentifications":[{"type":"abcd","identification":"test.bb@tesr"},{"type":"TXID","identification":"12345678"}]},"supplier":{"legalBusinessName":"test Company","organisationIdentifications":[{"type":"abcd","identification":"test28@test"}]},"paymentRecommendationId":"1234-5678-9876-2212-123456","excludedRemittanceInformation":[],"recommendedPaymentInstructions":[{"executionDate":"2022-06-12","paymentMethod":"aaaa","remittanceInformation":{"structured":[{"referredDocumentInformation":[{"type":"xxx","number":"12341234","relatedDate":"2022-06-12","paymentDueDate":"2022-06-12","referredDocumentAmount":{"remittedAmount":2600.5,"duePayableAmount":3000}}]}]}}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 10:13:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340292#M233303</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-04-01T10:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340296#M233304</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;&amp;nbsp;It Worked.&lt;BR /&gt;is there any option to handle this with multiline also.As we are getting this files from source in multiline.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 10:46:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340296#M233304</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2022-04-01T10:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340364#M233316</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/75577"&gt;@Rohan44&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I don't think there's a way to do that.&lt;/P&gt;&lt;P&gt;What are you using to write the files to HDFS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2022 02:28:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/340364#M233316</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-04-02T02:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/342402#M233728</link>
      <description>&lt;P&gt;Yes HDFS&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 03:05:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/342402#M233728</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2022-04-27T03:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object</title>
      <link>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/342403#M233729</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Yes HDFS&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 03:05:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/org-apache-hadoop-hive-serde2-SerDeException-Row-is-not-a/m-p/342403#M233729</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2022-04-27T03:05:50Z</dc:date>
    </item>
  </channel>
</rss>

