CH.Toolkit.Schema 0.0.1-preview.3

This is a prerelease version of CH.Toolkit.Schema.
dotnet add package CH.Toolkit.Schema --version 0.0.1-preview.3
                    
NuGet\Install-Package CH.Toolkit.Schema -Version 0.0.1-preview.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CH.Toolkit.Schema" Version="0.0.1-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CH.Toolkit.Schema" Version="0.0.1-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="CH.Toolkit.Schema" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CH.Toolkit.Schema --version 0.0.1-preview.3
                    
#r "nuget: CH.Toolkit.Schema, 0.0.1-preview.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CH.Toolkit.Schema@0.0.1-preview.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CH.Toolkit.Schema&version=0.0.1-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CH.Toolkit.Schema&version=0.0.1-preview.3&prerelease
                    
Install as a Cake Tool

CH.Toolkit.Schema

Schema model records and DDL compiler for ClickHouse databases, tables, materialized views, and dictionaries.

Key Types

  • DatabaseSchema -- top-level record containing tables, materialized views, and dictionaries
  • TableSchema -- table definition with columns, engine, indexes, and projections
  • ColumnSchema -- column definition with type, default, codec, TTL, and key membership
  • EngineSchema -- table engine configuration (MergeTree, ReplacingMergeTree, etc.)
  • MaterializedViewSchema -- materialized view definition with select query and optional target table
  • DictionarySchema -- external dictionary with source, layout, lifetime, and attributes
  • DdlCompiler -- converts schema records into SQL AST nodes (SqlNode) for rendering
  • DdlOptions -- compiler options: cluster name, IF [NOT] EXISTS behavior

Dependencies

  • CH.Toolkit.Types
  • CH.Toolkit.Sql

Usage

using CH.Toolkit.Schema;
using CH.Toolkit.Sql;
using CH.Toolkit.Types;

// Define a table schema
var table = new TableSchema("events",
    Columns: [
        new ColumnSchema("timestamp", new ChDateTime(), IsInSortKey: true),
        new ColumnSchema("user_id", new ChString()),
        new ColumnSchema("value", new ChInt32())
    ],
    Engine: new EngineSchema("MergeTree", OrderBy: ["timestamp"]));

// Compile to SQL AST and render
var compiler = new DdlCompiler(new DdlOptions { ClusterName = "prod" });
var node = compiler.CompileCreateTable(table, database: "analytics");
var sql = new ClickHouseSqlRenderer().Render(node);

See the root README for full project documentation.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on CH.Toolkit.Schema:

Package Downloads
CH.Toolkit

ClickHouse schema modeling, migrations, and query building for .NET. Meta-package that includes Types, Sql, Schema, Modeling, Query, Introspection, and Migrations.

CH.Toolkit.Modeling

Fluent SchemaBuilder API for defining ClickHouse schemas from C# POCOs. Supports all MergeTree engines, column overrides, materialized views, and dictionaries.

CH.Toolkit.Introspection

Schema introspection for ClickHouse. Reads tables, columns, engines, indexes, projections, materialized views, and dictionaries from ClickHouse system tables.

CH.Toolkit.Migrations

ClickHouse migration system with schema diffing, C# code generation, and a migration runner with distributed locking, checksum validation, and safety policies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-preview.3 89 2/23/2026
0.0.1-preview.2 66 2/23/2026
0.0.1-preview.1 75 2/23/2026