You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i was solving a problem with re-streaming and enriching data flow from one table to another. some records must be skipped, but there are still millions of them. since we have that big number of records, we must process them in chunks to let Clickhouse server finalize the transaction (flush the buffers).
so i need to run the process in iterations somehow. sadly, that does not work because i cannot make read stream get the next chunk of records. here is my test case which reproduces the issue (output + debug is below):
please let me know if i am doing something stupid and that must be rewritten different way. i did not find any examples, sadly.
also, i get into other weird issues. i am not sure they are related, but
JSON.stringify does not work inside stream.Transform. it shows DB::ParsingException: Cannot parse input: expected '\t' before: '{"str":"0","val":0}\n{"str"…. so i created tabify() function instead.
specified session ID leads to Invalid JSON (Unexpected "C" at position 0 in state STOP) (seems it requires JSON in that case, but see the previous bullet i have to use tabify instead of JSON.stringify)
anyway, i'd be happy to have ability to re-stream the records between tables in chunks somehow. please suggest how to do that correctly.
hi there,
i was solving a problem with re-streaming and enriching data flow from one table to another. some records must be skipped, but there are still millions of them. since we have that big number of records, we must process them in chunks to let Clickhouse server finalize the transaction (flush the buffers).
so i need to run the process in iterations somehow. sadly, that does not work because i cannot make read stream get the next chunk of records. here is my test case which reproduces the issue (output + debug is below):
https://github.com/hlopetz/clickhouse/blob/restreaming-issue/test/test.js#L604
please let me know if i am doing something stupid and that must be rewritten different way. i did not find any examples, sadly.
also, i get into other weird issues. i am not sure they are related, but
JSON.stringify
does not work insidestream.Transform
. it showsDB::ParsingException: Cannot parse input: expected '\t' before: '{"str":"0","val":0}\n{"str"…
. so i createdtabify()
function instead.Invalid JSON (Unexpected "C" at position 0 in state STOP)
(seems it requires JSON in that case, but see the previous bullet i have to usetabify
instead ofJSON.stringify
)anyway, i'd be happy to have ability to re-stream the records between tables in chunks somehow. please suggest how to do that correctly.
the output + debug:
The text was updated successfully, but these errors were encountered: