Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

400 response on sending multiline JSONEachRow requests #10

Open
akvlad opened this issue Nov 6, 2023 · 1 comment
Open

400 response on sending multiline JSONEachRow requests #10

akvlad opened this issue Nov 6, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@akvlad
Copy link
Collaborator

akvlad commented Nov 6, 2023

  1. Create a db:
cat <<EOF | curl -X POST http://a:b@localhost:8123/ --data-binary @-
CREATE DATABASE a;
EOF
  1. create a table
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
  1. 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
  1. send several lines of data into the table
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

AR: p.4 doesn't work with error 400
ER: p.4 should work same as p.3

@lmangani
Copy link
Contributor

This should pass with the latest version, please re-break 😉

@lmangani lmangani added the enhancement New feature or request label Nov 11, 2023
@lmangani lmangani self-assigned this Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants