【问题标题】:Druid superset Configuration德鲁伊超集配置
【发布时间】:2018-05-11 02:30:26
【问题描述】:

我正在尝试在 druid superset 中创建一个数据库,并且我已成功在 druid superset 中创建了该数据库,但是该数据库未在 SQL 实验室中显示。

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

【问题讨论】:

标签: druid superset


【解决方案1】:

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

 {
"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 标签

【讨论】:

    【解决方案2】:

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

    【讨论】:

    • tysm..帮我解决这个问题
    • @shashankkumar 你能选择我的答案吗?如果对你有帮助
    猜你喜欢
    • 1970-01-01
    • 2021-04-17
    • 1970-01-01
    • 2018-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多