{"id":371379,"date":"2024-05-21T04:47:33","date_gmt":"2024-05-21T04:47:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371379"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:47:33","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371379","title":{"rendered":"<span>\u0418\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u043a\u0430\u0445: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 ClickHouse<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u2014\u00a0\u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430. \u0410 ClickHouse \u2014\u00a0\u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c ClickHouse \u0432 Yandex Cloud \u0438\u043b\u0438 \u043d\u0430 VDS-\u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0441\u0435\u0442\u0438. \u042d\u0442\u0438\u043c \u0438 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d3f\/3bf\/d4d\/d3f3bfd4d486ed2535a3fd3b69ebb819.png\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d3f\/3bf\/d4d\/d3f3bfd4d486ed2535a3fd3b69ebb819.png\"\/><\/figure>\n<blockquote>\n<p><strong>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:<\/strong> \u042f \u0416\u0435\u043d\u044f \u041a\u0443\u0437\u043d\u0435\u0446\u043e\u0432, \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0434\u0436\u0438\u0442\u0430\u043b-\u0441\u0442\u0440\u0430\u0442\u0435\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u044e\u0431\u0438\u0442 \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445. \u041d\u043e \u044f \u043d\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0433\u0443 \u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u2014 \u0445\u043e\u0442\u044f \u0444\u0430\u043a\u0442\u044b \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<\/p>\n<\/blockquote>\n<h2>\u0417\u0430\u0447\u0435\u043c \u043c\u043d\u0435 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445?<\/h2>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0430 \u0438 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u044b \u043a \u043d\u0435\u0439 \u0438\u0437 Yandex DataLens.<\/p>\n<p>\u0412 Logs API \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0446\u0435\u043b\u0435\u0439 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>ym:s:goalsID<\/code> \u2014 \u043d\u043e\u043c\u0435\u0440\u0430 \u0446\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u044b\u0445 \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0438\u0437\u0438\u0442;<\/p>\n<\/li>\n<li>\n<p><code>ym:s:goalsSerialNumber<\/code> \u2014 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0438 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p><code>ym:s:goalsDateTime<\/code> \u2014 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043b\u0438 (\u0432 \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435 UTC+3).<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0432 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u0435 DataLens \u043a \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e:<\/p>\n<ul>\n<li>\n<p>\u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u043b\u044e\u0431\u043e\u0439 \u0446\u0435\u043b\u0438,<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0432 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0439 \u0446\u0435\u043b\u0438,<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e\u0439 \u0446\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0447\u0430\u0440\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 (\u0442. \u0435. \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0438 \u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e\u0439 \u0446\u0435\u043b\u0438) \u2014 \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u043e\u0439 \u0440\u0430\u0437\u043e\u0439\u0434\u0443\u0442\u0441\u044f, \u043f\u0440\u0438\u0447\u0435\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0446\u0435\u043b\u044f\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/yandex.ru\/dev\/metrika\/doc\/api2\/logs\/fields\/visits.html\" rel=\"noopener noreferrer nofollow\"><u>\u0432 Logs Api<\/u><\/a> \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d56\/a09\/ff5\/d56a09ff5bea38c03579015f1003b5d7.png\" width=\"1600\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d56\/a09\/ff5\/d56a09ff5bea38c03579015f1003b5d7.png\"\/><\/figure>\n<p>\u0415\u0441\u0442\u044c \u043b\u0430\u0439\u0444\u0445\u0430\u043a, \u043a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e, \u043d\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043e\u0434\u043d\u0443 \u043c\u0430\u043a\u0440\u043e\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e. \u041e\u0431 \u044d\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 ClickHouse?<\/h2>\n<blockquote>\n<p><strong>ClickHouse \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414) \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u042f\u043d\u0434\u0435\u043a\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0435\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0432\u0435\u0431-\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432 \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0435.<\/strong><\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434:<\/p>\n<ul>\n<li>\n<p>\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445,<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u043c\u0435\u0442\u044c \u0432 \u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u2014 \u043f\u043b\u044e\u0441 \u043a \u0440\u0435\u0437\u044e\u043c\u0435,<\/p>\n<\/li>\n<li>\n<p>\u043e\u043d\u0430 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u0430\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 ClickHouse \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u0435\u043a\u0442 SQL, \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f: \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 URI.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 ClickHouse \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/clickhouse.com\/docs\/ru\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0418 \u0442\u0443\u0442 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u0432 Yandex Cloud. \u0417\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c, \u043f\u0440\u0438\u0447\u0435\u043c \u043e\u043a\u043e\u043b\u043e 5 \u0442\u044b\u0441\u044f\u0447 \u0440\u0443\u0431\u043b\u0435\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041d\u043e \u0437\u0430\u0442\u043e \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u043c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 (VDS).<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u043d\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0438\u0437\u0432\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u044f \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e.<\/p>\n<h2>ClickHouse \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/h2>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f ClickHouse \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043a\u0435\u0439\u0441\u0435 <a href=\"https:\/\/cloud.yandex.ru\/ru\/docs\/datalens\/tutorials\/data-from-metrica-yc-visualization#ch-connection\" rel=\"noopener noreferrer nofollow\"><u>\u00ab\u0412\u0435\u0431-\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u043c \u0432\u043e\u0440\u043e\u043d\u043e\u043a \u0438 \u043a\u043e\u0433\u043e\u0440\u0442 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0438\u00bb<\/u><\/a>, \u043d\u043e \u0442\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u2014 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u0433\u0443\u0441\u044c \u043f\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>1. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Managed Service for ClickHouse \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 ClickHouse\u00bb.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e96\/beb\/5db\/e96beb5db086d8dc5ec3e2cd0c33374f.png\" width=\"1600\" height=\"560\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e96\/beb\/5db\/e96beb5db086d8dc5ec3e2cd0c33374f.png\"\/><\/figure>\n<p>2. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0445\u0432\u0430\u0442\u0438\u0442 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0a6\/65b\/ce6\/0a665bce6ca5bc87740f03e670978eef.png\" width=\"1600\" height=\"756\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0a6\/65b\/ce6\/0a665bce6ca5bc87740f03e670978eef.png\"\/><\/figure>\n<p>3. \u0412\u0430\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u2014 \u0432 \u0431\u043b\u043e\u043a\u0435 \u00ab\u0425\u043e\u0441\u0442\u044b\u00bb \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u043f\u0446\u0438\u044e \u00ab\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u00bb.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fd3\/661\/00b\/fd366100bd25cb9f112657ffab5f4187.png\" width=\"1600\" height=\"520\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fd3\/661\/00b\/fd366100bd25cb9f112657ffab5f4187.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/715\/ee7\/532\/715ee7532b6c20593c829650a4c4cda7.png\" width=\"1600\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/715\/ee7\/532\/715ee7532b6c20593c829650a4c4cda7.png\"\/><\/figure>\n<p>4. \u0412 \u0431\u043b\u043e\u043a\u0435 \u00ab\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0421\u0423\u0411\u0414\u00bb \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 SQL, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/917\/ce6\/281\/917ce62813b19d3f9f2c7d2cbe5b9a3a.png\" width=\"1600\" height=\"672\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/917\/ce6\/281\/917ce62813b19d3f9f2c7d2cbe5b9a3a.png\"\/><\/figure>\n<p>5. \u0412 \u0431\u043b\u043e\u043a\u0435 \u00ab\u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u0438: \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 DataLens\u00bb, \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u00bb, \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 AppMetrica\u00bb, \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 Serverless\u00bb.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/822\/200\/c96\/822200c966c2eb3170e8878b475a8c10.png\" width=\"1600\" height=\"816\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/822\/200\/c96\/822200c966c2eb3170e8878b475a8c10.png\"\/><\/figure>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 ClickHouse \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/953\/22c\/131\/95322c131595434310c67efc972d8417.png\" width=\"1600\" height=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/953\/22c\/131\/95322c131595434310c67efc972d8417.png\"\/><\/figure>\n<h2>ClickHouse \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430: \u043f\u043e\u043a\u0443\u043f\u043a\u0443 VDS \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 ClickHouse.<\/p>\n<h3>\u041f\u043e\u043a\u0443\u043f\u043a\u0430 VDS<\/h3>\n<p>1. \u0414\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u043e\u043c\u00a0\u2014 \u044f \u0432\u044b\u0431\u0440\u0430\u043b NetAngels.\u00a0<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/clickhouse.com\/docs\/ru\/operations\/requirements\" rel=\"noopener noreferrer nofollow\"><u>\u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> \u2014 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 4 \u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 2 \u0413\u0411 \u2014 \u043c\u0430\u0448\u0438\u043d\u0430 \u0437\u0430\u0432\u0438\u0441\u0430\u043b\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u0436\u0435 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0445 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/834\/5b7\/744\/8345b7744359ed9a30a435479309329a.png\" width=\"1600\" height=\"1155\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/834\/5b7\/744\/8345b7744359ed9a30a435479309329a.png\"\/><\/figure>\n<p>2. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430, \u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443 \u043f\u0440\u0438\u0434\u0443\u0442 \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e SSH. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0431\u043e\u0440\u043a\u0443 \u043e\u0442 NetAngels \u043d\u0430 \u0431\u0430\u0437\u0435 Debian 11.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d52\/f60\/63b\/d52f6063b8633b6165c5781a84e83351.png\" width=\"1600\" height=\"837\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d52\/f60\/63b\/d52f6063b8633b6165c5781a84e83351.png\"\/><\/figure>\n<p>3. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aa3\/6f0\/b34\/aa36f0b349f521a59b135ea9575f57fb.png\" width=\"1600\" height=\"781\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa3\/6f0\/b34\/aa36f0b349f521a59b135ea9575f57fb.png\"\/><\/figure>\n<p>\u042f \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0441\u0451 \u0432 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/164\/9c0\/4e6\/1649c04e6793470d9585e865025db05f.png\" width=\"1600\" height=\"318\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/164\/9c0\/4e6\/1649c04e6793470d9585e865025db05f.png\"\/><\/figure>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ClickHouse<\/h3>\n<p>1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>apt-transport-https \u2014 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043f\u043e https;<\/p>\n<\/li>\n<li>\n<p>ca-certificates \u2014 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>dirmngr \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install -y apt-transport-https ca-certificates dirmngr<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da7\/74d\/7de\/da774d7de6a8d0e85a61b90e265e7a4b.png\" width=\"1600\" height=\"196\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/da7\/74d\/7de\/da774d7de6a8d0e85a61b90e265e7a4b.png\"\/><\/figure>\n<p>2. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438.<\/p>\n<pre><code class=\"bash\">GNUPGHOME=$(mktemp -d)  sudo GNUPGHOME=\"$GNUPGHOME\" gpg --no-default-keyring --keyring \/usr\/share\/keyrings\/clickhouse-keyring.gpg --keyserver hkp:\/\/keyserver.ubuntu.com:80 --recv-keys 8919F6BD2B48D754  sudo rm -rf \"$GNUPGHOME\"  sudo chmod +r \/usr\/share\/keyrings\/clickhouse-keyring.gpg<\/code><\/pre>\n<p>3. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.<\/p>\n<pre><code class=\"bash\">echo \"deb [signed-by=\/usr\/share\/keyrings\/clickhouse-keyring.gpg] https:\/\/packages.clickhouse.com\/deb stable main\" | sudo tee \\     \/etc\/apt\/sources.list.d\/clickhouse.list<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9d9\/602\/41f\/9d960241f2d1f480f95bd086b2025a00.png\" width=\"1600\" height=\"275\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d9\/602\/41f\/9d960241f2d1f480f95bd086b2025a00.png\"\/><\/figure>\n<p>4. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043a\u044d\u0448.<\/p>\n<pre><code class=\"bash\">sudo apt-get update<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a3c\/948\/f87\/a3c948f870d39d1322c23ecfc4cb66ea.png\" width=\"1600\" height=\"436\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a3c\/948\/f87\/a3c948f870d39d1322c23ecfc4cb66ea.png\"\/><\/figure>\n<p>5. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0422\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b.<\/p>\n<ul>\n<li>\n<p>\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 -y \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c YES \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445). \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f default \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0430\u0440\u043e\u043b\u044c, \u043d\u043e, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u044b \u0441\u043a\u043e\u0440\u043e \u0435\u0433\u043e \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install -y clickhouse-server clickhouse-client<\/code><\/pre>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f default.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install clickhouse-server clickhouse-client<\/code><\/pre>\n<ul>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435. \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u044f \u0441\u0442\u0430\u0432\u0438\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0435\u0437 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 (\u0447\u0442\u043e-\u0442\u043e \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 19.1.*)<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install clickhouse-server=24.1.5.6 clickhouse-client=24.1.5.6 clickhouse-common-static=24.1.5.6<\/code><\/pre>\n<blockquote>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/ClickHouse\/ClickHouse\/releases\" rel=\"noopener noreferrer nofollow\"><u>\u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/739\/657\/7b0\/7396577b096ed5a9a39616ff2efac557.png\" width=\"1600\" height=\"842\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/739\/657\/7b0\/7396577b096ed5a9a39616ff2efac557.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/738\/804\/5cc\/7388045cc90386579ca1d3371375ef1e.png\" width=\"1600\" height=\"709\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/738\/804\/5cc\/7388045cc90386579ca1d3371375ef1e.png\"\/><\/figure>\n<p>\u0412\u0441\u0435, ClickHouse \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d!<\/p>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/en\/install#install-from-deb-packages\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> ClickHouse.<\/p>\n<\/blockquote>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0422\u0443\u0442 \u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u2014 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c default.<\/p>\n<p>1. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<pre><code class=\"bash\">sudo clickhouse start<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/016\/4d9\/c04\/0164d9c04f23a99b2b08d62cbd3258ff.png\" width=\"1600\" height=\"167\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/016\/4d9\/c04\/0164d9c04f23a99b2b08d62cbd3258ff.png\"\/><\/figure>\n<p>2. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c default (\u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043f\u0430\u0440\u043e\u043b\u044c).<\/p>\n<pre><code class=\"bash\">clickhouse-client<\/code><\/pre>\n<p>3. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"sql\">SELECT 1<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ffa\/cfb\/4d0\/ffacfb4d0fcf8ffe01beec2caa860d62.png\" width=\"1600\" height=\"441\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ffa\/cfb\/4d0\/ffacfb4d0fcf8ffe01beec2caa860d62.png\"\/><\/figure>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>\u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .xml \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435 <code>\/etc\/clickhouse-server\/<\/code>. \u041f\u0440\u0438\u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0443 <code>config.d<\/code> \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>etc\/clickhouse-server\/config.d\/<\/code> \u0438 \u0432 \u043d\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u0442 \u0432 \u0441\u0438\u043b\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c01\/adb\/aba\/c01adbabaacc752fb0e333fb7913572e.png\" width=\"1600\" height=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c01\/adb\/aba\/c01adbabaacc752fb0e333fb7913572e.png\"\/><\/figure>\n<p>\u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\"># \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 sudo service clickhouse-server reload<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a89\/7dd\/f9d\/a897ddf9db7820bcd672fdb920707212.png\" width=\"1600\" height=\"484\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a89\/7dd\/f9d\/a897ddf9db7820bcd672fdb920707212.png\"\/><\/figure>\n<pre><code class=\"bash\"># \u041f\u043e\u043b\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 sudo service clickhouse-server restart<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d7e\/b55\/03e\/d7eb5503e57be424b3a91fd12a12ce0a.png\" width=\"1600\" height=\"113\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d7e\/b55\/03e\/d7eb5503e57be424b3a91fd12a12ce0a.png\"\/><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/en\/operations\/configuration-files\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043f\u0440\u0430\u0432\u043a\u0435<\/u><\/a>.<\/p>\n<\/blockquote>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0438\u0437-\u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432.<\/p>\n<p>1. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c SQL User Mode \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Default. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u2014 \u0432 \u043f\u0430\u043f\u043a\u0435 users.d \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f \u0444\u0430\u0439\u043b default-password.xml \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"yaml\">&lt;clickhouse>     &lt;users>         &lt;default>         &lt;password remove='1' \/>         &lt;password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5&lt;\/password_sha256_hex>                          &lt;access_management>1&lt;\/access_management>         &lt;named_collection_control>1&lt;\/named_collection_control>         &lt;show_named_collections>1&lt;\/show_named_collections>         &lt;show_named_collections_secrets>1&lt;\/show_named_collections_secrets>     &lt;\/default>     &lt;\/users> &lt;\/clickhouse><\/code><\/pre>\n<p>2. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c.<\/p>\n<pre><code class=\"bash\">sudo service clickhouse-server restart<\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>1.\u00a0 \u0412\u0445\u043e\u0434\u0438\u043c \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c default, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u044b, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u044b.<\/p>\n<pre><code class=\"sql\">CREATE USER clickhouse_admin IDENTIFIED BY 'qwerty';<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad5\/c28\/2d0\/ad5c282d0e2fc8a1f39251c8df35b358.png\" width=\"1600\" height=\"381\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad5\/c28\/2d0\/ad5c282d0e2fc8a1f39251c8df35b358.png\"\/><\/figure>\n<p>2. \u0412\u044b\u0434\u0430\u0435\u043c \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"sql\">GRANT ALL ON *.* TO clickhouse_admin WITH GRANT OPTION;<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a7\/298\/4e3\/6a72984e3ba2c4d5c4b25d6d8a0a920d.png\" width=\"1600\" height=\"267\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a7\/298\/4e3\/6a72984e3ba2c4d5c4b25d6d8a0a920d.png\"\/><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e SQL-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0440\u043e\u043b\u0438 \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/en\/operations\/access-rights#defining-sql-users-and-roles\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 ClickHouse<\/u><\/a>.<\/p>\n<\/blockquote>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>1. \u041f\u0435\u0440\u0435\u0437\u0430\u0439\u0434\u0435\u043c \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"bash\">clickhouse-client --user clickhouse_admin --password qwerty<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/05b\/ee6\/0b9\/05bee60b9832689dcc0d4872771d098a.png\" width=\"1600\" height=\"135\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/05b\/ee6\/0b9\/05bee60b9832689dcc0d4872771d098a.png\"\/><\/figure>\n<p>2. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043d\u0435\u0435.<\/p>\n<pre><code class=\"sql\">CREATE DATABASE test_database;<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<pre><code class=\"sql\">CREATE TABLE test_database.test_table (     id UInt64,     column1 String,     column2 String ) ENGINE MergeTree ORDER BY id;<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8b9\/1c6\/f95\/8b91c6f9529b3b22ea249cac0a89718b.png\" width=\"1600\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b9\/1c6\/f95\/8b91c6f9529b3b22ea249cac0a89718b.png\"\/><\/figure>\n<p>3. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<pre><code class=\"sql\">INSERT INTO test_database.test_table     (id, column1, column2) VALUES     (1, 'A', 'abc'),     (2, 'A', 'def'),     (3, 'B', 'abc'),     (4, 'B', 'def');<\/code><\/pre>\n<p>4. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"sql\">SELECT * FROM test_database.test_table<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ba\/374\/0dc\/8ba3740dcdc36b1eccea4dd43b9ee92b.png\" width=\"1600\" height=\"634\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ba\/374\/0dc\/8ba3740dcdc36b1eccea4dd43b9ee92b.png\"\/><\/figure>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h4>\n<p>1. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435.<\/p>\n<pre><code class=\"sql\">CREATE USER clickhouse_user IDENTIFIED BY 'password';  GRANT ALL ON test_database.* TO clickhouse_user WITH GRANT OPTION;<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/940\/41b\/404\/94041b404884fe3d6c58657cda80aa20.png\" width=\"1600\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/940\/41b\/404\/94041b404884fe3d6c58657cda80aa20.png\"\/><\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0432\u044b\u0434\u0430\u0447\u0443 \u043f\u0440\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/ru\/sql-reference\/statements\/grant\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 ClickHouse<\/u><\/a>.<\/p>\n<p>2. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f.<\/p>\n<pre><code class=\"bash\">clickhouse-client --user clickhouse_user --password password<\/code><\/pre>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435.<\/p>\n<pre><code class=\"sql\">SELECT *  FROM test_database.test_table<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4a4\/2bb\/178\/4a42bb178400f1a2cb364328d0530518.png\" width=\"1600\" height=\"430\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4a4\/2bb\/178\/4a42bb178400f1a2cb364328d0530518.png\"\/><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0430, \u0438\u0437-\u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445,<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 test_database.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 SQL User Mode \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f default<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>default<\/code>, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>default-password.xml<\/code>.<\/p>\n<pre><code class=\"xml\">&lt;clickhouse>     &lt;users>         &lt;default>             &lt;password remove='1' \/>             &lt;password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5&lt;\/password_sha256_hex>             &lt;profile>readonly&lt;\/profile>             &lt;access_management>0&lt;\/access_management>              &lt;!--             &lt;named_collection_control>1&lt;\/named_collection_control>             &lt;show_named_collections>1&lt;\/show_named_collections>             &lt;show_named_collections_secrets>1&lt;\/show_named_collections_secrets>             -->         &lt;\/default>     &lt;\/users> &lt;\/clickhouse><\/code><\/pre>\n<blockquote>\n<p>\u0421\u043f\u0440\u0430\u0432\u043a\u0430 <a href=\"https:\/\/clickhouse.com\/docs\/en\/operations\/settings\/settings-users\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c<\/u><\/a> \u0432 ClickHouse.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5c1\/c8b\/dcc\/5c1c8bdcc21dc84bc0c0155effaf2f06.png\" width=\"1600\" height=\"268\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5c1\/c8b\/dcc\/5c1c8bdcc21dc84bc0c0155effaf2f06.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f default. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0442\u0435\u0433.<\/p>\n<pre><code class=\"xml\">&lt;default remove=\"remove\"> &lt;\/default><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e44\/bcc\/ebc\/e44bccebcfd2cb2c1d3fdf08a43ca583.png\" width=\"1600\" height=\"280\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e44\/bcc\/ebc\/e44bccebcfd2cb2c1d3fdf08a43ca583.png\"\/><\/figure>\n<h3>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0441\u0435\u0442\u0438<\/h3>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e ClickHouse \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0442\u043b\u0435 \u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0441\u0435\u0442\u0438. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>1. \u0412 \u043f\u0430\u043f\u043a\u0435 etc\/clickhouse-server\/config.d\/ \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b default-config.xml \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code class=\"xml\">&lt;clickhouse>  \u00a0\u00a0\u00a0&lt;listen_host>::&lt;\/listen_host>  &lt;\/clickhouse><\/code><\/pre>\n<p>2. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<pre><code class=\"bash\">sudo service clickhouse-server restart<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c ClickHouse \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 8123. \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 https \u044f \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b.<\/p>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e:<\/p>\n<pre><code>http:\/\/213.189.220.34:8123\/<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cdc\/ca0\/f79\/cdcca0f798ea7d1486bd61386ce83405.png\" width=\"1600\" height=\"209\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cdc\/ca0\/f79\/cdcca0f798ea7d1486bd61386ce83405.png\"\/><\/figure>\n<h3>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Tabix<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/clickhouse.com\/docs\/ru\/interfaces\/third-party\/gui\" rel=\"noopener noreferrer nofollow\"><u>Tabix<\/u><\/a> (\u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f ClickHouse).<\/p>\n<p>1. \u0421\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 default-config.xml.<\/p>\n<pre><code class=\"xml\">&lt;clickhouse>     &lt;listen_host>::&lt;\/listen_host>     &lt;http_server_default_response>&lt;![CDATA[&lt;html ng-app=\"SMI2\">&lt;head>&lt;base href=\"http:\/\/ui.tabix.io\/\">&lt;\/head>&lt;body>&lt;div ui-view=\"\" class=\"content-ui\">&lt;\/div>&lt;script src=\"http:\/\/loader.tabix.io\/master.js\">&lt;\/script>&lt;\/body>&lt;\/html>]]&gt;&lt;\/http_server_default_response> &lt;\/clickhouse><\/code><\/pre>\n<p>2. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<pre><code class=\"bash\">sudo service clickhouse-server restart<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435\u00a0\u2014 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/324\/a2a\/255\/324a2a25571cfa47d79e5f71718cab04.png\" width=\"1600\" height=\"777\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/324\/a2a\/255\/324a2a25571cfa47d79e5f71718cab04.png\"\/><\/figure>\n<h3>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 Tabix<\/h3>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u2014 Tabix \u0440\u0443\u0433\u0430\u043b\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u0432\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <code>system.dictionaries<\/code>.<\/p>\n<pre><code class=\"sql\">Code: 497. DB::Exception: clickhouse_user: Not enough privileges. To execute this query, it's necessary to have the grant SELECT(name, `attribute.names`, `attribute.types`, key) ON system.dictionaries. (ACCESS_DENIED) (version 24.1.5.6 (official build))<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0434\u043e \u0437\u0430\u0439\u0442\u0438 \u043f\u043e\u0434 \u0430\u0434\u043c\u0438\u043d\u043e\u043c \u0438 \u0432\u044b\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<pre><code class=\"sql\">GRANT SELECT ON system.dictionaries TO clickhouse_user WITH GRANT OPTION;<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ea7\/ea3\/470\/ea7ea347016782594946a61e687240d0.png\" width=\"1600\" height=\"781\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea7\/ea3\/470\/ea7ea347016782594946a61e687240d0.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/43d\/19a\/ea9\/43d19aea994f4c659b906f78da07d2c0.png\" width=\"1600\" height=\"810\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/43d\/19a\/ea9\/43d19aea994f4c659b906f78da07d2c0.png\"\/><\/figure>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443<\/h2>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 clickhouse_connect.<\/p>\n<pre><code class=\"python\">import clickhouse_connect<\/code><\/pre>\n<p>\u0423\u043a\u0430\u0436\u0435\u043c \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0438 \u0443\u0437\u043d\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"python\">client = clickhouse_connect.get_client(     host='213.189.220.34',      port=8123,      username='clickhouse_user',      password='password' )  client.server_version<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d3d\/3aa\/f59\/d3d3aaf5962ba5cdd06d1ec6cd3c26c5.png\" width=\"1600\" height=\"299\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d3d\/3aa\/f59\/d3d3aaf5962ba5cdd06d1ec6cd3c26c5.png\"\/><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e clickhouse_connect \u2014\u00a0<a href=\"https:\/\/clickhouse.com\/docs\/en\/integrations\/python\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 ClickHouse<\/u><\/a>.<\/p>\n<\/blockquote>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ClickHouse \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u0442\u0435\u043a\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ul>\n<li>\n<p>\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u041c\u0435\u0442\u0440\u0438\u043a\u0438, \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 CRM (\u0434\u043b\u044f \u043d\u0430\u0441 \u0438 \u0434\u043b\u044f \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u0432),<\/p>\n<\/li>\n<li>\n<p>\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0440\u043e\u0441 (\u043f\u0440\u043e \u044d\u0442\u043e \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u043e\u044e \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/articles\/759720\/\" rel=\"noopener noreferrer nofollow\"><u>DIY-\u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433: \u043a\u0430\u043a \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0440\u043e\u0441 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e KeyCollector, Python \u0438 DataLens<\/u><\/a>),<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c SEO-\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 API \u043f\u0430\u043d\u0435\u043b\u0435\u0439 \u0432\u0435\u0431\u043c\u0430\u0441\u0442\u0435\u0440\u043e\u0432,<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0446\u0438\u0438 (\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0443\u0436\u043d\u0430 \u0431\u0430\u0437\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c, \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c. \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u0435\u0441\u0442\u044c \u0434\u0435\u0432\u043e\u043f\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u0441\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0435\u0442. \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c 5 \u0442\u044b\u0441\u044f\u0447 \u0432 \u043c\u0435\u0441\u044f\u0446 \u043d\u0430 \u0431\u0430\u0437\u0443 \u0432 \u042f\u043d\u0434\u0435\u043a\u0441 \u041e\u0431\u043b\u0430\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0438 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u043b\u044f \u0441\u0435\u0431\u044f.<\/p>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c ClickHouse \u2014 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0435\u0441\u0442\u044c \u043a\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u0438\u043c\u0435\u043d\u043d\u043e ClickHouse \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0441 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0430\u043c \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434, \u2014 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043d\u0438-\u043a\u0443\u0440\u0441\u044b \u042f\u043d\u0434\u0435\u043a\u0441\u0430:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/cloud.yandex.ru\/ru\/training\/datamart\" rel=\"noopener noreferrer nofollow\"><u>\u0412\u0438\u0442\u0440\u0438\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0435\u0431\u2011\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432 ClickHouse\u00ae<\/u><\/a>,<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/cloud.yandex.ru\/ru\/training\/clickhouse\" rel=\"noopener noreferrer nofollow\"><u>Managed Service for ClickHouse\u00ae<\/u><\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/801757\/\"> https:\/\/habr.com\/ru\/articles\/801757\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u2014\u00a0\u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430. \u0410 ClickHouse \u2014\u00a0\u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0421\u0423\u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c ClickHouse \u0432 Yandex Cloud \u0438\u043b\u0438 \u043d\u0430 VDS-\u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0441\u0435\u0442\u0438. \u042d\u0442\u0438\u043c \u0438 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<figure class=\"full-width\"><\/figure>\n<blockquote>\n<p><strong>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:<\/strong> \u042f \u0416\u0435\u043d\u044f \u041a\u0443\u0437\u043d\u0435\u0446\u043e\u0432, \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0434\u0436\u0438\u0442\u0430\u043b-\u0441\u0442\u0440\u0430\u0442\u0435\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u044e\u0431\u0438\u0442 \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445. \u041d\u043e \u044f \u043d\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0433\u0443 \u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u2014 \u0445\u043e\u0442\u044f \u0444\u0430\u043a\u0442\u044b \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<\/p>\n<\/blockquote>\n<h2>\u0417\u0430\u0447\u0435\u043c \u043c\u043d\u0435 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445?<\/h2>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0430 \u0438 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u044b \u043a \u043d\u0435\u0439 \u0438\u0437 Yandex DataLens.<\/p>\n<p>\u0412 Logs API \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0446\u0435\u043b\u0435\u0439 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>ym:s:goalsID<\/code> \u2014 \u043d\u043e\u043c\u0435\u0440\u0430 \u0446\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u044b\u0445 \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0438\u0437\u0438\u0442;<\/p>\n<\/li>\n<li>\n<p><code>ym:s:goalsSerialNumber<\/code> \u2014 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0438 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p><code>ym:s:goalsDateTime<\/code> \u2014 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043b\u0438 (\u0432 \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435 UTC+3).<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0432 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u0435 DataLens \u043a \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e:<\/p>\n<ul>\n<li>\n<p>\u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u043b\u044e\u0431\u043e\u0439 \u0446\u0435\u043b\u0438,<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0432 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0439 \u0446\u0435\u043b\u0438,<\/p>\n<\/li>\n<li>\n<p>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e\u0439 \u0446\u0435\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0447\u0430\u0440\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 (\u0442. \u0435. \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439 \u0446\u0435\u043b\u0438 \u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e\u0439 \u0446\u0435\u043b\u0438) \u2014 \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u043e\u0439 \u0440\u0430\u0437\u043e\u0439\u0434\u0443\u0442\u0441\u044f, \u043f\u0440\u0438\u0447\u0435\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0446\u0435\u043b\u044f\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/yandex.ru\/dev\/metrika\/doc\/api2\/logs\/fields\/visits.html\" rel=\"noopener noreferrer nofollow\"><u>\u0432 Logs Api<\/u><\/a> \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0441\u0442\u044c \u043b\u0430\u0439\u0444\u0445\u0430\u043a, \u043a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e, \u043d\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043e\u0434\u043d\u0443 \u043c\u0430\u043a\u0440\u043e\u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e. \u041e\u0431 \u044d\u0442\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 ClickHouse?<\/h2>\n<blockquote>\n<p><strong>ClickHouse \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414) \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u042f\u043d\u0434\u0435\u043a\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0435\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0432\u0435\u0431-\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432 \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0435.<\/strong><\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434:<\/p>\n<ul>\n<li>\n<p>\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0437\u0430\u0442\u043e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445,<\/p>\n<\/li>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u043c\u0435\u0442\u044c \u0432 \u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u2014 \u043f\u043b\u044e\u0441 \u043a \u0440\u0435\u0437\u044e\u043c\u0435,<\/p>\n<\/li>\n<li>\n<p>\u043e\u043d\u0430 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u0430\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 ClickHouse \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u0435\u043a\u0442 SQL, \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f: \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 URI.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 ClickHouse \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/clickhouse.com\/docs\/ru\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0418 \u0442\u0443\u0442 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u0432 Yandex Cloud. \u0417\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c, \u043f\u0440\u0438\u0447\u0435\u043c \u043e\u043a\u043e\u043b\u043e 5 \u0442\u044b\u0441\u044f\u0447 \u0440\u0443\u0431\u043b\u0435\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041d\u043e \u0437\u0430\u0442\u043e \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u043c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 (VDS).<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u043d\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0438\u0437\u0432\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c ClickHouse \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u044f \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e.<\/p>\n<h2>ClickHouse \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/h2>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f ClickHouse \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043a\u0435\u0439\u0441\u0435 <a href=\"https:\/\/cloud.yandex.ru\/ru\/docs\/datalens\/tutorials\/data-from-metrica-yc-visualization#ch-connection\" rel=\"noopener noreferrer nofollow\"><u>\u00ab\u0412\u0435\u0431-\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u043c \u0432\u043e\u0440\u043e\u043d\u043e\u043a \u0438 \u043a\u043e\u0433\u043e\u0440\u0442 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u042f\u043d\u0434\u0435\u043a\u0441 \u041c\u0435\u0442\u0440\u0438\u043a\u0438\u00bb<\/u><\/a>, \u043d\u043e \u0442\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u2014 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u0433\u0443\u0441\u044c \u043f\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>1. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Managed Service for ClickHouse \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 ClickHouse\u00bb.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0445\u0432\u0430\u0442\u0438\u0442 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>3. \u0412\u0430\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u2014 \u0432 \u0431\u043b\u043e\u043a\u0435 \u00ab\u0425\u043e\u0441\u0442\u044b\u00bb \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u043f\u0446\u0438\u044e \u00ab\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u00bb.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>4. \u0412 \u0431\u043b\u043e\u043a\u0435 \u00ab\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0421\u0423\u0411\u0414\u00bb \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 SQL, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>5. \u0412 \u0431\u043b\u043e\u043a\u0435 \u00ab\u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u0438: \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 DataLens\u00bb, \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u00bb, \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 AppMetrica\u00bb, \u00ab\u0414\u043e\u0441\u0442\u0443\u043f \u0438\u0437 Serverless\u00bb.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 ClickHouse \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>ClickHouse \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430: \u043f\u043e\u043a\u0443\u043f\u043a\u0443 VDS \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 ClickHouse.<\/p>\n<h3>\u041f\u043e\u043a\u0443\u043f\u043a\u0430 VDS<\/h3>\n<p>1. \u0414\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u043e\u043c\u00a0\u2014 \u044f \u0432\u044b\u0431\u0440\u0430\u043b NetAngels.\u00a0<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/clickhouse.com\/docs\/ru\/operations\/requirements\" rel=\"noopener noreferrer nofollow\"><u>\u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> \u2014 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 4 \u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 2 \u0413\u0411 \u2014 \u043c\u0430\u0448\u0438\u043d\u0430 \u0437\u0430\u0432\u0438\u0441\u0430\u043b\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u0436\u0435 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0445 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430, \u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443 \u043f\u0440\u0438\u0434\u0443\u0442 \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u044b \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e SSH. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0431\u043e\u0440\u043a\u0443 \u043e\u0442 NetAngels \u043d\u0430 \u0431\u0430\u0437\u0435 Debian 11.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>3. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u042f \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0441\u0451 \u0432 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ClickHouse<\/h3>\n<p>1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>apt-transport-https \u2014 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043f\u043e https;<\/p>\n<\/li>\n<li>\n<p>ca-certificates \u2014 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>dirmngr \u2014 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install -y apt-transport-https ca-certificates dirmngr<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438.<\/p>\n<pre><code class=\"bash\">GNUPGHOME=$(mktemp -d)  sudo GNUPGHOME=\"$GNUPGHOME\" gpg --no-default-keyring --keyring \/usr\/share\/keyrings\/clickhouse-keyring.gpg --keyserver hkp:\/\/keyserver.ubuntu.com:80 --recv-keys 8919F6BD2B48D754  sudo rm -rf \"$GNUPGHOME\"  sudo chmod +r \/usr\/share\/keyrings\/clickhouse-keyring.gpg<\/code><\/pre>\n<p>3. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.<\/p>\n<pre><code class=\"bash\">echo \"deb [signed-by=\/usr\/share\/keyrings\/clickhouse-keyring.gpg] https:\/\/packages.clickhouse.com\/deb stable main\" | sudo tee \\     \/etc\/apt\/sources.list.d\/clickhouse.list<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>4. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043a\u044d\u0448.<\/p>\n<pre><code class=\"bash\">sudo apt-get update<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>5. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0422\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b.<\/p>\n<ul>\n<li>\n<p>\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 -y \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c YES \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445). \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f default \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0430\u0440\u043e\u043b\u044c, \u043d\u043e, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u044b \u0441\u043a\u043e\u0440\u043e \u0435\u0433\u043e \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install -y clickhouse-server clickhouse-client<\/code><\/pre>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f default.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install clickhouse-server clickhouse-client<\/code><\/pre>\n<ul>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435. \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u044f \u0441\u0442\u0430\u0432\u0438\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0435\u0437 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 (\u0447\u0442\u043e-\u0442\u043e \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 19.1.*)<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo apt-get install clickhouse-server=24.1.5.6 clickhouse-client=24.1.5.6 clickhouse-common-static=24.1.5.6<\/code><\/pre>\n<blockquote>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/ClickHouse\/ClickHouse\/releases\" rel=\"noopener noreferrer nofollow\"><u>\u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u0435, ClickHouse \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d!<\/p>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/en\/install#install-from-deb-packages\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a> ClickHouse.<\/p>\n<\/blockquote>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0422\u0443\u0442 \u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u2014 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c default.<\/p>\n<p>1. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<pre><code class=\"bash\">sudo clickhouse start<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c default (\u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043f\u0430\u0440\u043e\u043b\u044c).<\/p>\n<pre><code class=\"bash\">clickhouse-client<\/code><\/pre>\n<p>3. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"sql\">SELECT 1<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>\u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .xml \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435 <code>\/etc\/clickhouse-server\/<\/code>. \u041f\u0440\u0438\u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0443 <code>config.d<\/code> \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>etc\/clickhouse-server\/config.d\/<\/code> \u0438 \u0432 \u043d\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u0442 \u0432 \u0441\u0438\u043b\u0443.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\"># \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 sudo service clickhouse-server reload<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<pre><code class=\"bash\"># \u041f\u043e\u043b\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 sudo service clickhouse-server restart<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/en\/operations\/configuration-files\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043f\u0440\u0430\u0432\u043a\u0435<\/u><\/a>.<\/p>\n<\/blockquote>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0438\u0437-\u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432.<\/p>\n<p>1. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c SQL User Mode \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Default. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u2014 \u0432 \u043f\u0430\u043f\u043a\u0435 users.d \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f \u0444\u0430\u0439\u043b default-password.xml \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"yaml\">&lt;clickhouse>     &lt;users>         &lt;default>         &lt;password remove='1' \/>         &lt;password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5&lt;\/password_sha256_hex>                          &lt;access_management>1&lt;\/access_management>         &lt;named_collection_control>1&lt;\/named_collection_control>         &lt;show_named_collections>1&lt;\/show_named_collections>         &lt;show_named_collections_secrets>1&lt;\/show_named_collections_secrets>     &lt;\/default>     &lt;\/users> &lt;\/clickhouse><\/code><\/pre>\n<p>2. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c.<\/p>\n<pre><code class=\"bash\">sudo service clickhouse-server restart<\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>1.\u00a0 \u0412\u0445\u043e\u0434\u0438\u043c \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c default, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u044b, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u044b.<\/p>\n<pre><code class=\"sql\">CREATE USER clickhouse_admin IDENTIFIED BY 'qwerty';<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u0412\u044b\u0434\u0430\u0435\u043c \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"sql\">GRANT ALL ON *.* TO clickhouse_admin WITH GRANT OPTION;<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e SQL-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0440\u043e\u043b\u0438 \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/en\/operations\/access-rights#defining-sql-users-and-roles\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 ClickHouse<\/u><\/a>.<\/p>\n<\/blockquote>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>1. \u041f\u0435\u0440\u0435\u0437\u0430\u0439\u0434\u0435\u043c \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"bash\">clickhouse-client --user clickhouse_admin --password qwerty<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>2. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043d\u0435\u0435.<\/p>\n<pre><code class=\"sql\">CREATE DATABASE test_database;<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<pre><code class=\"sql\">CREATE TABLE test_database.test_table (     id UInt64,     column1 String,     column2 String ) ENGINE MergeTree ORDER BY id;<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>3. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<pre><code class=\"sql\">INSERT INTO test_database.test_table     (id, column1, column2) VALUES     (1, 'A', 'abc'),     (2, 'A', 'def'),     (3, 'B', 'abc'),     (4, 'B', 'def');<\/code><\/pre>\n<p>4. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"sql\">SELECT * FROM test_database.test_table<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h4>\n<p>1. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435.<\/p>\n<pre><code class=\"sql\">CREATE USER clickhouse_user IDENTIFIED BY 'password';  GRANT ALL ON test_database.* TO clickhouse_user WITH GRANT OPTION;<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0432\u044b\u0434\u0430\u0447\u0443 \u043f\u0440\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u2014 <a href=\"https:\/\/clickhouse.com\/docs\/ru\/sql-reference\/statements\/grant\" rel=\"noopener noreferrer nofollow\"><u>\u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 ClickHouse<\/u><\/a>.<\/p>\n<p>2. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f.<\/p>\n<pre><code class=\"bash\">clickhouse-client --user clickhouse_user --password password<\/code><\/pre>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435.<\/p>\n<pre><code class=\"sql\">SELECT *  FROM test_database.test_table<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0430, \u0438\u0437-\u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445,<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 test_database.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041e\u0442\u043a\u043b\u044e<\/h><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-371379","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371379"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371379\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}