ClickHouse / ClickHouse/clickhouse-connect

Simplify Inserts of Default Values/Dictionaries

Open
#107 6 comments 8 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
521
Forks
159
Avg merge
1d 8h
Merged PRs (30d)
43

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Client insert method and the Describe Table query handling mentioned in the issue. Determine how None values and missing map/dictionary keys should obtain ClickHouse defaults, including non-standard default expressions; done requires a decided interface and behavior for both complete datasets and key-based inserts.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.