Closed vladimirteddy closed 4 years ago
@banbedangki Please provide more detailed example illustrating the way you are working with data
@banbedangki Please provide more detailed example illustrating the way you are working with data
I use ch.query("INSERT INTO " + table + " FORMAT JSONEachRow " + data)
. My data is JSON arrays and my option: options = { host: 'localhost', port: 8124, user: 'phanbinh', password: 'my_pass', readonly: false, queryOptions: { profile: "default", database: "Abc", insert_sample_with_metadata: 0 } }
I POST with format
ch.query("INSERT INTO " + table + " FORMAT JSONEachRow " + data)
If I cancel command run code on terminal then data will be created. Can tell me why?
I think my bugs from here. When I POST one billion records, I split and POST ten thousand at a time but every POST 10k records, data not created on ClickHouse, if I cancel run code on the terminal then data will be created.
let stream = ch.query("INSERT INTO " + table + " FORMAT JSONEachRow " + data)
. I'm log stream:
What is '\n' in my query?
Logs error.
I'm fixed, thank for your interest.
@vladimirteddy It's a good news!
For now i can only suggest that the problem was caused by malformed query.
Also this driver is using http interface and always automatically adding "\n"
after query to separate it from data, but it should not be a problem if you are using this driver as described in docs.
This means that you must choose one of following options:
I query with format INSERT INTO MY_TABLE with option JSONEachRow, my data have one billion records, I splice and write up 1000 each time, and write from record 79k I have a bug Error: Cannot read from istream at offset 0. My query
"INSERT INTO " + table + " FORMAT JSONEachRow " + data
.Log error on the server.
Please help my issue, thank.