Advertisement
thisisvld

Untitled

Nov 7th, 2018
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.92 KB | None | 0 0
  1. :) CREATE DATABASE IF NOT EXISTS fazze_youtube_parser ON CLUSTER fornex_cluster;
  2.  
  3. CREATE DATABASE IF NOT EXISTS fazze_youtube_parser ON CLUSTER fornex_cluster
  4.  
  5. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  6. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  7. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  8. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  9. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  10. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  11. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  12. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  13.  
  14. 6 rows in set. Elapsed: 0.133 sec.
  15.  
  16. :) CREATE DATABASE IF NOT EXISTS fazze_youtube_parser_buffer ON CLUSTER fornex_cluster;
  17.  
  18. CREATE DATABASE IF NOT EXISTS fazze_youtube_parser_buffer ON CLUSTER fornex_cluster
  19.  
  20. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  21. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  22. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  23. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  24. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  25. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  26. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  27. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  28.  
  29. 6 rows in set. Elapsed: 0.115 sec.
  30.  
  31. :) CREATE DATABASE IF NOT EXISTS fazze_youtube_parser_shard ON CLUSTER fornex_cluster;
  32.  
  33. CREATE DATABASE IF NOT EXISTS fazze_youtube_parser_shard ON CLUSTER fornex_cluster
  34.  
  35. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  36. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  37. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  38. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  39. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
  40. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
  41. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  42. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  43.  
  44. 6 rows in set. Elapsed: 0.107 sec.
  45.  
  46. :) CREATE TABLE fazze_youtube_parser.channel ON CLUSTER fornex_cluster (
  47. :-] channel_id String,
  48. :-] name String,
  49. :-] description String,
  50. :-] image String,
  51. :-] country String,
  52. :-] subscribers UInt64,
  53. :-] views UInt64,
  54. :-] videos UInt64,
  55. :-] created_at_date Date,
  56. :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, channel, rand());
  57.  
  58. CREATE TABLE fazze_youtube_parser.channel ON CLUSTER fornex_cluster
  59. (
  60. channel_id String,
  61. name String,
  62. description String,
  63. image String,
  64. country String,
  65. subscribers UInt64,
  66. views UInt64,
  67. videos UInt64,
  68. created_at_date Date,
  69. created_at_time DateTime
  70. )
  71. ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, channel, rand())
  72.  
  73. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  74. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  75. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  76. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  77. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  78. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  79. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  80. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  81.  
  82. 6 rows in set. Elapsed: 0.108 sec.
  83.  
  84. :) CREATE TABLE fazze_youtube_parser.video ON CLUSTER fornex_cluster (
  85. :-] video_id String,
  86. :-] channel_id String,
  87. :-] name String,
  88. :-] description String,
  89. :-] category String,
  90. :-] likes UInt64,
  91. :-] dislikes UInt64,
  92. :-] views UInt64,
  93. :-] publication_date Date,
  94. :-] created_at_date Date,
  95. :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, video, rand());
  96.  
  97. CREATE TABLE fazze_youtube_parser.video ON CLUSTER fornex_cluster
  98. (
  99. video_id String,
  100. channel_id String,
  101. name String,
  102. description String,
  103. category String,
  104. likes UInt64,
  105. dislikes UInt64,
  106. views UInt64,
  107. publication_date Date,
  108. created_at_date Date,
  109. created_at_time DateTime
  110. )
  111. ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, video, rand())
  112.  
  113. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  114. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  115. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  116. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  117. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  118. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  119. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  120. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  121.  
  122. 6 rows in set. Elapsed: 0.108 sec.
  123.  
  124. :) CREATE TABLE fazze_youtube_parser.url ON CLUSTER fornex_cluster (
  125. :-] channel_id String,
  126. :-] video_id String,
  127. :-] short_url String,
  128. :-] final_url String,
  129. :-] created_at_date Date,
  130. :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url, rand());
  131.  
  132. CREATE TABLE fazze_youtube_parser.url ON CLUSTER fornex_cluster
  133. (
  134. channel_id String,
  135. video_id String,
  136. short_url String,
  137. final_url String,
  138. created_at_date Date,
  139. created_at_time DateTime
  140. )
  141. ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url, rand())
  142.  
  143. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  144. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  145. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  146. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  147. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 2 │ 0 │
  148. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 1 │ 0 │
  149. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  150. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  151.  
  152. 6 rows in set. Elapsed: 0.108 sec.
  153.  
  154. :) CREATE TABLE fazze_youtube_parser.url_dirty ON CLUSTER fornex_cluster (
  155. :-] durl_url String,
  156. :-] video_id String,
  157. :-] created_at_date Date,
  158. :-] created_at_time DateTime) ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url_dirty, rand());
  159.  
  160. CREATE TABLE fazze_youtube_parser.url_dirty ON CLUSTER fornex_cluster
  161. (
  162. durl_url String,
  163. video_id String,
  164. created_at_date Date,
  165. created_at_time DateTime
  166. )
  167. ENGINE = Distributed(fornex_cluster, fazze_youtube_parser_buffer, url_dirty, rand())
  168.  
  169. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  170. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  171. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  172. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  173. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  174. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  175. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  176. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  177.  
  178. 6 rows in set. Elapsed: 0.109 sec.
  179.  
  180. :) CREATE TABLE 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);
  181.  
  182. Syntax error: failed at position 107:
  183.  
  184. CREATE TABLE 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);
  185.  
  186. Unmatched parentheses: (
  187.  
  188. :) CREATE TABLE 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);
  189.  
  190. Syntax error: failed at position 107:
  191.  
  192. CREATE TABLE 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);
  193.  
  194. Unmatched parentheses: (
  195.  
  196. :) CREATE TABLE 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);
  197.  
  198. CREATE TABLE fazze_youtube_parser_shard.channel ON CLUSTER fornex_cluster AS fazze_youtube_parser.channel
  199. ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/channel', '{replica}', created_at_date, (channel_id, name), 8192)
  200.  
  201. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  202. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 2 │
  203. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 4 │ 2 │
  204. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 3 │ 2 │
  205. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 2 │ 2 │
  206. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  207. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  208. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 1 │ 0 │
  209. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 0 │ 0 │
  210. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  211.  
  212. 6 rows in set. Elapsed: 0.279 sec.
  213.  
  214. :) CREATE TABLE 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);
  215.  
  216. CREATE TABLE fazze_youtube_parser_shard.video ON CLUSTER fornex_cluster AS fazze_youtube_parser.video
  217. ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/video', '{replica}', created_at_date, (video_id, name), 8192)
  218.  
  219. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  220. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  221. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  222. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  223. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  224. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  225. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  226. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  227.  
  228. 6 rows in set. Elapsed: 0.107 sec.
  229.  
  230. :) CREATE TABLE 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);
  231.  
  232. CREATE TABLE fazze_youtube_parser_shard.url ON CLUSTER fornex_cluster AS fazze_youtube_parser.url
  233. ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/url', '{replica}', created_at_date, (short_url, video_id), 8192)
  234.  
  235. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  236. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  237. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  238. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  239. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  240. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  241. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  242. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  243.  
  244. 6 rows in set. Elapsed: 0.111 sec.
  245.  
  246. :) 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);
  247.  
  248. CREATE TABLE fazze_youtube_parser_shard.url_dirty ON CLUSTER fornex_cluster AS fazze_youtube_parser.url_dirty
  249. ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/fazze_youtube_parser_shard/url_dirty', '{replica}', created_at_date, (durl_url, video_id), 8192)
  250.  
  251. ┌─host──────────────────┬─port─┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
  252. │ f-clickhouse-n5.local │ 9000 │ 0 │ │ 5 │ 0 │
  253. │ f-clickhouse-n2.local │ 9000 │ 0 │ │ 4 │ 0 │
  254. │ f-clickhouse-n3.local │ 9000 │ 0 │ │ 3 │ 0 │
  255. │ f-clickhouse-n4.local │ 9000 │ 0 │ │ 2 │ 0 │
  256. │ f-clickhouse-n1.local │ 9000 │ 0 │ │ 1 │ 0 │
  257. │ f-clickhouse-n6.local │ 9000 │ 0 │ │ 0 │ 0 │
  258. └───────────────────────┴──────┴────────┴───────┴─────────────────────┴──────────────────┘
  259.  
  260. 6 rows in set. Elapsed: 0.107 sec.
  261.  
  262. :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement