From e5b5268f5caf98d767c3c766bef3ae4761f3713b Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 21 Oct 2022 07:20:30 +0100 Subject: [PATCH] Add example Druid spec --- druid-spec.json | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 druid-spec.json diff --git a/druid-spec.json b/druid-spec.json new file mode 100644 index 0000000..1bd3740 --- /dev/null +++ b/druid-spec.json @@ -0,0 +1,86 @@ +{ + "type": "kafka", + "spec": { + "ioConfig": { + "type": "kafka", + "consumerProperties": { + "bootstrap.servers": "kafka:9092" + }, + "topic": "main", + "inputFormat": { + "type": "json" + }, + "useEarliestOffset": true + }, + "tuningConfig": { + "type": "kafka" + }, + "dataSchema": { + "dataSource": "main", + "timestampSpec": { + "column": "ts", + "format": "posix" + }, + "dimensionsSpec": { + "dimensions": [ + "id", + "host", + "ident", + "nick", + "nick_id", + "user_id", + "msg", + "msg_id", + "net", + "net_id", + "num", + "src", + "ts", + "date", + "time", + "type", + "bot", + "channel", + "channel_category", + "channel_category_id", + "channel_category_nsfw", + "channel_id", + "channel_nsfw", + { + "type": "long", + "name": "guild_member_count" + }, + "guild", + "guild_id", + "mode", + "modearg", + { + "type": "double", + "name": "sentiment" + }, + "status", + "user", + "exemption", + "num_chans", + "num_users", + "online", + "realname", + "server", + "mtype", + "tokens", + "lang_code", + "lang_name", + "filename", + "file_md5", + "file_ext", + "file_size" + ] + }, + "granularitySpec": { + "queryGranularity": "none", + "rollup": false, + "segmentGranularity": "week" + } + } + } +}