Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

Dynamic table name #18

Open
ravi-oli opened this issue Aug 27, 2019 · 0 comments
Open

Dynamic table name #18

ravi-oli opened this issue Aug 27, 2019 · 0 comments

Comments

@ravi-oli
Copy link

Reference: https://www.altinity.com/blog/2017/12/18/logstash-with-clickhouse

Hello Andrey

I am trying to make the table name dynamic by passing a value which is combination of JSON fields from data being ingested. For instance:

clickhouse {
                        http_hosts => ["http://172.17.0.5:8123"]
                        user => "default"
                        password => "password"
                        # table => "w46a1d81.srstream" 
                        table => "%{stream}-%{profile_id}"
                        request_tolerance => 1
                        flush_size => 1000
                        pool_max => 1000
                        mutations => {
                                "stream" => "stream"
                                "profile_id" => "profile_id"
                                "user_id" => "user_id"
                               ....
                        }
                }

This set-up when executed throws error. Ingestion URLs are constructed like:

http://172.17.0.5:8123/?query=INSERT%20INTO%20%{stream}-%{profile_id}%20FORMAT%20JSONEachRow

Any ideas how this can be solved? Does this feature exists or we need to build it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant