13 lines
576 B
Plaintext
13 lines
576 B
Plaintext
CREATE TABLE etl.company_report (
|
|
id String,
|
|
company_id String,
|
|
unified_code String,
|
|
year String,
|
|
company String,
|
|
mail_address String,
|
|
m_date DateTime('Asia/Shanghai') default now() COMMENT '更新时间'
|
|
) ENGINE ReplacingMergeTree(m_date)
|
|
PARTITION BY substring(unified_code, 2, 2) PRIMARY KEY (id) ORDER BY (id);
|
|
|
|
# 导入数据
|
|
clickhouse-client --format_csv_delimiter="@" --input_format_with_names_use_header=0 --query="INSERT INTO etl.company_report FORMAT CSV" --host=192.168.0.216 --password=goojia123456 < part-r-00000 |