您必须通过单击+按钮在架构注册表中创建架构, 对于此输入数据:
{ "lng": -79.33333333333333, "observation": "K2G4 071225Z AUTO 00000KT 10SM SCT035 BKN041 BKN047 10/08 A3010 RMK AO1", "ICAO": "K2G4", "clouds": "scattered clouds", "dewPoint": "8", "cloudsCode": "SCT", "datetime": "2018-05-07 12:25:00", "temperature": "10", "humidity": 87, "stationName": "GARRETT CO", "weatherCondition": "n/a", "windDirection": 0, "windSpeed": "00", "lat": 39.583333333333336}
架构看起来像:
<p> { "type": "record", "namespace": "com.orendainx.hortonworks.weather", "name": "weather2", "fields": [ { "name": "lng", "type": "double" }, { "name": "observation", "type": "string" }, { "name": "ICAO", "type": "string" }, { "name": "clouds", "type": "string" }, { "name": "dewPoint", "type": "string" }, { "name": "datetime", "type": "long" }, { "name": "temperature", "type": "string" }, { "name": "humidity", "type": "int" }, { "name": "stationName", "type": "string" }, { "name": "weatherCondition", "type": "string" }, { "name": "windDirection", "type": "int" }, { "name": "windSpeed", "type": "string" }, { "name": "lat", "type": "double" } ] } </p>
跳过p标签
默认情况下,德鲁伊数据源不会出现在SQL实验室中,因为德鲁伊不是SQL数据库。但是,Apache Calcite创建了从SQL到DQL(德鲁伊查询语言)的转换。因此,如果在代理上启用了SQL,则可以将druid添加为SQL数据库。看到 这个答案 有点类似的问题。