MAPREDUCE服务 MRS-Projection设计:projection定义

时间:2024-04-16 08:56:36

projection定义

CREATE TABLE test_projection_table(
    level String,
    type String,
    name String,
    city String,
    time DateTime64,
    PROJECTION projection_1(
        SELECT level,
            count()
        GROUP BY level
    ),
    PROJECTION projection_2(
        SELECT type,
            count()
        GROUP BY type
    )
) ENGINE = MergeTree()
ORDER BY (name, level, type)
support.huaweicloud.com/bestpractice-mrs/mrs_05_0094.html