Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@f-clickhouse-n1:~# clickhouse-client
- ClickHouse client version 1.1.54343.
- Connecting to localhost:9000.
- Connected to ClickHouse server version 1.1.54343.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser.channel ON CLUSTER fornex_cluster (
- :-] channel_id String,
- :-] name String,
- :-] description String,
- :-] image String,
- :-] country String,
- :-] subscribers UInt64,
- :-] views UInt64,
- :-] videos UInt64,
- :-] created_at_date Date,
- :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, channel, rand());
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser.channel ON CLUSTER fornex_cluster
- (
- channel_id String,
- name String,
- description String,
- image String,
- country String,
- subscribers UInt64,
- views UInt64,
- videos UInt64,
- created_at_date Date,
- created_at_time DateTime
- )
- ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, channel, rand())
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.110 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser.video ON CLUSTER fornex_cluster (
- :-] video_id String,
- :-] channel_id String,
- :-] name String,
- :-] description String,
- :-] category String,
- :-] likes UInt64,
- :-] dislikes UInt64,
- :-] views UInt64,
- :-] publication_date Date,
- :-] created_at_date Date,
- :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, video, rand());
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser.video ON CLUSTER fornex_cluster
- (
- video_id String,
- channel_id String,
- name String,
- description String,
- category String,
- likes UInt64,
- dislikes UInt64,
- views UInt64,
- publication_date Date,
- created_at_date Date,
- created_at_time DateTime
- )
- ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, video, rand())
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.107 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser.url ON CLUSTER fornex_cluster (
- :-] channel_id String,
- :-] video_id String,
- :-] short_url String,
- :-] final_url String,
- :-] created_at_date Date,
- :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url, rand());
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser.url ON CLUSTER fornex_cluster
- (
- channel_id String,
- video_id String,
- short_url String,
- final_url String,
- created_at_date Date,
- created_at_time DateTime
- )
- ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url, rand())
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.106 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser.url_dirty ON CLUSTER fornex_cluster (
- :-] durl_url String,
- :-] video_id String,
- :-] created_at_date Date,
- :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url_dirty, rand());
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser.url_dirty ON CLUSTER fornex_cluster
- (
- durl_url String,
- video_id String,
- created_at_date Date,
- created_at_time DateTime
- )
- ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url_dirty, rand())
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.108 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_shard.channel ON CLUSTER fornex_cluster AS fazze_youtube_parser.channel ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/channel', '{replica}', created_at_date, (channel_id, name), 8192);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_shard.channel ON CLUSTER fornex_cluster AS fazze_youtube_parser.channel
- ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/channel', '{replica}', created_at_date, (channel_id, name), 8192)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.109 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_shard.video ON CLUSTER fornex_cluster AS fazze_youtube_parser.video ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/video', '{replica}', created_at_date, (video_id, name), 8192);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_shard.video ON CLUSTER fornex_cluster AS fazze_youtube_parser.video
- ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/video', '{replica}', created_at_date, (video_id, name), 8192)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.107 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_shard.url ON CLUSTER fornex_cluster AS fazze_youtube_parser.url ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/url', '{replica}', created_at_date, (short_url, video_id), 8192);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_shard.url ON CLUSTER fornex_cluster AS fazze_youtube_parser.url
- ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/url', '{replica}', created_at_date, (short_url, video_id), 8192)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.109 sec.
- :) CREATE TABLE fazze_youtube_parser_shard.url_dirty ON CLUSTER fornex_cluster AS fazze_youtube_parser.url_dirty ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/url_dirty', '{replica}', created_at_date, (durl_url, video_id), 8192);
- CREATE TABLE fazze_youtube_parser_shard.url_dirty ON CLUSTER fornex_cluster AS fazze_youtube_parser.url_dirty
- ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/url_dirty', '{replica}', created_at_date, (durl_url, video_id), 8192)
- ┌─host──────────────────┬─port─┬─status─┬─error───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 57 │ Code: 57, e.displayText() = DB::Exception: Table fazze_youtube_parser_shard.url_dirty already exists., e.what() = DB::Exception │ 5 │ 1 │
- │ f-clickhouse-n2.local │ 9000 │ 57 │ Code: 57, e.displayText() = DB::Exception: Table fazze_youtube_parser_shard.url_dirty already exists., e.what() = DB::Exception │ 4 │ 1 │
- │ f-clickhouse-n3.local │ 9000 │ 57 │ Code: 57, e.displayText() = DB::Exception: Table fazze_youtube_parser_shard.url_dirty already exists., e.what() = DB::Exception │ 3 │ 1 │
- │ f-clickhouse-n4.local │ 9000 │ 57 │ Code: 57, e.displayText() = DB::Exception: Table fazze_youtube_parser_shard.url_dirty already exists., e.what() = DB::Exception │ 2 │ 1 │
- │ f-clickhouse-n1.local │ 9000 │ 57 │ Code: 57, e.displayText() = DB::Exception: Table fazze_youtube_parser_shard.url_dirty already exists., e.what() = DB::Exception │ 1 │ 1 │
- └───────────────────────┴──────┴────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────┴──────────────────┘
- ┌─host──────────────────┬─port─┬─status─┬─error───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n6.local │ 9000 │ 57 │ Code: 57, e.displayText() = DB::Exception: Table fazze_youtube_parser_shard.url_dirty already exists., e.what() = DB::Exception │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.158 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.channel ON CLUSTER fornex_cluster AS fazze_youtube_parser.channel ENGINE = Buffer(fazze_youtube_parser_shard, channel, 16, 10, 100, 10000, 1000000, 10000000, 100000000);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.channel ON CLUSTER fornex_cluster AS fazze_youtube_parser.channel
- ENGINE = Buffer(fazze_youtube_parser_shard, channel, 16, 10, 100, 10000, 1000000, 10000000, 100000000)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.108 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.video ON CLUSTER fornex_cluster AS fazze_youtube_parser.video ENGINE = Buffer(fazze_youtube_parser_shard, video, 16, 10, 100, 10000, 1000000, 10000000, 100000000);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.video ON CLUSTER fornex_cluster AS fazze_youtube_parser.video
- ENGINE = Buffer(fazze_youtube_parser_shard, video, 16, 10, 100, 10000, 1000000, 10000000, 100000000)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 1 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.108 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.url ON CLUSTER fornex_cluster AS fazze_youtube_parser.url ENGINE = Buffer(fazze_youtube_parser_shard, url, 16, 10, 100, 10000, 1000000, 10000000, 100000000);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.url ON CLUSTER fornex_cluster AS fazze_youtube_parser.url
- ENGINE = Buffer(fazze_youtube_parser_shard, url, 16, 10, 100, 10000, 1000000, 10000000, 100000000)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.107 sec.
- :) CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.url_dirty ON CLUSTER fornex_cluster AS fazze_youtube_parser.url_dirty ENGINE = Buffer(fazze_youtube_parser_shard, url_dirty, 16, 10, 100, 10000, 1000000, 10000000, 100000000);
- CREATE TABLE IF NOT EXISTS fazze_youtube_parser_buffer.url_dirty ON CLUSTER fornex_cluster AS fazze_youtube_parser.url_dirty
- ENGINE = Buffer(fazze_youtube_parser_shard, url_dirty, 16, 10, 100, 10000, 1000000, 10000000, 100000000)
- ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
- │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
- │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
- │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
- │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
- │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
- │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
- └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
- 6 rows in set. Elapsed: 0.117 sec.
- :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement