{"id":323397,"date":"2021-05-19T15:00:27","date_gmt":"2021-05-19T15:00:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=323397"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=323397","title":{"rendered":"\u041a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0414\u0430\u043d\u043d\u044b\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce5\/9c0\/fc7\/ce59c0fc7fb3abf6661539d0ccf296c7.png\" width=\"780\" height=\"439\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u0440\u0442\u0435\u043c\u0438\u0439 \u2013 Analytics Engineer \u0438\u0437 Wheely.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b. \u0412\u043e\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438\u043c\u0435\u044e\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043e\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f, \u0441\u0442\u0440\u043e\u044f\u0442 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430, \u0433\u043e\u0442\u043e\u0432\u044f\u0442 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c.<\/p>\n<p>\u041f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u0435\u0439\u0441\u0430 Wheely:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u043b\u043a\u043e\u043c \u043f\u043e\u0434 \u043a\u0430\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u0447\u0435\u0442\u0430 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439: Open Exchange Rate, Airflow, Redshift Spectrum, dbt.<\/p>\n<hr>\n<h3>\u041d\u043e\u0432\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 legacy-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/www.cbr.ru\/development\/DWS\/\"><u>\u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441 \u0426\u0411 \u0420\u0424<\/u><\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u043e\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0435\u0433\u043e \u0441\u0442\u0430\u043b\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0438 AED (\u0434\u0438\u0440\u0445\u0430\u043c \u041e\u0410\u042d). \u0414\u043b\u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u043a\u0443\u0440\u0441\u044b \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442 BTC, ETH, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0426\u0411 \u0420\u0424 \u0442\u043e\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 API \u0426\u0411 \u0420\u0424<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u044b\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043e\u043a, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043d\u0443\u0442\u0440\u0438\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u043a\u0443\u0440\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0435 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0414\u0430\u043d\u043d\u044b\u0445 (\u043b\u0443\u0447\u0448\u0435 \u0435\u0441\u043b\u0438 \u0438\u0445 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442)<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa0\/eea\/666\/aa0eea666ecf53e43180cd7d32bc00b4.png\" alt=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442\" title=\"\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442\" width=\"1278\" height=\"644\"><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442<\/figcaption><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u041a\u0440\u0430\u0441\u043d\u044b\u043c \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e API \u0434\u043b\u044f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442 \u0432 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 (\u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445) \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0432\u0430\u043b\u044e\u0442\u0430\u043c \u0437\u0430 \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u0438\u0437 legacy-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041b\u0435\u0433\u0430\u0441\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u043e pivot-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u0430\u043b\u044e\u0442 \u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u043d\u0443\u044e \u0431\u043e\u043b\u044c \u0435\u0441\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0430\u043b\u044e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c.&nbsp;<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7cd\/f1c\/0f8\/7cdf1c0f894ddad0945d946d57697505.png\" width=\"268\" height=\"878\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0443\u0439\u0442\u0438 \u043e\u0442 \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 pandas \u0434\u043e \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 (<strong>T<\/strong> \u0432 EL<strong>T<\/strong>) \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043c\u043d\u0435 \u0432 \u044d\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/habr.com\/ru\/company\/wheely\/blog\/549614\/\"><u>dbt<\/u><\/a>.<\/p>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0440\u044f\u0434\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u2013 <a href=\"https:\/\/openexchangerates.org\/\"><u>https:\/\/openexchangerates.org\/<\/u><\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/62d\/a15\/f60\/62da15f601b969688e57a7ca7c0de0c7.png\" width=\"1189\" height=\"489\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043f\u043b\u0430\u043d <em>Developer <\/em>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p>10.000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e (\u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e)<\/p>\n<\/li>\n<li>\n<p>\u0415\u0436\u0435\u0447\u0430\u0441\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0428\u0438\u0440\u043e\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b87\/bc0\/144\/b87bc0144f1ee292a01ae35b8ca77fd5.png\" width=\"227\" height=\"236\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f API endpoint <a href=\"https:\/\/docs.openexchangerates.org\/docs\/latest-json\"><strong><u>\/latest.json<\/u><\/strong><\/a><\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8df\/1ee\/7f8\/8df1ee7f8c3c58c805498d31ec3a37d6.png\" width=\"906\" height=\"618\"><figcaption><\/figcaption><\/figure>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 Airflow<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c Airflow. Apache Airflow \u2013 \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, data engineering \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u043c\u0438.&nbsp;<\/p>\n<p>\u0421\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0433\u0440\u0430\u0444\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 (DAG):<\/p>\n<ul>\n<li>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0432\u0438\u0434\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u043d\u0430 S3)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0432 Slack \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f DAG:<\/p>\n<ul>\n<li>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b (base currency), \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u0443\u0440\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u043c \u0432\u0438\u0442\u0440\u0438\u043d \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0414\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0422\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 DAG \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u0441\u043a\u0430 \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e shell-\u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"bash\">TS=`date +\"%Y-%m-%d-%H-%M-%S-%Z\"`   curl -H \"Authorization: Token $OXR_TOKEN\" \\  \"https:\/\/openexchangerates.org\/api\/historical\/$BUSINESS_DT.json?base=$BASE_CURRENCY&amp;symbols=$SYMBOLS\" \\  | aws s3 cp - s3:\/\/$BUCKET\/$BUCKET_PATH\/$BUSINESS_DT-$BASE_CURRENCY-$TS.json<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432 S3:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9ce\/ad7\/a86\/9cead7a863f36a76f05047d063074399.png\" width=\"1600\" height=\"639\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043b\u043e 25 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0432 \u0441\u0443\u0442\u043a\u0438, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/416\/efe\/ed9\/416efeed9acf8a73d2848b510e171cd1.png\" width=\"1336\" height=\"589\"><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0432\u0430\u043b\u044e\u0442\u0430\u043c<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0432\u0430\u043b\u044e\u0442\u0430\u043c (\u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u0435\u0442). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043d\u043e\u0432\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b \u0441\u0443\u043c\u043c\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043b\u0430\u043d Developer \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a API endpoint <a href=\"https:\/\/docs.openexchangerates.org\/docs\/time-series-json\"><u>\/time-series.json<\/u><\/a>, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0439 \u0440\u0430\u0437\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0434\u0435\u043b\u0430\u0442\u044c upgrade \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/docs.openexchangerates.org\/docs\/historical-json\"><u>\/historical\/*.json<\/u><\/a> \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043e\u043f\u0440\u043e\u0441\u043e\u043c API \u0432 \u0446\u0438\u043a\u043b\u0435 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash   d=2011-01-01 while [ \"$d\" != 2021-02-19 ]; do  echo $d  curl -H \"Authorization: Token $TOKEN\" \"https:\/\/openexchangerates.org\/api\/historical\/$d.json?base=AED&amp;symbols=AED,GBP,EUR,RUB,USD\" &gt; .\/export\/$d.json  d=$(date -j -v +1d -f \"%Y-%m-%d\" $d +%Y-%m-%d) done<\/code><\/pre>\n<p>\u041f\u0438\u043a\u043e\u0432\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0443 \u043a\u043e\u043b\u043b\u0435\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c, \u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u043a\u0446\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/22d\/731\/471\/22d7314719f7db0e1abec7e63e6d14e5.png\" width=\"1129\" height=\"848\"><figcaption><\/figcaption><\/figure>\n<h3>\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442<\/h3>\n<p>\u0412\u0441\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0437 legacy-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0426\u0411 \u0420\u0424 \u0434\u043e \u0434\u0430\u0442\u044b X (\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440) \u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0432 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u042f \u0445\u043e\u0447\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0435 \u043a\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0441\u0443\u043c\u043c\u044b \u0432 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u0445 \u0438 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0438 \u043d\u0430 \u043a\u043e\u043f\u0435\u0439\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0437\u0430 \u0432\u0435\u0441\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432 Data Lake. \u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0443:<\/p>\n<ul>\n<li>\n<p>\u0422\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e legacy pivot-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u0443\u044e<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c \u0432 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 PARQUET \u0432 AWS S3<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u0432 S3 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PARQUET<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">CREATE EXTERNAL TABLE spectrum.currencies_cbrf STORED AS PARQUET LOCATION 's3:\/\/&lt;BUCKET&gt;\/dwh\/currencies_cbrf\/' AS WITH base AS (    SELECT 'EUR' AS base_currency    UNION ALL    SELECT 'GBP'    UNION ALL    SELECT 'RUB'    UNION ALL    SELECT 'USD' ) SELECT    \"day\" AS business_dt    ,b.base_currency    ,CASE b.base_currency        WHEN 'EUR' THEN 1        WHEN 'GBP' THEN gbp_to_eur        WHEN 'RUB' THEN rub_to_eur        WHEN 'USD' THEN usd_to_eur        ELSE NULL      END AS eur    ,CASE b.base_currency        WHEN 'EUR' THEN eur_to_gbp        WHEN 'GBP' THEN 1        WHEN 'RUB' THEN rub_to_gbp        WHEN 'USD' THEN usd_to_gbp        ELSE NULL      END AS gbp    ,CASE b.base_currency        WHEN 'EUR' THEN eur_to_rub        WHEN 'GBP' THEN gbp_to_rub        WHEN 'RUB' THEN 1        WHEN 'USD' THEN usd_to_rub        ELSE NULL      END AS rub    ,CASE b.base_currency        WHEN 'EUR' THEN eur_to_usd        WHEN 'GBP' THEN gbp_to_usd        WHEN 'RUB' THEN rub_to_usd        WHEN 'USD' THEN 1        ELSE NULL      END AS usd      FROM ext.currencies c    CROSS JOIN base b ;<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 S3 \u0443 \u043c\u0435\u043d\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043d\u0438\u043c\u043e\u043a \u0432\u0441\u0435\u0445 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432, \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u043e \u0441\u0436\u0430\u0442\u0438\u0435\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0430 \u0432\u0438\u0442\u0440\u0438\u043d \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0433\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c\u0438 \u043a\u0443\u0440\u0441\u0430\u043c\u0438.<\/p>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 DWH \u0447\u0435\u0440\u0435\u0437 S3 External Table<\/h3>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2013 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 Amazon Redshift \u044f \u0445\u043e\u0447\u0443 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0430\u043c\u044b\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u0443\u0440\u0441\u0430\u043c \u0432\u0430\u043b\u044e\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f\u0445.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 EXTERNAL TABLE, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 SQL-\u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u043c\u0441\u044f \u0432 S3. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 AVRO, ORC, PARQUET \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0446\u0438\u0438. \u041f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/c-using-spectrum.html\"><u>Redshift Spectrum<\/u><\/a> \u0438 \u0442\u0435\u0441\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d \u0441 SQL-\u0434\u0432\u0438\u0436\u043a\u043e\u043c <a href=\"https:\/\/docs.aws.amazon.com\/athena\/latest\/ug\/what-is.html\"><u>Amazon Athena<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441 Presto.<\/p>\n<pre><code class=\"sql\">CREATE EXTERNAL TABLE IF NOT EXISTS spectrum.currencies_oxr (    \"timestamp\" bigint    , base varchar(3)    , rates struct&lt;aed:float8, eur:float8, gbp:float8, rub:float8, usd:float8&gt; ) ROW format serde 'org.openx.data.jsonserde.JsonSerDe' LOCATION 's3:\/\/&lt;BUCKET&gt;\/dwh\/currencies\/' ; <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443 <em>rates<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <em>struct<\/em>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0438\u043b\u0443 dbt. \u041c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/github.com\/fishtown-analytics\/dbt-external-tables\"><u>dbt-external-tables<\/u><\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 EXTERNAL TABLES \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"json\">   - name: external      schema: spectrum      tags: [\"spectrum\"]      loader: S3      description: \"External data stored in S3 accessed vith Redshift Spectrum\"      tables:        - name: currencies_oxr          description: \"Currency Exchange Rates fetched from OXR API https:\/\/openexchangerates.org\"          freshness:            error_after: {count: 15, period: hour}          loaded_at_field: timestamp 'epoch' + \"timestamp\" * interval '1 second'          external:            location: \"s3:\/\/&lt;BUCKET&gt;\/dwh\/currencies\/\"            row_format: \"serde 'org.openx.data.jsonserde.JsonSerDe'\"          columns:            - name: timestamp              data_type: bigint            - name: base              data_type: varchar(3)            - name: rates              data_type: struct&lt;aed:float8, eur:float8, gbp:float8, rub:float8, usd:float8&gt;<\/code><\/pre>\n<p>\u041d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 <em>source freshness test<\/em> \u043d\u0430 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u0443\u043a\u0443 \u043d\u0430 \u043f\u0443\u043b\u044c\u0441\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0432 \u0441\u0440\u043e\u043a, \u0430 \u0431\u0435\u0437 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u0443\u0440\u0441\u043e\u0432 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0431\u043e\u043b\u0435\u0435 15 \u0447\u0430\u0441\u043e\u0432 \u0431\u0435\u0437 \u0441\u0432\u0435\u0436\u0438\u0445 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u2013 \u043c\u044b \u0442\u0443\u0442 \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432 Slack.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0430\u0440\u0445\u0438\u0432) \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u0443\u0440\u0441\u044b (\u043d\u043e\u0432\u044b\u0439 API) \u0432 \u043e\u0434\u043d\u0443 \u043c\u043e\u0434\u0435\u043b\u044c <em>currencies<\/em>:<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">{{    config(        materialized='table',        dist='all',        sort=[\"business_dt\", \"base_currency\"]    ) }}   with cbrf as (    select        business_dt    , null as business_ts    , base_currency    , aed    , eur    , gbp    , rub    , usd    from {{ source('external', 'currencies_cbrf') }}  where business_dt &lt;= '2021-02-18'  ),   oxr_all as (      select        (timestamp 'epoch' + o.\"timestamp\" * interval '1 second')::date as business_dt    , (timestamp 'epoch' + o.\"timestamp\" * interval '1 second') as business_ts    , o.base as base_currency    , o.rates.aed::decimal(10,4) as aed    , o.rates.eur::decimal(10,4) as eur    , o.rates.gbp::decimal(10,4) as gbp    , o.rates.rub::decimal(10,4) as rub    , o.rates.usd::decimal(10,4) as usd    , row_number() over (partition by base_currency, business_dt order by business_ts desc) as rn      from {{ source('external', 'currencies_oxr') }} as o    where business_dt &gt; '2021-02-18'   ),   oxr as (    select        business_dt    , business_ts    , base_currency    , aed    , eur    , gbp    , rub    , usd    from {{ ref('stg_currencies_oxr_all') }}  where rn = 1  ),   united as (    select        business_dt    , business_ts    , base_currency    , aed    , eur    , gbp    , rub    , usd   from cbrf    union all    select        business_dt    , business_ts    , base_currency    , aed    , eur    , gbp    , rub    , usd   from oxr   )   select      business_dt  , business_ts  , base_currency  , aed  , eur  , gbp  , rub  , usd   from united<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0434\u0443 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Redshift \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e \u0434\u0430\u0442\u0435 \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435&nbsp; \u0432\u0438\u0434\u0435 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0432 \u0438 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0414\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0438 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0412\u0441\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e API, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043f\u043e\u043b\u0443-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c JSON \u0432 S3, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u0441 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u043a\u0440\u044b\u0442\u044b&nbsp; . \u0412 \u0441\u0432\u043e\u0438\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u0436\u043e\u0438\u043d \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442:<\/p>\n<pre><code class=\"sql\">   select          -- price_details        , r.currency        , {{ convert_currency('price', 'currency') }}        , {{ convert_currency('discount', 'currency') }}        , {{ convert_currency('insurance', 'currency') }}        , {{ convert_currency('tips', 'currency') }}        , {{ convert_currency('parking', 'currency') }}        , {{ convert_currency('toll_road', 'currency') }}      from {{ ref('requests') }} r        left join {{ ref('stg_currencies') }} currencies on r.completed_dt_utc = currencies.business_dt            and r.currency = currencies.base_currency <\/code><\/pre>\n<p>\u0421\u0430\u043c\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439 \u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0432\u0430\u043b\u044e\u0442\u044b:<\/p>\n<pre><code class=\"sql\">-- currency conversion macro {% macro convert_currency(convert_column, currency_code_column) -%}        ( {{ convert_column }} * aed )::decimal(18,4) as {{ convert_column }}_aed    , ( {{ convert_column }} * eur )::decimal(18,4) as {{ convert_column }}_eur    , ( {{ convert_column }} * gbp )::decimal(18,4) as {{ convert_column }}_gbp    , ( {{ convert_column }} * rub )::decimal(18,4) as {{ convert_column }}_rub    , ( {{ convert_column }} * usd )::decimal(18,4) as {{ convert_column }}_usd   {%- endmacro %} <\/code><\/pre>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435<\/h3>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u2013 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u0443\u0440\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439. \u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u044f \u043d\u0430\u0445\u043e\u0436\u0443 \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0438\u0445. \u042d\u0442\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0443\u0442\u044c, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0439 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u044b.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u0430\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442\u0441\u044f \u044e\u0431\u0438\u043b\u0435\u0439\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/wVRM\/\"><u>Data Engineer<\/u><\/a> \u0432 OTUS, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0440\u043e\u043b\u0438 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u041f\u043e \u043f\u0440\u043e\u0448\u0435\u0441\u0442\u0432\u0438\u0438 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c. \u0411\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0440\u044f\u0434 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u0435\u0439\u0441\u043e\u0432 \u2013 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>Data Architecture<\/p>\n<\/li>\n<li>\n<p>Data Lake<\/p>\n<\/li>\n<li>\n<p>Data Warehouse<\/p>\n<\/li>\n<li>\n<p>NoSQL \/ NewSQL<\/p>\n<\/li>\n<li>\n<p>MLOps<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/otus.pw\/wVRM\/\"><u>\u043b\u0435\u043d\u0434\u0438\u043d\u0433\u0435 \u043a\u0443\u0440\u0441\u0430<\/u><\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044f \u0434\u0435\u043b\u044e\u0441\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u043c\u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0438 \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u043a\u0430\u043d\u0430\u043b\u0435 <a href=\"https:\/\/t.me\/enthusiastech\"><u>Technology Enthusiast<\/u><\/a>.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/div>\n<p> \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\/company\/otus\/blog\/558238\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/558238\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u0440\u0442\u0435\u043c\u0438\u0439 \u2013 Analytics Engineer \u0438\u0437 Wheely.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b. \u0412\u043e\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438\u043c\u0435\u044e\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043e\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f, \u0441\u0442\u0440\u043e\u044f\u0442 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430, \u0433\u043e\u0442\u043e\u0432\u044f\u0442 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c.<\/p>\n<p>\u041f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u0435\u0439\u0441\u0430 Wheely:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0435\u043b\u043a\u043e\u043c \u043f\u043e\u0434 \u043a\u0430\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u0447\u0435\u0442\u0430 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439: Open Exchange Rate, Airflow, Redshift Spectrum, dbt.<\/p>\n<hr>\n<h3>\u041d\u043e\u0432\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 legacy-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/www.cbr.ru\/development\/DWS\/\"><u>\u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441 \u0426\u0411 \u0420\u0424<\/u><\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u043e\u043d \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0435\u0433\u043e \u0441\u0442\u0430\u043b\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0438 AED (\u0434\u0438\u0440\u0445\u0430\u043c \u041e\u0410\u042d). \u0414\u043b\u044f \u043a\u043e\u0433\u043e-\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u043a\u0443\u0440\u0441\u044b \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442 BTC, ETH, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0426\u0411 \u0420\u0424 \u0442\u043e\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 API \u0426\u0411 \u0420\u0424<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u044b\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043e\u043a, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043d\u0443\u0442\u0440\u0438\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u043a\u0443\u0440\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0435 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0414\u0430\u043d\u043d\u044b\u0445 (\u043b\u0443\u0447\u0448\u0435 \u0435\u0441\u043b\u0438 \u0438\u0445 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442)<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043d\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442<\/figcaption><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b. \u041a\u0440\u0430\u0441\u043d\u044b\u043c \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e API \u0434\u043b\u044f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442 \u0432 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 (\u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445) \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0432\u0430\u043b\u044e\u0442\u0430\u043c \u0437\u0430 \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u0438\u0437 legacy-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041b\u0435\u0433\u0430\u0441\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u043e pivot-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u0430\u043b\u044e\u0442 \u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u043d\u0443\u044e \u0431\u043e\u043b\u044c \u0435\u0441\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0430\u043b\u044e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c.&nbsp;<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0443\u0439\u0442\u0438 \u043e\u0442 \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 pandas \u0434\u043e \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 (<strong>T<\/strong> \u0432 EL<strong>T<\/strong>) \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043c\u043d\u0435 \u0432 \u044d\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/habr.com\/ru\/company\/wheely\/blog\/549614\/\"><u>dbt<\/u><\/a>.<\/p>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043d\u043e\u0432\u044b\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0440\u044f\u0434\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u2013 <a href=\"https:\/\/openexchangerates.org\/\"><u>https:\/\/openexchangerates.org\/<\/u><\/a><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043f\u043b\u0430\u043d <em>Developer <\/em>\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p>10.000 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e (\u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e)<\/p>\n<\/li>\n<li>\n<p>\u0415\u0436\u0435\u0447\u0430\u0441\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u0443\u0440\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0428\u0438\u0440\u043e\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f API endpoint <a href=\"https:\/\/docs.openexchangerates.org\/docs\/latest-json\"><strong><u>\/latest.json<\/u><\/strong><\/a><\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 Airflow<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c Airflow. Apache Airflow \u2013 \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, data engineering \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u043c\u0438.&nbsp;<\/p>\n<p>\u0421\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0433\u0440\u0430\u0444\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 (DAG):<\/p>\n<ul>\n<li>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0432\u0438\u0434\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u043d\u0430 S3)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0432 Slack \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f DAG:<\/p>\n<ul>\n<li>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b (base currency), \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u0443\u0440\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u043c \u0432\u0438\u0442\u0440\u0438\u043d \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0414\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u0422\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 DAG \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u0441\u043a\u0430 \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e shell-\u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"bash\">TS=`date +\"%Y-%m-%d-%H-%M-%S-%Z\"`   curl -H \"Authorization: Token $OXR_TOKEN\" \\  \"https:\/\/openexchangerates.org\/api\/historical\/$BUSINESS_DT.json?base=$BASE_CURRENCY&amp;symbols=$SYMBOLS\" \\  | aws s3 cp - s3:\/\/$BUCKET\/$BUCKET_PATH\/$BUSINESS_DT-$BASE_CURRENCY-$TS.json<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432 S3:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043b\u043e 25 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0432 \u0441\u0443\u0442\u043a\u0438, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0432\u0430\u043b\u044e\u0442\u0430\u043c<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0432\u0430\u043b\u044e\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u043e \u043d\u043e\u0432\u044b\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0432\u0430\u043b\u044e\u0442\u0430\u043c (\u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u0435\u0442). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043d\u043e\u0432\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b \u0441\u0443\u043c\u043c\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043b\u0430\u043d Developer \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a API endpoint <a href=\"https:\/\/docs.openexchangerates.org\/docs\/time-series-json\"><u>\/time-series.json<\/u><\/a>, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0439 \u0440\u0430\u0437\u043e\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0434\u0435\u043b\u0430\u0442\u044c upgrade \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/docs.openexchangerates.org\/docs\/historical-json\"><u>\/historical\/*.json<\/u><\/a> \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043e\u043f\u0440\u043e\u0441\u043e\u043c API \u0432 \u0446\u0438\u043a\u043b\u0435 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash   d=2011-01-01 while [ \"$d\" != 2021-02-19 ]; do  echo $d  curl -H \"Authorization: Token $TOKEN\" \"https:\/\/openexchangerates.org\/api\/historical\/$d.json?base=AED&amp;symbols=AED,GBP,EUR,RUB,USD\" &gt; .\/export\/$d.json  d=$(date -j -v +1d -f \"%Y-%m-%d\" $d +%Y-%m-%d) done<\/code><\/pre>\n<p>\u041f\u0438\u043a\u043e\u0432\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0443 \u043a\u043e\u043b\u043b\u0435\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c, \u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u043a\u0446\u0438\u044f:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442<\/h3>\n<p>\u0412\u0441\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0437 legacy-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0426\u0411 \u0420\u0424 \u0434\u043e \u0434\u0430\u0442\u044b X (\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440) \u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0432 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u042f \u0445\u043e\u0447\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0435 \u043a\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0422\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0441\u0443\u043c\u043c\u044b \u0432 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u0445 \u0438 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0438 \u043d\u0430 \u043a\u043e\u043f\u0435\u0439\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u0437\u0430 \u0432\u0435\u0441\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432 Data Lake. \u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0443:<\/p>\n<ul>\n<li>\n<p>\u0422\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e legacy pivot-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u0443\u044e<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c \u0432 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 PARQUET \u0432 AWS S3<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430 \u0432 S3 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PARQUET<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">CREATE EXTERNAL TABLE spectrum.currencies_cbrf STORED AS PARQUET LOCATION 's3:\/\/&lt;BUCKET&gt;\/dwh\/currencies_cbrf\/' AS WITH base AS (    SELECT 'EUR' AS base_currency    UNION ALL    SELECT 'GBP'    UNION ALL    SELECT 'RUB'    UNION ALL    SELECT 'USD' ) SELECT    \"day\" AS business_dt    ,b.base_currency    ,CASE b.base_currency        WHEN 'EUR' THEN 1        WHEN 'GBP' THEN gbp_to_eur        WHEN 'RUB' THEN rub_to_eur        WHEN 'USD' THEN usd_to_eur        ELSE NULL      END AS eur    ,CASE b.base_currency        WHEN 'EUR' THEN eur_to_gbp        WHEN 'GBP' THEN 1        WHEN 'RUB' THEN rub_to_gbp        WHEN 'USD' THEN usd_to_gbp        ELSE NULL      END AS gbp    ,CASE b.base_currency        WHEN 'EUR' THEN eur_to_rub        WHEN 'GBP' THEN gbp_to_rub        WHEN 'RUB' THEN 1        WHEN 'USD' THEN usd_to_rub        ELSE NULL      END AS rub    ,CASE b.base_currency        WHEN 'EUR' THEN eur_to_usd        WHEN 'GBP' THEN gbp_to_usd        WHEN 'RUB' THEN rub_to_usd        WHEN 'USD' THEN 1        ELSE NULL      END AS usd      FROM ext.currencies c    CROSS JOIN base b ;<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 S3 \u0443 \u043c\u0435\u043d\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043d\u0438\u043c\u043e\u043a \u0432\u0441\u0435\u0445 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432, \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u043e \u0441\u0436\u0430\u0442\u0438\u0435\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0430 \u0432\u0438\u0442\u0440\u0438\u043d \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0433\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c\u0438 \u043a\u0443\u0440\u0441\u0430\u043c\u0438.<\/p>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 DWH \u0447\u0435\u0440\u0435\u0437 S3 External Table<\/h3>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2013 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 Amazon Redshift \u044f \u0445\u043e\u0447\u0443 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0430\u043c\u044b\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u0443\u0440\u0441\u0430\u043c \u0432\u0430\u043b\u044e\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f\u0445.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 EXTERNAL TABLE, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 SQL-\u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u043c\u0441\u044f \u0432 S3. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 AVRO, ORC, PARQUET \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0446\u0438\u0438. \u041f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/redshift\/latest\/dg\/c-using-spectrum.html\"><u>Redshift Spectrum<\/u><\/a> \u0438 \u0442\u0435\u0441\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d \u0441 SQL-\u0434\u0432\u0438\u0436\u043a\u043e\u043c <a href=\"https:\/\/docs.aws.amazon.com\/athena\/latest\/ug\/what-is.html\"><u>Amazon Athena<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441 Presto.<\/p>\n<pre><code class=\"sql\">CREATE EXTERNAL TABLE IF NOT EXISTS spectrum.currencies_oxr (    \"timestamp\" bigint    , base varchar(3)    , rates struct&lt;aed:float8, eur:float8, gbp:float8, rub:float8, usd:float8&gt; ) ROW format serde 'org.openx.data.jsonserde.JsonSerDe' LOCATION 's3:\/\/&lt;BUCKET&gt;\/dwh\/currencies\/' ; <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443 <em>rates<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <em>struct<\/em>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0438\u043b\u0443 dbt. \u041c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/github.com\/fishtown-analytics\/dbt-external-tables\"><u>dbt-external-tables<\/u><\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 EXTERNAL TABLES \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"json\">   - name: external      schema: spectrum      tags: [\"spectrum\"]      loader: S3      description: \"External data stored in S3 accessed vith Redshift Spectrum\"      tables:        - name: currencies_oxr          description: \"Currency Exchange Rates fetched from OXR API https:\/\/openexchangerates.org\"          freshness:            error_after: {count: 15, period: hour}          loaded_at_field: timestamp 'epoch' + \"timestamp\" * interval '1 second'          external:            location: \"s3:\/\/&lt;BUCKET&gt;\/dwh\/currencies\/\"            row_format: \"serde 'org.openx.data.jsonserde.JsonSerDe'\"          columns:            - name: timestamp              data_type: bigint            - name: base              data_type: varchar(3)            - name: rates              data_type: struct&lt;aed:float8, eur:float8, gbp:float8, rub:float8, usd:float8&gt;<\/code><\/pre>\n<p>\u041d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0432\u043e\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 <em>source freshness test<\/em> \u043d\u0430 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u0443\u043a\u0443 \u043d\u0430 \u043f\u0443\u043b\u044c\u0441\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0432 \u0441\u0440\u043e\u043a, \u0430 \u0431\u0435\u0437 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u0443\u0440\u0441\u043e\u0432 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0431\u043e\u043b\u0435\u0435 15 \u0447\u0430\u0441\u043e\u0432 \u0431\u0435\u0437 \u0441\u0432\u0435\u0436\u0438\u0445 \u043e\u0431\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0443\u0440\u0441\u043e\u0432 \u2013 \u043c\u044b \u0442\u0443\u0442 \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432 Slack.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0430\u0440\u0445\u0438\u0432) \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u0443\u0440\u0441\u044b (\u043d\u043e\u0432\u044b\u0439 API) \u0432 \u043e\u0434\u043d\u0443 \u043c\u043e\u0434\u0435\u043b\u044c <em>currencies<\/em>:<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">{{    config(        materialized='table',        dist='all',        sort=[\"business_dt\", \"base_currency\"]    ) }}   with cbrf as (    select        business_dt    , null as business_ts    , base_currency    , aed    , eur    , gbp    , rub    , usd    from {{ source('external', 'currencies_cbrf') }}  where business_dt &lt;= '2021-02-18'  ), <\/code><\/pre>\n<\/div>\n<\/details>\n<\/hr>\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-323397","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323397","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=323397"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323397\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}