{"id":333982,"date":"2022-06-02T15:01:02","date_gmt":"2022-06-02T15:01:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=333982"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=333982","title":{"rendered":"<span>BI \u0441 Redshift \u043e\u0442 ETL \u0434\u043e \u0431\u043e\u0440\u0434\u043e\u0432<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ac7\/e53\/801\/ac7e53801aebd2323d0b5bd504c8cd07.webp\" width=\"1024\" height=\"400\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440, \u044f Node.js \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 business intelligence (BI) \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.\u00a0<\/p>\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0438\u0437\u043d\u0435\u0441 \u0432\u044b\u0440\u043e\u0441 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043f\u0443\u0441\u0442\u044c \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0432 excel \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0443\u0436\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u0434\u0430 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u0434\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0440\u043e\u0441\u043b\u043e. \u0422\u043e\u0433\u0434\u0430 \u0437\u0430\u0448\u043b\u0430 \u0440\u0435\u0447\u044c \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u043c\u044b\u0441\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c BI \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.<\/p>\n<p>BI &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0431\u0438\u0437\u043d\u0435\u0441\u0435<\/h3>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u044b (orders), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u044f\u0445. \u0423 \u044d\u0442\u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u044d\u0442\u0430\u043f\u044b (statuses) \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0431\u0438\u0437\u043d\u0435\u0441\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432, \u0442.\u0435. \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u043a \u043e\u0431\u0449\u0435\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443.<\/p>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Cassandra. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e BI \u043e\u043d\u0430 \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u043e\u043d\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u044f\u0437\u044b\u043a CQL (Cassandra Query Language), \u043d\u043e \u043e\u043d \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0440\u0435\u0437\u0430\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e SQL. \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f ID \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f JSON \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0421 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u0434\u0430\u043b\u0435\u043a\u043e \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u043d\u0435 \u0443\u0435\u0434\u0435\u0448\u044c.\u00a0<\/p>\n<p>\u0422.\u043a. \u0443 \u043d\u0430\u0441 \u0432\u0441\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 AWS, \u043d\u0430\u0448 \u0432\u0437\u043e\u0440 \u0441\u0440\u0430\u0437\u0443 \u043f\u0430\u043b \u043d\u0430 Redshift. \u0418\u0437\u0443\u0447\u0438\u0432 \u0435\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0445\u0432\u0430\u0442\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c. \u041c\u044b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0437\u0434\u0435\u0441\u044c \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0439 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c Redshift \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a ClickHouse, BigQuery, Azure.<\/p>\n<h3>ETL \u0434\u043b\u044f Redshift<\/h3>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/r_INSERT_30.html\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u044e\u0442<\/a> \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0438\u0448\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414 \u0441 Redshift \u043d\u0435 \u043f\u0440\u043e\u043a\u0430\u0442\u0438\u0442. \u041b\u0443\u0447\u0448\u0438\u0439 <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/c_best-practices-use-copy.html\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u043e\u0441\u043e\u0431<\/a> \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u044d\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 S3 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 csv.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/c_best-practices-use-multiple-files.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e<\/a>, \u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u0424\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u0432\u0430\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e node Redshift, \u0447\u0442\u043e\u0431\u044b \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0442 1 &#8212; 125 \u041c\u0411.<\/p>\n<p>\u041f\u043e\u0434\u0443\u043c\u0430\u0432 \u043d\u0430\u0434 \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 AWS S3 \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0443\u0436\u0435 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Redshift.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u0434\u043e\u0440\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u0430\u043a \u0438 \u043f\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0430 \u0443\u0436\u0435 \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f (timestamp) !== \u0434\u0430\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0411\u0414, \u0442.\u043a. \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0447\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0443 \u043d\u0430\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a57\/d21\/daf\/a57d21dafbc3782cf385e5605720fc1c.png\" width=\"352\" height=\"152\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a57\/d21\/daf\/a57d21dafbc3782cf385e5605720fc1c.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (service-redshift)<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043b \u0432\u0441\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u0432 \u0431\u0440\u043e\u043a\u0435\u0440 \u0438 \u0440\u0435\u0448\u0430\u043b, \u043d\u0430\u0434\u043e \u043b\u0438 \u0435\u043c\u0443 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u0437\u044f\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f, \u0438\u043b\u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<p>\u0412 \u043d\u0430\u0448 \u0431\u0440\u043e\u043a\u0435\u0440 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (events) \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<pre><code class=\"json\">some_event: {   method: POST,   current_state: { object_type: order_status, \u2026 },   previous_state: { - }  },  another_some_event: {       method: PATCH,       current_state: { object_type: order, status: received, \u2026 },           previous_state: { object_type: order, status: created, \u2026 }  },<\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a \u0431\u0440\u043e\u043a\u0435\u0440\u0443 \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 PATCH \u0443 event \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 requisition.<\/p>\n<pre><code class=\"javascript\">\/\/ index.js const handlers = { \"PATCH order\": require(\".\/order\").onPatch, } const onHandleEvent = async (event) => { await handlers[`${event.method} ${event.object_type}`](); }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 requisition<\/p>\n<pre><code class=\"javascript\">\/\/ order.js const onPatch = async event => { ... }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443 \u043d\u0430\u0441 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0435\u0442 event \u0441 \u0442\u0438\u043f\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 requisition \u0438 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 <strong>\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435<\/strong> \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0423 \u043d\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e \u043a\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<pre><code class=\"javascript\">\/\/ collector_order.js const onHandleOrder = event => { \/\/\u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u043f\u043e\u043b\u0435\u0439, \u043d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430    \/\/\u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e   return {     id: event.id,     status: event.status,     created_at: event.created_at,   }; };  \/\/ order.js const onPatch = async event => {   const order = onHandleOrder(event);      await sendToTempStore(order); };<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/h3>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0442\u0435\u043f\u0435\u0440\u044c, \u0433\u0434\u0435 \u043d\u0430\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434 \u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0432 S3. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 S3 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0444\u0430\u0439\u043b\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438 \u0442\u0443\u0434\u0430 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438 \u0438\u0445 \u0438 \u0433\u0434\u0435-\u0442\u043e \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<\/p>\n<\/li>\n<\/ol>\n<p>\u0422.\u043a. \u043c\u044b\u0441\u043b\u044c \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u043a\u0438\u043d\u0443\u043b\u0430, \u043d\u0430\u0448 \u0432\u0437\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e AWS EFS. \u041d\u043e \u043f\u0440\u043e\u0448\u0435\u0440\u0441\u0442\u0438\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e, \u043a\u0430\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043c\u044b \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 &#8212; \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: Redis.<\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0431\u0440\u043e\u043a\u0435\u0440, service_redshift, Redis \u0438 \u0441\u0430\u043c Redshift \u0432 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dd8\/994\/305\/dd8994305034e69b641bfbdc8cb7a4f6.png\" width=\"642\" height=\"202\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd8\/994\/305\/dd8994305034e69b641bfbdc8cb7a4f6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0432 Redshift \u0440\u0430\u0437 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (Migration \u0448\u0430\u0433 \u0432 \u0441\u0445\u0435\u043c\u0435). \u0417\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0435\u0436\u0430\u0442\u044c \u0432 Redis, \u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0431\u043e\u044f \u043a\u0443\u0440\u0430\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 S3.\u00a0<\/p>\n<p>\u0412 Redis \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u043d\u0435 \u0437\u043d\u0430\u044f \u0438\u0445 ID. \u041b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b &#8212; \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Set, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 Set \u0438 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0421\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 csv.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u0447\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Redis \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043c\u0430\u0441\u043a\u043e\u0439 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430: table_name-YYYY-MM-DD-HH. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0437\u043d\u0430\u044f \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0410\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 Redis<\/p>\n<pre><code class=\"javascript\">\/\/ temp_store.js const moment = require(\"moment\"); const redis = require(\".\/connected_redis\");  const generateKeyName = (data, tableName) => { const date = moment().format('YYYY-MM-DD-HH');      return `${tableName}-${date}`; }  const sendToTempStore = async (order, tableName) => {   const row = Object.values(order)   .push(new Date().toISOString()) \/\/ \u042d\u0442\u043e \u043d\u0430\u0448\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0430 timestamp, \u043e\u043d\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435   .join(\",\");   const key = generateKeyName(row, tableName);      \/\/ \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0432\u0438\u044f Set, \u0440\u0435\u0434\u0438\u0441 \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0435\u0433\u043e   \/\/ \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0442\u0443\u0442 \u043d\u0435 \u043d\u0430\u0434\u043e   await redis.rPush(key, row); }  \/\/ order.js const onPatch = async event => {   const order = onHandleOrder(event);      await sendToTempStore(order, \"orders\"); };<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c Set \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c90\/764\/1c4\/c907641c47fe1d5777f7ff4de9433d53.png\" width=\"661\" height=\"91\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c90\/764\/1c4\/c907641c47fe1d5777f7ff4de9433d53.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432 Redshift<\/h3>\n<p>\u0421\u043e\u0431\u0440\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Redis, \u043c\u044b \u0440\u0430\u0437 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438\u0445 \u043e\u0442\u0442\u0443\u0434\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u0438\u0447\u0435\u043c, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/211\/37c\/89a\/21137c89a32eda9843463f4950c32a77.png\" width=\"710\" height=\"290\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/211\/37c\/89a\/21137c89a32eda9843463f4950c32a77.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0411\u0435\u0440\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 Redis (\u043c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Redis \u043f\u043e\u0434 \u044d\u0442\u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u043c). \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0442\u0443\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. \u041e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0441\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0447\u0430\u0441\u0443 (\u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0438\u0436\u0435), \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Map.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e1\/704\/5f6\/0e17045f686a03d73d8de5545ee6f330.png\" width=\"667\" height=\"182\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0e1\/704\/5f6\/0e17045f686a03d73d8de5545ee6f330.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0432\u0441\u0435 \u0435\u0435 \u0441\u0435\u0442\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u0435\u0442\u0435 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u043e 100\u043a, \u0442.\u043a. \u043e\u0434\u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 102 bytes, \u0437\u043d\u0430\u0447\u0438\u0442 100\u043a ~ 10 MB. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c.\u00a0 \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c 100\u043a, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0447\u0430\u043d\u043a\u0438, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0441\u0435\u0442\u0430\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0441\u0435\u0442\u043e\u0432, \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u043e \u0432\u0441\u0435 \u0432 S3, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u044d\u0442\u043e \u0432 Redshift, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 COPY.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72b\/a41\/08e\/72ba4108e06ce35cea864504d6f4bad3.png\" width=\"772\" height=\"62\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72b\/a41\/08e\/72ba4108e06ce35cea864504d6f4bad3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e, \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 ECS, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0447\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0432 2-\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041a \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0443\u0436\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0438, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412\u044b\u0431\u043e\u0440 \u0441\u0442\u043e\u044f\u043b \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f &#8212; Redash, Metabase. <\/p>\n<p>Tableau \u043e\u0442\u043f\u0430\u043b\u043e, \u0442.\u043a. \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430. <\/p>\n<p>Grafana \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0430\u0441\u044c, \u043d\u043e \u0432\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u044f\u0434\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u044f\u0436\u0435\u043b\u044b\u043c.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 (Redash vs Metabase). <\/p>\n<p>Redash \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u043d \u043d\u0435 \u0436\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0436\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Job, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0436\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441. \u041a\u043e\u0433\u0434\u0430 Job \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c, \u043e\u043d \u0431\u0435\u0440\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb3\/3e8\/f5b\/bb33e8f5b4447878749087e982c0206b.png\" alt=\"\" title=\"\" width=\"1742\" height=\"362\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb3\/3e8\/f5b\/bb33e8f5b4447878749087e982c0206b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>Metabase \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0438 \u0436\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0438\u043b\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0434\u0443\u0442 \u0434\u043e\u043b\u044c\u0448\u0435 60 \u0441\u0435\u043a\u0443\u043d\u0434, \u0432\u044b \u0438\u0441\u043f\u044b\u0442\u0430\u0435\u0442\u0435 \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/metabase\/metabase\/issues\/12423\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u043a\u0443\u044e<\/a> \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>Redash \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a Metabase \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0434\u043e\u043b\u0433\u043e\u0439 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438 \u043c\u044b \u0432\u0441\u0435 \u0436\u0435 \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Metabase, \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430, \u0441 \u043d\u0430\u0448\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e Redash.<\/p>\n<p>\u0421 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445. <\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/materialized-view-overview.html\" rel=\"noopener noreferrer nofollow\">materialized view<\/a>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 join, \u0442.\u043a. \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0432\u044f\u0437\u0435\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439. \u041e\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432\u043e\u0435\u0434\u0438\u043d\u043e. \u042d\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0430 \u0441\u043e\u0442\u043a\u0430\u043d\u0430. \u0415\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, materialized view \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0430\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446. \u0421\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">create view orders_mv             (order_id, status, created_at) as CREATE MATERIALIZED VIEW orders_mv AUTO REFRESH YES AS ( with order_v as (     SELECT o.order_id,            o.status,            o.created_at,     FROM (SELECT o.order_id,                  o.status,                  o.created_at,                  \/\/ \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e, \u043e\u0442\u0431\u0438\u0440\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u0432 \u0411\u0414                  pg_catalog.row_number() OVER (PARTITION BY o.order_id ORDER BY o.\"timestamp\" DESC) AS row_num           FROM orders o          ) o     WHERE o.row_num = 1<\/code><\/pre>\n<h3>\u041f\u043e\u0434\u044b\u0442\u043e\u0436\u0438\u043c<\/h3>\n<p>\u0423 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 ETL. <\/p>\n<p>\u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u0438\u043d\u0443\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 &#8212; \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043a\u043e\u043b\u043e\u043d\u043e\u043a) \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0445 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432 Redshift. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043e\u0440\u0434\u0435\u0440\u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c 2 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f some_column_one \u0438 some_column_two, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0435 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3c3\/be8\/8c3\/3c3be88c3f3e0041c3582c334115fcc4.png\" width=\"437\" height=\"91\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3c3\/be8\/8c3\/3c3be88c3f3e0041c3582c334115fcc4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u043e \u043f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (&lt;10\u043a\u043a \u0432 \u0447\u0430\u0441) \u043d\u0430\u0441 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0446\u0438\u0444\u0440, \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0435\u0437\u0434 \u0432 AWS Kenesis. \u0414\u0443\u043c\u0430\u044e \u043c\u044b \u0435\u0449\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u044d\u0442\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0441 \u0432\u0430\u043c\u0438.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/669240\/\"> https:\/\/habr.com\/ru\/post\/669240\/<\/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<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440, \u044f Node.js \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 business intelligence (BI) \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.\u00a0<\/p>\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0438\u0437\u043d\u0435\u0441 \u0432\u044b\u0440\u043e\u0441 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043f\u0443\u0441\u0442\u044c \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0432 excel \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0443\u0436\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u0434\u0430 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u044e\u0434\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0440\u043e\u0441\u043b\u043e. \u0422\u043e\u0433\u0434\u0430 \u0437\u0430\u0448\u043b\u0430 \u0440\u0435\u0447\u044c \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u043c\u044b\u0441\u043b\u0438, \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c BI \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.<\/p>\n<p>BI &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432, \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0431\u0438\u0437\u043d\u0435\u0441\u0435<\/h3>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u044b (orders), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u044f\u0445. \u0423 \u044d\u0442\u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u044d\u0442\u0430\u043f\u044b (statuses) \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0431\u0438\u0437\u043d\u0435\u0441\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432, \u0442.\u0435. \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u043a \u043e\u0431\u0449\u0435\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443.<\/p>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0435 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Cassandra. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e BI \u043e\u043d\u0430 \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u043e\u043d\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u044f\u0437\u044b\u043a CQL (Cassandra Query Language), \u043d\u043e \u043e\u043d \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0440\u0435\u0437\u0430\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e SQL. \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f ID \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f JSON \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0421 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u0434\u0430\u043b\u0435\u043a\u043e \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u043d\u0435 \u0443\u0435\u0434\u0435\u0448\u044c.\u00a0<\/p>\n<p>\u0422.\u043a. \u0443 \u043d\u0430\u0441 \u0432\u0441\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 AWS, \u043d\u0430\u0448 \u0432\u0437\u043e\u0440 \u0441\u0440\u0430\u0437\u0443 \u043f\u0430\u043b \u043d\u0430 Redshift. \u0418\u0437\u0443\u0447\u0438\u0432 \u0435\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0445\u0432\u0430\u0442\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c. \u041c\u044b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u044c \u0437\u0434\u0435\u0441\u044c \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0439 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c Redshift \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a ClickHouse, BigQuery, Azure.<\/p>\n<h3>ETL \u0434\u043b\u044f Redshift<\/h3>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/r_INSERT_30.html\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u044e\u0442<\/a> \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0438\u0448\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414 \u0441 Redshift \u043d\u0435 \u043f\u0440\u043e\u043a\u0430\u0442\u0438\u0442. \u041b\u0443\u0447\u0448\u0438\u0439 <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/c_best-practices-use-copy.html\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u043e\u0441\u043e\u0431<\/a> \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u044d\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 S3 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 csv.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/c_best-practices-use-multiple-files.html\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e<\/a>, \u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u0424\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u0432\u0430\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e node Redshift, \u0447\u0442\u043e\u0431\u044b \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0442 1 &#8212; 125 \u041c\u0411.<\/p>\n<p>\u041f\u043e\u0434\u0443\u043c\u0430\u0432 \u043d\u0430\u0434 \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 AWS S3 \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0443\u0436\u0435 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Redshift.<\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u0434\u043e\u0440\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u0430\u043a \u0438 \u043f\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0430 \u0443\u0436\u0435 \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f (timestamp) !== \u0434\u0430\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0411\u0414, \u0442.\u043a. \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0447\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0443 \u043d\u0430\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h3>\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (service-redshift)<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043b \u0432\u0441\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u0432 \u0431\u0440\u043e\u043a\u0435\u0440 \u0438 \u0440\u0435\u0448\u0430\u043b, \u043d\u0430\u0434\u043e \u043b\u0438 \u0435\u043c\u0443 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u0437\u044f\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f, \u0438\u043b\u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<p>\u0412 \u043d\u0430\u0448 \u0431\u0440\u043e\u043a\u0435\u0440 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (events) \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<pre><code class=\"json\">some_event: {   method: POST,   current_state: { object_type: order_status, \u2026 },   previous_state: { - }  },  another_some_event: {       method: PATCH,       current_state: { object_type: order, status: received, \u2026 },           previous_state: { object_type: order, status: created, \u2026 }  },<\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043a \u0431\u0440\u043e\u043a\u0435\u0440\u0443 \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 PATCH \u0443 event \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 requisition.<\/p>\n<pre><code class=\"javascript\">\/\/ index.js const handlers = { \"PATCH order\": require(\".\/order\").onPatch, } const onHandleEvent = async (event) => { await handlers[`${event.method} ${event.object_type}`](); }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 requisition<\/p>\n<pre><code class=\"javascript\">\/\/ order.js const onPatch = async event => { ... }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443 \u043d\u0430\u0441 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0435\u0442 event \u0441 \u0442\u0438\u043f\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 requisition \u0438 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 <strong>\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435<\/strong> \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0423 \u043d\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e \u043a\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<pre><code class=\"javascript\">\/\/ collector_order.js const onHandleOrder = event => { \/\/\u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u043f\u043e\u043b\u0435\u0439, \u043d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430    \/\/\u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e   return {     id: event.id,     status: event.status,     created_at: event.created_at,   }; };  \/\/ order.js const onPatch = async event => {   const order = onHandleOrder(event);      await sendToTempStore(order); };<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/h3>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0442\u0435\u043f\u0435\u0440\u044c, \u0433\u0434\u0435 \u043d\u0430\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434 \u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0432 S3. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 S3 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0444\u0430\u0439\u043b\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b\u0438 \u0442\u0443\u0434\u0430 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438 \u0438\u0445 \u0438 \u0433\u0434\u0435-\u0442\u043e \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e<\/p>\n<\/li>\n<\/ol>\n<p>\u0422.\u043a. \u043c\u044b\u0441\u043b\u044c \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u043a\u0438\u043d\u0443\u043b\u0430, \u043d\u0430\u0448 \u0432\u0437\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e AWS EFS. \u041d\u043e \u043f\u0440\u043e\u0448\u0435\u0440\u0441\u0442\u0438\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e, \u043a\u0430\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043c\u044b \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 &#8212; \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: Redis.<\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0431\u0440\u043e\u043a\u0435\u0440, service_redshift, Redis \u0438 \u0441\u0430\u043c Redshift \u0432 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0432 Redshift \u0440\u0430\u0437 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (Migration \u0448\u0430\u0433 \u0432 \u0441\u0445\u0435\u043c\u0435). \u0417\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0435\u0436\u0430\u0442\u044c \u0432 Redis, \u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0431\u043e\u044f \u043a\u0443\u0440\u0430\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 S3.\u00a0<\/p>\n<p>\u0412 Redis \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u043d\u0435 \u0437\u043d\u0430\u044f \u0438\u0445 ID. \u041b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u044b\u043b &#8212; \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Set, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 Set \u0438 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0421\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0443 csv.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u0447\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Redis \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043c\u0430\u0441\u043a\u043e\u0439 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430: table_name-YYYY-MM-DD-HH. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0437\u043d\u0430\u044f \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0410\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 Redis<\/p>\n<pre><code class=\"javascript\">\/\/ temp_store.js const moment = require(\"moment\"); const redis = require(\".\/connected_redis\");  const generateKeyName = (data, tableName) => { const date = moment().format('YYYY-MM-DD-HH');      return `${tableName}-${date}`; }  const sendToTempStore = async (order, tableName) => {   const row = Object.values(order)   .push(new Date().toISOString()) \/\/ \u042d\u0442\u043e \u043d\u0430\u0448\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0430 timestamp, \u043e\u043d\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435   .join(\",\");   const key = generateKeyName(row, tableName);      \/\/ \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0432\u0438\u044f Set, \u0440\u0435\u0434\u0438\u0441 \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0435\u0433\u043e   \/\/ \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0442\u0443\u0442 \u043d\u0435 \u043d\u0430\u0434\u043e   await redis.rPush(key, row); }  \/\/ order.js const onPatch = async event => {   const order = onHandleOrder(event);      await sendToTempStore(order, \"orders\"); };<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c Set \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432 Redshift<\/h3>\n<p>\u0421\u043e\u0431\u0440\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Redis, \u043c\u044b \u0440\u0430\u0437 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438\u0445 \u043e\u0442\u0442\u0443\u0434\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u0438\u0447\u0435\u043c, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0411\u0435\u0440\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 Redis (\u043c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Redis \u043f\u043e\u0434 \u044d\u0442\u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u043c). \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0442\u0443\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. \u041e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0441\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0447\u0430\u0441\u0443 (\u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0447\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0438\u0436\u0435), \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Map.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0435\u0440\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0432\u0441\u0435 \u0435\u0435 \u0441\u0435\u0442\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u0435\u0442\u0435 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u043e 100\u043a, \u0442.\u043a. \u043e\u0434\u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 102 bytes, \u0437\u043d\u0430\u0447\u0438\u0442 100\u043a ~ 10 MB. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c.\u00a0 \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c 100\u043a, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0447\u0430\u043d\u043a\u0438, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0441\u0435\u0442\u0430\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0441\u0435\u0442\u043e\u0432, \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u043e \u0432\u0441\u0435 \u0432 S3, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u044d\u0442\u043e \u0432 Redshift, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 COPY.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e, \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 ECS, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e, \u0447\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0432 2-\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041a \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0443\u0436\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0438, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0412\u044b\u0431\u043e\u0440 \u0441\u0442\u043e\u044f\u043b \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f &#8212; Redash, Metabase. <\/p>\n<p>Tableau \u043e\u0442\u043f\u0430\u043b\u043e, \u0442.\u043a. \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430. <\/p>\n<p>Grafana \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0430\u0441\u044c, \u043d\u043e \u0432\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u044f\u0434\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u044f\u0436\u0435\u043b\u044b\u043c.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 (Redash vs Metabase). <\/p>\n<p>Redash \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u043d \u043d\u0435 \u0436\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0436\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 Job, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0436\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441. \u041a\u043e\u0433\u0434\u0430 Job \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c, \u043e\u043d \u0431\u0435\u0440\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>Metabase \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0438 \u0436\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0438\u043b\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438\u0434\u0443\u0442 \u0434\u043e\u043b\u044c\u0448\u0435 60 \u0441\u0435\u043a\u0443\u043d\u0434, \u0432\u044b \u0438\u0441\u043f\u044b\u0442\u0430\u0435\u0442\u0435 \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/metabase\/metabase\/issues\/12423\" rel=\"noopener noreferrer nofollow\">\u0442\u0430\u043a\u0443\u044e<\/a> \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>Redash \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a Metabase \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0434\u043e\u043b\u0433\u043e\u0439 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438 \u043c\u044b \u0432\u0441\u0435 \u0436\u0435 \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Metabase, \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430, \u0441 \u043d\u0430\u0448\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e Redash.<\/p>\n<p>\u0421 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445. <\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/materialized-view-overview.html\" rel=\"noopener noreferrer nofollow\">materialized view<\/a>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u0445<\/p>\n<\/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-333982","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333982","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=333982"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333982\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=333982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=333982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}