0

Hi Is there any option to create hive table on below hdfs file.So lets say if I query with on customer then it should return all the columns for customer in a single row in json format.

Hdfs File Content:

{
"customer": {
    "legalBusinessName": "testing",
    "organisationIdentifications": [{
        "type": "test",
        "identification": "test102.abc@xyz"
    }, {
        "type": "test",
        "identification": "12345678"
    }]
},
"seller": {
    "legalBusinessName": "testing",
    "organisationIdentifications": [{
        "type": "test",
        "identification": "test"
    }]
},

"RecommendationId": "testid",
"excludedRemittanceInformation": [],
"recommendedPaymentInstructions": [{
    "executionDate": "2022-06-12",
    "remittanceInformation": {
        "structured": [{
            "referredDocumentInformation": [{
                "paymentDueDate": "2022-06-12",

                "referredDocumentAmount": {
                    "duePayableAmount": 3000
                }
            }]
        }]
    }
}]

}

File Structure :

enter image description here

Sonu
  • 77
  • 11
  • can you try this link https://www.hivetablegenerator.com/ ? this generated hive table DDL from your json. – Koushik Roy Mar 31 '22 at 09:00
  • @KoushikRoy Yes Tried. But not able to select the data.https://stackoverflow.com/questions/71701670/row-is-not-a-valid-json-object-jsonexception-hive Kindly Suggest. – Sonu Apr 01 '22 at 04:05

0 Answers0