1
{
"id": "0001",
"type": "donut",
"name": "Cake",
"ppu": 0.55,
"batters":
{
"batter":
[
{ "id": "1001", "type": "Regular" },
{ "id": "1002", "type": "Chocolate" },
{ "id": "1003", "type": "Blueberry" },
{ "id": "1004", "type": "Devil's Food" }
]
},
"topping":
[
{ "id": "5001", "type": "None" },
{ "id": "5002", "type": "Glazed" },
{ "id": "5005", "type": "Sugar" },
{ "id": "5007", "type": "Powdered Sugar" },
{ "id": "5006", "type": "Chocolate with Sprinkles" },
{ "id": "5003", "type": "Chocolate" },
{ "id": "5004", "type": "Maple" }
]
}
을 사용하여 두 JSON 배열을 평평하게한다.어떻게 위의 JSON을 가지고 내가 모두 <strong>타자</strong> 및 <strong>이</strong> 배열을 토핑 평평 할 아파치 드릴
SELECT flatten(topping) as toping,flatten(batters.batter) as bat FROM json.jsonfiles.`batter.json`;
나에게주는
가 어떻게이 문제를 해결 할 수있는 : 그래서 내가 일을하려고? 단일 쿼리에서 두 배열을 병합 할 수 있습니까?org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: From line 1, column 43 to line 1, column 49: Table 'batters' not found SQL Query null [Error Id: 33cf80f2-f283-4401-90ce-c262474e0778 on acer:31010]