ClickHouse.Client icon indicating copy to clipboard operation
ClickHouse.Client copied to clipboard

External data support

Open i-sinister opened this issue 5 years ago • 2 comments

Is is possible to add support for external data for the queries? According to clickhouse documentation HTTP api supports it:

$ cat /etc/passwd | sed 's/:/\t/g' > passwd.tsv
$ curl -F '[email protected];' 'http://localhost:8123/?query=SELECT+shell,+count()+AS+c+FROM+passwd+GROUP+BY+shell+ORDER+BY+c+DESC&passwd_structure=login+String,+unused+String,+uid+UInt16,+gid+UInt16,+comment+String,+home+String,+shell+String'

For example command object could have a collection of objects representing "external data" - a class with name, schema and a callback that accepts writer and generates data

i-sinister avatar Jun 18 '20 07:06 i-sinister

It should not be a problem API-wise (they can be represented as table-valued parameters), but I'm not sure how well it will work with the HTTP API, as I use POST body to pass query. Will need to investigate

DarkWanderer avatar Jun 21 '20 21:06 DarkWanderer

+1 for this feature

hohaftf avatar Feb 13 '24 09:02 hohaftf