clickhouse create distributed table

CREATE TABLE canyin_local ON CLUSTER default ( `good_id` String, `delivery_fee` String, `province` String, `emotionalKeywords` String, `shopId` String, `longitude` String, `registration_institution` String, `goodRatePercentage` String, `shopSellCount` String, `min_delivery_price` String, `phone` String, `district` String, `opening_hours` String, `sellCount` String, `goodDescription` String, `delivery_mode` String, `city` String, `latitude` String, `praiseNum` String, `shopName` String, `city_grade` String, `title` String, `categoryName` String, `shopCommentCount` String, `salesAmount` String, `street` String, `administrative_region` String, `platformName` String, `priceText` String, `licencePics` String, `address` String, `shopImages` String, `platformId` String, `rootCategoryId` String, `timeStamp` String, `original_cost` String, `shopDescription` String, `rootCategoryName` String, `categoryId` String, `time` Date ) ENGINE = ReplicatedMergeTree( ‘/clickhouse/tables/canyin_local/{shard}’, ‘{replica}’, time, (timeStamp, time), 8192); NEXT STEP: CREATE TABLE canyin_distributed ON CLUSTER default AS canyin_local ENGINE = Distributed(default, default, canyin_local, rand());

Leave a Reply

Your email address will not be published. Required fields are marked *