question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table level settings not passed to ClickHouse

See original GitHub issue

Hi! I’m stuck trying to define a table engine setting through the model config. According to the README.md it should be possible by defining the settings property with a dictionary, but I’m struggling on this one.

My model config looks something like this:

{{ config(order_by='(Geography_Code,)', materialization='table', engine="MergeTree()", settings='({"allow_nullable_key":1})') }}

The source is a table in a MySQL database. But I’m just getting the error:

DB::Exception: Sorting key contains nullable columns, but merge tree setting allow_nullable_key is disabled.

What am I missing?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
genzgdcommented, Sep 2, 2022

This was indeed broken. It should be fixed in dbt-clickhouse 1.1.8.

The syntax for settings looks like this, btw:

 {{ config(order_by='(some_date, id, name)', engine='MergeTree()', materialized='table',
                     settings={'allow_nullable_key': 1}) }}

What you have above had some extra quotes/symbols.

1reaction
jesperbaggecommented, Aug 31, 2022

ClickHouse version is 22.8.1.17 dbt-core is 1.1.0 dbt-clickhouse is 1.1.7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings | ClickHouse Docs
User-level setting that allows mutations on replicated tables to make use of ... If the timeout has passed and no write has taken...
Read more >
Server Settings | ClickHouse Docs
The maximum number of simultaneously processed queries related to MergeTree table per user. Possible values: Positive integer. 0 — No limit. Default value:...
Read more >
MergeTree tables settings | ClickHouse Docs
The values of mergetree settings (for all MergeTree tables) can be viewed in the table system.mergetreesettings, they can be overridden in config.xml in...
Read more >
CREATE TABLE | ClickHouse Docs
Creates a table named table_name in the db database or the current database if db is not set, with the structure specified in...
Read more >
SYSTEM Statements | ClickHouse Docs
ClickHouse can manage distributed tables. When a user inserts data into these tables, ClickHouse first creates a queue of the data that should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found