0

I tried 2 ways described here enter link description here

  1. Edit metadata file

    CREATE TABLE graphite.data_test ( Path String, Value Float64, Time UInt32, Date Date, Timestamp UInt32 ) ENGINE = GraphiteMergeTree(Date, (Path, Time), 8192, 'graphite_rollup')

    alter table graphite.data_test attach partition 202208 from graphite.data;

    detach table graphite.data_test;

    vi /var/lib/clickhouse/metadata/graphite/data_test.sql ATTACH TABLE data_test ( Path String, Value Float64, Time UInt32, Date Date, Timestamp UInt32 ) ENGINE = GraphiteMergeTree('graphite_rollup') PARTITION BY toYYYYMM(Date) ORDER BY (Path, Time) SETTINGS index_granularity = 8192;

    attach table graphite.data_test;

ERROR: MergeTree data format version on disk doesn't support custom partitioning.

  1. Copy partitions

    CREATE TABLE data_test ( Path String, Value Float64, Time UInt32, Date Date, Timestamp UInt32 ) ENGINE = GraphiteMergeTree('graphite_rollup') PARTITION BY toYYYYMM(Date) ORDER BY (Path, Time) SETTINGS index_granularity = 8192;

    alter table graphite.data_test attach partition 202208 from graphite.data;

ERROR: Tables have different format_version.

Can you tell me if there is any workaround, a way to change the deprecate table to a new format?

Andrew Kaa
  • 117
  • 9

1 Answers1

1

it is possible only using console app and only for parts (not tables) and you need to build this app by yourself.

this app has different names (dependent on version) convert-parts-from-old-format / convert-month-partitioned-parts

Denny Crane
  • 11,574
  • 2
  • 19
  • 30