cat <<EOF | curl -X POST http://a:b@localhost:8123/?database=a --data-binary @-
CREATE TABLE IF NOT EXISTS time_series (date Date,fingerprint UInt64,labels String, name String)
ENGINE = ReplacingMergeTree(date) PARTITION BY date ORDER BY fingerprint;
EOF
send one line of data into the table:
cat <<EOF | curl -X POST 'http://a:b@localhost:8123/?query=INSERT%20INTO%20a.time_series(date,%20fingerprint,%20labels,%20name)%20FORMAT%20JSONEachRow' --data-binary @-
{"fingerprint":"15239659101592556481","timestamp_ns":"1699265700000000000","value":null,"string":"FREQ_TEST_0"}
EOF
cat <<EOF | curl -v -X POST 'http://a:b@localhost:8123/?query=INSERT%20INTO%20a.time_series(date,%20fingerprint,%20labels,%20name)%20FORMAT%20JSONEachRow' --data-binary @- {"fingerprint":"15239659101592556481","timestamp_ns":"1699265700000000000","value":null,"string":"FREQ_TEST_0"} {"fingerprint":"15239659101592556481","timestamp_ns":"1699265700000000000","value":null,"string":"FREQ_TEST_0"}
EOF