简体   繁体   English

如何从Druid摄取规范json文件中获取架构名称/数据库名称?

[英]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. 我如何从Druid摄取规范json文件中获取架构名称/数据库名称。我已经完成了本教程,但未找到任何有关架构名称或数据库名称的信息。

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. 对于上述摄取规范,我们可以从“ dataSource”键获取表名,从“ dimensions”键值获取列名。 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. 我是Druid的新手,我需要编写一个解析应用程序,该应用程序从json文件中提取这些详细信息。 like database name, table name, and column names.any help would be appreciated. 例如数据库名称,表名称和列名称。任何帮助将不胜感激。

在此处输入图片说明

There is no such concept in Druid as "Database" or "Schema". 在Druid中没有“数据库”或“架构”这样的概念。 Apache Druid has only "tables"(Datasources) - https://druid.apache.org/docs/latest/querying/datasource.html and they are not namespaced in any way. Apache Druid仅具有“表”(数据源)-https: //druid.apache.org/docs/latest/querying/datasource.html,并且它们没有任何命名空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 需要从JSON文件获取名称数据 - Need to get name data from JSON file 如何为存储在嵌套 JSON 文件中的数据库模式中的每个表元数据(列名、类型、格式)创建 Pandas dataframe - How to create a Pandas dataframe for each table meta data (Column Name, Type, Format) stored within a Database Schema in nested JSON file 如何在下面的 json 文件中获取名称值 - How to get name value in the below json file 如何在不知道值名的情况下从 JSON 文件中获取单个值和值名 - How to get a single value and value name from an JSON file without knowing the value name 如何在JSON模式中使用真实名称定义对象? - How to define an object with a veriable name in JSON Schema? 如何为Name / Value结构创建JSON Schema? - How to create JSON Schema for Name/Value structure? 如何使用php将数据存储到带有变量名的json.file中 - How to store data into json.file with variable name from database using php 如何使用 Nodejs 从 RDS 数据库中获取数据的列名作为 AWS Lambda Function 中 JSON 中的响应 - How to get column name of data from RDS database as response in JSON in AWS Lambda Function using Nodejs 如何从json文件中获取表架构:parse_table_schema_from_json? - How to get table schema from json file: parse_table_schema_from_json? 从 json 获取“产品”名称 - get name of "product" from json
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM