简体   繁体   中英

How to get Schema name/database name from Druid ingestion spec json file?

how can I get Schema name/database name from Druid ingestion spec json file.i have gone through the tutorial but didn't find any regarding schema name or database name.

eg:

"dataSchema" : {
  "dataSource" : "ingestion-tutorial",
  "parser" : {
    "type" : "string",
    "parseSpec" : {
      "format" : "json",
      "timestampSpec" : {
        "format" : "iso",
        "column" : "ts"
      },
      "dimensionsSpec" : {
        "dimensions": [
          "srcIP",
          { "name" : "srcPort", "type" : "long" },
          { "name" : "dstIP", "type" : "string" },
          { "name" : "dstPort", "type" : "long" },
          { "name" : "protocol", "type" : "string" }
        ]
      }
    }
  },
  "granularitySpec" : {
    "rollup" : true
  }
}

for the above ingestion spec we can get the table name from "dataSource" key and column names from "dimensions" key values. but how to get the schema name or database name? i'am new in Druid and I need to write a parsing application which extracts these details from the json file. like database name, table name, and column names.any help would be appreciated.

在此处输入图片说明

There is no such concept in Druid as "Database" or "Schema". Apache Druid has only "tables"(Datasources) - https://druid.apache.org/docs/latest/querying/datasource.html and they are not namespaced in any way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM