Open akvlad opened 10 months ago
The current support is barely plaintext only. To properly support POST data (including binary formats) we should expose a data hook in chdb equivalent to stdin (or --data) in clickhouse-local
# python3 -m chdb "SELECT 1", "Native" > output.native
# python3 -m chdb "SELECT * FROM table" < output.native
1
@auxten is there a way we can expose/hook to pass data into chdb without using rough stdin
?
The data pipe won't be available until future versions of chdb will support it without stdin hacks. I've implemented a workaround in 0.15.3 which should work around the newline issues until better things come along.
The workaround was weak and didn't cover binary protocols. so as predicted this needs an stdin hack to function. Here's a prototype to test: https://github.com/chdb-io/chdb-server/pull/11
The third request gets error 400 with some misleading message. On the other hand:
When the same request is sent with no newline inside, the data gets ingested successfully. Newlines in the middle of a request should be omitted by server.