ClickHouse / ClickHouse/dbt-clickhouse

Field name annotation encoding error

Open
#308 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
362
Forks
177
Avg merge
2d 10h
Merged PRs (30d)
8

Description

When the field annotation field name is in Chinese, the following error will be reported

```
- name: season_product_predict_seller_sku
description: "season_data"
config:
engine: 'MergeTree'
unique_key: 'info, update_time'
columns:
- name: 年趋势变化率
description: rate of year
```

```
Code: 62. DB::Exception: Syntax error: failed at position 352 ('\xe5') (line 6, col 85): 年趋势变化率
$dbt_comment_literal_block$rate of year$dbt_comment_literal_block$

. Unrecognized token: '\xe5'. (SYNTAX_ERROR) (version 24.4.1.2088 (official build))
compiled Code at target\run\elt\models\sql_model\store_data\season_product_predict_seller_sku.sql
```

Currently, English fields are used instead of Chinese fields,
Can Chinese fields be supported in the future?

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the model configuration and Chinese field name shown in the issue, then inspect the compiled SQL at target/run/elt/models/sql_model/store_data/season_product_predict_seller_sku.sql. Compare the generated SQL for English and Chinese field names. Done means the Chinese annotation compiles and executes without the reported syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.