souparno majumder
souparno majumder

Reputation: 2052

cubejs clickhouse external db table engine not specified

I am trying to use cubejs with mysql as the internal db and clickhouse as the external pre-aggregation database. But every time the scheduler is trying to build the external table, it is throwing Unknown error field: Code: 119. DB::Exception: Table engine is not specified in CREATE query. (ENGINE_REQUIRED) (version 22.7.2.1). I saw this post and found that ENGINE = MergeTree() will solve this. grepping the clubejs packages I found the mergetree to be present inside the ClickHouseQuery.js, However it seems like that package even though present in the node_modules is not getting used while running the pre-aggregation query. The following is the error stack:-

enter image description here

enter image description here

and the .env looks like this:-

CUBEJS_DB_TYPE=mysql
CUBEJS_DB_HOST=host
CUBEJS_DB_USER=user
CUBEJS_DB_PASS=password
CUBEJS_DB_NAME=primary_db

CUBEJS_EXT_DB_TYPE=clickhouse
CUBEJS_EXT_DB_HOST=127.0.0.1
CUBEJS_EXT_DB_PORT=8123
CUBEJS_EXT_DB_USER=default

CUBEJS_EXTERNAL_DEFAULT=true
CUBEJS_SCHEDULED_REFRESH_DEFAULT=true
CUBEJS_DEV_MODE=true
CUBEJS_SCHEMA_PATH=model

am I missing out on any other configs ?

Upvotes: 1

Views: 277

Answers (1)

Pavel Tiunov
Pavel Tiunov

Reputation: 1158

Storing pre-aggregations in Clickhouse is unsupported by the latest versions of Cube. Cube Store is the only supported option.

Upvotes: 0

Related Questions