首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Druid超集配置

Druid超集配置
EN

Stack Overflow用户
提问于 2018-04-13 17:02:24
回答 2查看 1.2K关注 0票数 1

我正在尝试在德鲁伊超集中创建一个数据库,并且我已经成功地在德鲁伊超集中创建了数据库,但是这个数据库在SQL实验室中没有显示出来。

我认为这个问题是由于缺少模式造成的。我应该如何在druid超集中添加模式?添加模式的正确格式是什么?

EN

回答 2

Stack Overflow用户

发布于 2018-05-07 22:31:46

对于此输入数据,您必须通过单击+按钮在schema Registry中创建模式:

代码语言:javascript
复制
 {
"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}

模式将如下所示:

代码语言:javascript
复制
 <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标记

票数 0
EN

Stack Overflow用户

发布于 2018-05-11 02:30:27

默认情况下,Druid数据源不会出现在SQL Lab中,因为druid不是SQL数据库。但是,Apache Calcite已经创建了从SQL到DQL (Druid查询语言)的转换。因此,如果在代理上启用了SQL,则可以将druid添加为SQL数据库。请参阅this answer来回答一个有点类似的问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49813142

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档