clickhouse-connect icon indicating copy to clipboard operation
clickhouse-connect copied to clipboard

Simplify Inserts of Default Values/Dictionaries

Open genzgd opened this issue 1 year ago • 6 comments

Currently the Client insert method requires the caller to create a complete, populated dataset, including any default values. There should be mechanism where missing/default values are automatically supplied for None values when inserting into a non-nullable columns.

This is closely related to an interface which allows building an insert of Map/Dictionaries using the map/dict keys to determine column names. Missing keys would use the ClickHouse default value.

Determining "non-standard" default values from the "Describe Table" query to ClickHouse is somewhat challenging, as the default expression is a string that ClickHouse Connect would have to evaluate.

genzgd avatar Feb 01 '23 16:02 genzgd