假定下面列出的变量在1D,2D和3D矩阵(可以视为数组)中的值为:
A = [1,2,3,4,5] -----------1D
B = [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14]] ----------2D(3X5 Matrix)
C[:,:,1] =[[7,6,5,4,44],[1,6,0,67,23],[3,2,7,9,56],[59,34,4,3,1]]
C[:,:,2] =[[31,12,7,91,56],[5,34,43,3,16],[7,6,55,54,44],[1,62,0,67,23]]
C[:,:,3] =[37,66,75,14,44],[1,36,34,627,3],[34,25,72,89,6],[59,34,4,3,1]]----3D(4X5X3 Matrix)
我已经嵌套了具有以下结构的JSON文件:
{
"DocId":"Array",
"User1": {
"Id":1234,
"Username":"Sam1234",
"Name":"Sam",
"Data_Extracted": {
"Data1":A,"Data2":B,"Data3":C
}
}
}
如何将嵌套的JSON数据放入HIVE表中?