Conversation
alex-clickhouse
commented
Dec 23, 2025
- Select to file
- Query cancelation
- Readonly users
- Insert from select
- Insert with ephemeral
There was a problem hiding this comment.
Pull request overview
This PR adds five new example files demonstrating important ClickHouse.Driver capabilities: exporting query results to files, query cancellation, read-only user limitations, INSERT FROM SELECT patterns, and EPHEMERAL columns. These examples enhance the documentation by covering common use cases for data export, ETL operations, user permission management, and cancellation handling.
Key Changes
- Added examples for exporting query results to different formats (JSONEachRow, Parquet)
- Added query cancellation examples using CancellationToken
- Added comprehensive read-only user limitation examples
- Added INSERT FROM SELECT examples for ETL and data transformation scenarios
- Added EPHEMERAL column examples for input data transformation
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/Select_004_ExportToFile.cs | Demonstrates ExecuteRawResultAsync for exporting query results to JSONEachRow and Parquet formats |
| examples/README.md | Updated documentation index with references to the new example files |
| examples/Program.cs | Added invocations for the new example classes in the example runner |
| examples/Insert_006_EphemeralColumns.cs | Demonstrates using EPHEMERAL columns to derive multiple stored columns from temporary input values |
| examples/Insert_005_InsertFromSelect.cs | Demonstrates INSERT FROM SELECT for data copying, transformation, and aggregation |
| examples/Advanced_009_ReadOnlyUsers.cs | Demonstrates behavior and limitations of READONLY = 1 users including blocked operations |
| examples/Advanced_008_QueryCancellation.cs | Demonstrates cancelling queries using CancellationToken with timeout and manual cancellation scenarios |
| var readOnlyUsername = $"clickhouse_cs_readonly_user_{guid}"; | ||
| var readOnlyPassword = $"{guid}_pwd"; |
There was a problem hiding this comment.
Password is predictable from username since both use the same GUID. In production scenarios, passwords should be cryptographically random and independent from usernames.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |