Reading CSV output #442
Unanswered
megasuperlexa
asked this question in
Q&A
Replies: 2 comments
-
looking into implementation, the best way to do it seem to be using var result = await cmd.ExecuteRawResultAsync(ct);
await using var chStream = await result.ReadAsStreamAsync().WaitAsync(ct);
...
await chStream.CopyToAsync(writer, ct); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi. Indeed, this function was created for this very purpose - glad you found it useful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I was hoping to use Clickhouse csv output capability but unsure how to do it using Clickhouse.Client.
The following code:
throws an exception on
await cmd.ExecuteReaderAsync(ct)
: "Attempted to read past the end of the stream."It is of course works without
FORMAT CSVWithNames
but my point is to read in csv format.Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions