{"id":393140,"date":"2024-06-29T10:50:16","date_gmt":"2024-06-29T10:50:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=393140"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=393140","title":{"rendered":"<span>\u0421\u0442\u0440\u043e\u0438\u043c Data Vault \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 TPC-H \u2013 Greenplum + dbtVault<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/46e\/21b\/95f\/46e21b95f4970b25fba51aea0636ad31.jpg\" width=\"780\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46e\/21b\/95f\/46e21b95f4970b25fba51aea0636ad31.jpg\" data-blurred=\"true\"\/><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 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442 \u0432 \u0441\u0444\u0435\u0440\u0435 Data Warehousing, Analytics, DataOps.<\/p>\n<p>\u0423\u0436\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c DWH \u0441  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c dbt, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0441 \u0441 package \u0434\u043b\u044f  \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f Data Vault \u2013 <strong>dbtVault<\/strong>.<\/p>\n<p>\u0412 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 TPC-H<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Greenplum \u0432 \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f \u0432 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b dbtVault<\/p>\n<\/li>\n<li>\n<p>C\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Data Vault<\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f Data Vault<\/h2>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0414\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u0433\u0438\u0438 Data Vault  \u0438\u043b\u0438 \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0445, \u0441\u0445\u043e\u0436\u0438\u0445 \u0441 \u043d\u0435\u0439, \u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0442\u043e\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0438  \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f. \u042d\u0442\u043e \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2013 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438  \u043e\u0431\u0438\u043b\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0411\u0414, \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u044e\u0442 \u0432  \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0435:<\/p>\n<ul>\n<li>\n<p>\u0415\u0434\u0438\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u043c\u044b\u0441\u043b\u0438\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0430 \u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/p>\n<\/li>\n<li>\n<p>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u0445\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u043d\u043e\u0432\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u0425\u044d\u0448-\u0441\u0443\u043c\u043c\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/651\/728\/5fd\/6517285fdf2db23198053af64cbad82e.png\" alt=\"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0445\u0435\u043c\u0430 Data Vault\" title=\"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0445\u0435\u043c\u0430 Data Vault\" width=\"2000\" height=\"840\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/651\/728\/5fd\/6517285fdf2db23198053af64cbad82e.png\"\/><figcaption>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0445\u0435\u043c\u0430 Data Vault<\/figcaption><\/figure>\n<p>\u0418 \u043b\u044e\u0431\u043e\u0439, \u043a\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0438\u0437\u0443\u0447\u0430\u043b Data Vault \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c  \u0431\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b  \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u0440\u044f\u0434 \u0437\u0430\u0434\u0430\u0447:<\/p>\n<ul>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c \u0434\u043b\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0438 \u0441\u043e\u0442\u0435\u043d \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (DAG)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/dbtvault.readthedocs.io\/en\/latest\/\">dbtVault<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f <a href=\"https:\/\/habr.com\/ru\/company\/wheely\/blog\/549614\/\">dbt<\/a>.<\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2013 TPC-H<\/h2>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 (benchmarking) <a href=\"http:\/\/www.tpc.org\/tpch\/\">TPC-H<\/a>. \u042d\u0442\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u043f\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u0441\u0442\u0430\u0432\u043e\u043a-\u043f\u0440\u043e\u0434\u0430\u0436. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <em>scale factor<\/em> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u0440\u0430\u0442\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 (\u044510, \u0445100, \u04451000).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cdf\/521\/a24\/cdf521a241a0bbf441af29a205a24d6b.png\" width=\"1230\" height=\"1386\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cdf\/521\/a24\/cdf521a241a0bbf441af29a205a24d6b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u043d\u0435 \u0442\u0435\u0440\u043f\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u044f \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e  \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0449\u0438\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c 10\u0413\u0431 \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b \u0432 Yandex  Object Storage:<\/p>\n<pre><code class=\"bash\">mkdir tpch &amp;&amp; cd tpch  # option 1 \u2013 curl curl -O \"https:\/\/storage.yandexcloud.net\/otus-dwh\/tpch-dbgen\/{customer,lineitem,nation,orders,part,partsupp,region,supplier}.csv\" # option 2 \u2013 aws s3 aws configure # enter your Key ID \/ Secret Key aws --endpoint-url=https:\/\/storage.yandexcloud.net s3 ls s3:\/\/otus-dwh\/tpch-dbgen\/ # list files aws --endpoint-url=https:\/\/storage.yandexcloud.net s3 sync s3:\/\/otus-dwh\/tpch-dbgen\/ . # sync files<\/code><\/pre>\n<p>\u0412 github gist \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e: <a href=\"https:\/\/gist.github.com\/kzzzr\/4ab36bec6897e48e44e792dc2e706de9#2a-generate-data-with-dbgen\">Generate data with DBGen<\/a><\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Greenplum \u0432 \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0435<\/h2>\n<p>\u0412 \u0446\u0435\u043b\u044f\u0445 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Greenplum \u0432  \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441  \u043d\u0430\u0448\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/968\/c90\/fa7\/968c90fa746c6fa80d8c26b4868a89b8.png\" width=\"664\" height=\"518\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/968\/c90\/fa7\/968c90fa746c6fa80d8c26b4868a89b8.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u2013 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u0421\u0423\u0411\u0414  \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 PostgreSQL: Redshift, Vertica, Greenplum. \u0415\u0449\u0435 \u0431\u043e\u043b\u0435\u0435  \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u2013 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f\u043c\u0438 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u043e\u0447\u0442\u0438  \u0432 \u043b\u044e\u0431\u043e\u0439 \u0421\u0423\u0411\u0414 \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440. \u041e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435.<\/p>\n<h3>\u041d\u0430\u043f\u043e\u043b\u043d\u0438\u043c Greenplum \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<details class=\"spoiler\">\n<summary>DDL scripts to create table<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">CREATE TABLE customer (C_CUSTKEY INT,  C_NAME VARCHAR(25), C_ADDRESS VARCHAR(40), C_NATIONKEY INTEGER, C_PHONE CHAR(15), C_ACCTBAL DECIMAL(15,2), C_MKTSEGMENT CHAR(10), C_COMMENT VARCHAR(117)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (C_CUSTKEY);  CREATE TABLE lineitem (L_ORDERKEY BIGINT, L_PARTKEY INT, L_SUPPKEY INT, L_LINENUMBER INTEGER, L_QUANTITY DECIMAL(15,2), L_EXTENDEDPRICE DECIMAL(15,2), L_DISCOUNT DECIMAL(15,2), L_TAX DECIMAL(15,2), L_RETURNFLAG CHAR(1), L_LINESTATUS CHAR(1), L_SHIPDATE DATE, L_COMMITDATE DATE, L_RECEIPTDATE DATE, L_SHIPINSTRUCT CHAR(25), L_SHIPMODE CHAR(10), L_COMMENT VARCHAR(44)) WITH (appendonly=true, orientation=column, compresstype=ZSTD) DISTRIBUTED BY (L_ORDERKEY,L_LINENUMBER) PARTITION BY RANGE (L_SHIPDATE) (start('1992-01-01') INCLUSIVE end ('1998-12-31') INCLUSIVE every (30), default partition others);  CREATE TABLE nation (N_NATIONKEY INTEGER,  N_NAME CHAR(25),  N_REGIONKEY INTEGER,  N_COMMENT VARCHAR(152)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (N_NATIONKEY);  CREATE TABLE orders (O_ORDERKEY BIGINT, O_CUSTKEY INT, O_ORDERSTATUS CHAR(1), O_TOTALPRICE DECIMAL(15,2), O_ORDERDATE DATE, O_ORDERPRIORITY CHAR(15),  O_CLERK  CHAR(15),  O_SHIPPRIORITY INTEGER, O_COMMENT VARCHAR(79)) WITH (appendonly=true, orientation=column, compresstype=ZSTD) DISTRIBUTED BY (O_ORDERKEY) PARTITION BY RANGE (O_ORDERDATE) (start('1992-01-01') INCLUSIVE end ('1998-12-31') INCLUSIVE every (30), default partition others);  CREATE TABLE part (P_PARTKEY INT, P_NAME VARCHAR(55), P_MFGR CHAR(25), P_BRAND CHAR(10), P_TYPE VARCHAR(25), P_SIZE INTEGER, P_CONTAINER CHAR(10), P_RETAILPRICE DECIMAL(15,2), P_COMMENT VARCHAR(23)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (P_PARTKEY);  CREATE TABLE partsupp (PS_PARTKEY INT, PS_SUPPKEY INT, PS_AVAILQTY INTEGER, PS_SUPPLYCOST DECIMAL(15,2), PS_COMMENT VARCHAR(199)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (PS_PARTKEY,PS_SUPPKEY);  CREATE TABLE region (R_REGIONKEY INTEGER,  R_NAME CHAR(25), R_COMMENT VARCHAR(152)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (R_REGIONKEY);  CREATE TABLE supplier  (S_SUPPKEY INT, S_NAME CHAR(25), S_ADDRESS VARCHAR(40), S_NATIONKEY INTEGER, S_PHONE CHAR(15), S_ACCTBAL DECIMAL(15,2), S_COMMENT VARCHAR(101)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (S_SUPPKEY);<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 CLI-\u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <em>psql<\/em> \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c csv-\u0444\u0430\u0439\u043b\u044b \u0432 \u0431\u0430\u0437\u0443:<\/p>\n<pre><code class=\"bash\">export GREENPLUM_URI=\"postgres:\/\/greenplum:&lt;pass>@&lt;host>:5432\/postgres\" psql $GREENPLUM_URI  \\copy customer from  '\/home\/dbgen\/tpch-dbgen\/data\/customer.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy lineitem from  '\/home\/dbgen\/tpch-dbgen\/data\/lineitem.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy nation from  '\/home\/dbgen\/tpch-dbgen\/data\/nation.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy orders from  '\/home\/dbgen\/tpch-dbgen\/data\/orders.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy part from  '\/home\/dbgen\/tpch-dbgen\/data\/part.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy partsupp from  '\/home\/dbgen\/tpch-dbgen\/data\/partsupp.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy region from  '\/home\/dbgen\/tpch-dbgen\/data\/region.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy supplier from  '\/home\/dbgen\/tpch-dbgen\/data\/supplier.csv' WITH (FORMAT csv, DELIMITER '|');<\/code><\/pre>\n<p>\u0423\u0440\u0430! \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e Data Vault.<\/p>\n<h2> \u0418\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 dbt<\/h2>\n<p><strong>1. \u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u0440\u0435\u043f\u043e \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c dbt <\/strong><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\"><strong>dbtvault_greenplum_demo<\/strong><\/a><\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo.git<\/code><\/pre>\n<p><strong>2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0421\u0423\u0411\u0414 Greenplum<\/strong><\/p>\n<p>dbt \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (\u0445\u043e\u0441\u0442\/\u043f\u043e\u0440\u0442\/\u043b\u043e\u0433\u0438\u043d\/\u043f\u0430\u0441\u0441) \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>~\/.dbt\/profiles.yml<\/code>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 dbt \u2013 <a href=\"https:\/\/docs.getdbt.com\/dbt-cli\/configure-your-profile\">Configure your profile<\/a>. \u041f\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0444\u0430\u0439\u043b \u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <code>profiles.yml<\/code>:<\/p>\n<pre><code class=\"yaml\">config:   send_anonymous_usage_stats: False   use_colors: True   partial_parse: True  dbtvault_greenplum_demo:   outputs:     dev:       type: postgres       threads: 2       host: {yc-greenplum-host}       port: 5432       user: greenplum       pass: {yc-greenplum-pass}       dbname: postgres       schema: public   target: dev<\/code><\/pre>\n<p><strong>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 dbt \u0432\u0435\u0440\u0441\u0438\u0438 0.19.0<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. dbt \u2013 \u044d\u0442\u043e \u043d\u0435 \u0447\u0442\u043e \u0438\u043d\u043e\u0435 \u043a\u0430\u043a python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <a href=\"https:\/\/docs.getdbt.com\/dbt-cli\/installation\">\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 dbt<\/a>. \u041d\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 Pipfile \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438:<\/p>\n<pre><code class=\"bash\">pipenv install pipenv shell<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0421\u0423\u0411\u0414:<\/p>\n<pre><code class=\"bash\">dbt --version dbt debug<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aaa\/046\/384\/aaa046384c26e72ee34f26a01fbc2431.gif\" width=\"1808\" height=\"672\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aaa\/046\/384\/aaa046384c26e72ee34f26a01fbc2431.gif\"\/><figcaption><\/figcaption><\/figure>\n<p><strong>4. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c dbtVault<\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u043c\u0430\u0433\u0438\u044f. \u0414\u043b\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Data Vault \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c (\u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043b\u0438 package) <a href=\"https:\/\/dbtvault.readthedocs.io\/en\/latest\/\">dbtVault<\/a>. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0421\u0423\u0411\u0414  Snowflake. \u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u044f\u0434\u0430 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441  Greenplum (PostgreSQL): <a href=\"https:\/\/github.com\/kzzzr\/dbtvault\/commit\/47e0261cea67c3284ea409c86dacdc31b1175a39\"><strong>47e0261<\/strong><\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5cd\/118\/4fd\/5cd1184fd65edff825646533136604f6.png\" width=\"1230\" height=\"882\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5cd\/118\/4fd\/5cd1184fd65edff825646533136604f6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>packages.yml<\/code> \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"yaml\">packages:   # - package: Datavault-UK\/dbtvault   #   version: 0.7.3   - git: \"https:\/\/github.com\/kzzzr\/dbtvault.git\"     revision: master     warn-unpinned: false<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">dbt deps<\/code><\/pre>\n<h2>C\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f TPC-H<\/h2>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 Data Vault \u0432 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u043c  \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0437 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 TPC-H \u043c\u044b  \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445,  \u043d\u0430\u0440\u0435\u0437\u0430\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u043d\u044f\u043c.<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e \u0432 TPC-H \u0438\u043c\u0435\u0435\u043c 4 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0441 \u0434\u0430\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>ORDERDATE (ORDERS)<\/p>\n<\/li>\n<li>\n<p>SHIPDATE (LINEITEM)<\/p>\n<\/li>\n<li>\n<p>RECEIPTDATE (LINEITEM)<\/p>\n<\/li>\n<li>\n<p>COMMITDATE (LINEITEM)<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0444\u0430\u043a\u0442\u044b \u0438\u0434\u0443\u0442 \u0432 \u0445\u0440\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435: ORDERDATE  (\u0437\u0430\u043a\u0430\u0437), SHIPDATE (\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430), RECEIPTDATE (\u043e\u043f\u043b\u0430\u0442\u0430), COMMITDATE  (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435). \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u043d\u0430\u044f \u0434\u0430\u0442\u0430 ORDERDATE \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u2013 <code>1992-01-01<\/code>, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u2013 <code>1998-08-02<\/code>. 2405 \u0434\u043d\u0435\u0439 \u2013 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0438\u0437 8-\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e TPC-H \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u043e\u0439 <code>Raw Stage<\/code> \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 3-\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<ul>\n<li>\n<p>raw_inventory \u2013 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043a\u043b\u0430\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u0447\u0435\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>raw_orders \u2013 \u0437\u0430\u043a\u0430\u0437\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0434\u043d\u0435\u0432\u043d\u043e<\/p>\n<\/li>\n<li>\n<p>raw_transactions \u2013 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043a \u0437\u0430\u043a\u0430\u0437\u0430\u043c<\/p>\n<\/li>\n<\/ul>\n<pre><code>dbt run -m tag:raw<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d21\/26e\/698\/d2126e69883e0455dadae50c7b3660e1.png\" width=\"1998\" height=\"840\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d21\/26e\/698\/d2126e69883e0455dadae50c7b3660e1.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043b\u043e\u0439 Stage<\/h2>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Data Vault.<\/p>\n<ul>\n<li>\n<p>\u0425\u044d\u0448-\u0441\u0443\u043c\u043c\u044b \u0434\u043b\u044f \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0438\u043c\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2dd\/e61\/629\/2dde6162994949741a9a02e20a336302.png\" width=\"859\" height=\"344\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2dd\/e61\/629\/2dde6162994949741a9a02e20a336302.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c <code>dbtvault.stage()<\/code>:<\/p>\n<pre><code class=\"sql\">{%- set yaml_metadata -%}  source_model: 'raw_transactions' derived_columns:   RECORD_SOURCE: '!RAW_TRANSACTIONS'   LOAD_DATE: (TRANSACTION_DATE + 1 * INTERVAL '1 day')   EFFECTIVE_FROM: 'TRANSACTION_DATE' hashed_columns:   TRANSACTION_PK:     - 'CUSTOMER_ID'     - 'TRANSACTION_NUMBER'   CUSTOMER_PK: 'CUSTOMER_ID'   ORDER_PK: 'ORDER_ID' {%- endset -%} {% set metadata_dict = fromyaml(yaml_metadata) %} {% set source_model = metadata_dict['source_model'] %} {% set derived_columns = metadata_dict['derived_columns'] %} {% set hashed_columns = metadata_dict['hashed_columns'] %} {{ dbtvault.stage(include_source_columns=true,                   source_model=source_model,                   derived_columns=derived_columns,                   hashed_columns=hashed_columns,                   ranked_columns=none) }}<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u043a\u0440\u043e\u0441:<\/p>\n<ul>\n<li>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: <code>source_model<\/code> <\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438: <code>RECORD_SOURCE<\/code>, <code>LOAD_DATE<\/code>, <code>EFFECTIVE_FROM<\/code> <\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441 \u0445\u044d\u0448-\u0441\u0443\u043c\u043c\u043e\u0439: <code>TRANSACTION_PK<\/code>, <code>CUSTOMER_PK<\/code>, <code>ORDER_PK<\/code> <\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u043a\u043e\u0434\u043e\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <a href=\"https:\/\/github.com\/Datavault-UK\/dbtvault\/blob\/release\/0.7.8\/macros\/staging\/stage.sql\">stage.sql<\/a> \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 dbtVault \u0438\u043b\u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 <code>.\/dbt_modules\/dbtvault\/macros\/<\/code>  \u043d\u0430\u0448\u0435\u0433\u043e dbt-\u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u0430\u043a \u0438 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435  \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c Data Vault. \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f  \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0b3\/429\/b3e\/0b3429b3edca535a2469397f83765f97.png\" width=\"1156\" height=\"535\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b3\/429\/b3e\/0b3429b3edca535a2469397f83765f97.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u043d\u043e\u0432\u044b\u0445 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bdd\/5d2\/796\/bdd5d2796519890f7ea4f19e6ad56c98.png\" width=\"1399\" height=\"351\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bdd\/5d2\/796\/bdd5d2796519890f7ea4f19e6ad56c98.png\"\/><figcaption><\/figcaption><\/figure>\n<h2> \u041d\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c Raw Data Vault \u0434\u0435\u043d\u044c \u0437\u0430 \u0434\u043d\u0451\u043c<\/h2>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0438\u043f\u0430 <a href=\"https:\/\/github.com\/Datavault-UK\/dbtvault\/blob\/release\/0.7.8\/macros\/tables\/hub.sql\">hub<\/a>, <a href=\"https:\/\/github.com\/Datavault-UK\/dbtvault\/blob\/release\/0.7.8\/macros\/tables\/link.sql\">link<\/a>, <a href=\"https:\/\/github.com\/Datavault-UK\/dbtvault\/blob\/release\/0.7.8\/macros\/tables\/sat.sql\">satellite<\/a> \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">{%- set source_model = \"v_stg_orders\" -%} {%- set src_pk = \"CUSTOMER_PK\" -%} {%- set src_nk = \"CUSTOMERKEY\" -%} {%- set src_ldts = \"LOAD_DATE\" -%} {%- set src_source = \"RECORD_SOURCE\" -%}  {{ dbtvault.hub(src_pk=src_pk, src_nk=src_nk, src_ldts=src_ldts,                 src_source=src_source, source_model=source_model) }} <\/code><\/pre>\n<p>\u041c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f Data Vault:<\/p>\n<pre><code class=\"bash\">dbt run -m tag:raw_vault<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ae\/cd8\/e84\/0aecd8e8452a52922f4dd9b2127ca2d2.gif\" width=\"1808\" height=\"672\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ae\/cd8\/e84\/0aecd8e8452a52922f4dd9b2127ca2d2.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0442\u043e\u0433\u043e:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043f\u0430\u043a\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 \u043e\u0434\u043d\u0438 \u0441\u0443\u0442\u043a\u0438 1992-01-08<\/p>\n<\/li>\n<li>\n<p>\u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043e 25 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0437\u0430 19 \u0441\u0435\u043a\u0443\u043d\u0434<\/p>\n<\/li>\n<li>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445: 7 hubs, 8 links, 11 satellites<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430 \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0441\u0443\u0442\u043a\u0438  \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u043e\u0447\u0442\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442 0 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0438\u0442  \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b Data Vault \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0438 \u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438,  \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0443\u0442!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da9\/056\/c02\/da9056c02bedf306be75305d161acd0d.png\" width=\"1462\" height=\"684\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/da9\/056\/c02\/da9056c02bedf306be75305d161acd0d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0437\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0443\u0442\u043a\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>load_date<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 <code>dbt_profiles.yml<\/code> \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0434\u0435\u043d\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e:<\/p>\n<pre><code class=\"yaml\"># dbt_profiles.yml  vars:   load_date: '1992-01-08' # increment by one day '1992-01-09'<\/code><\/pre>\n<h2> \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0448\u0430\u0433\u0438<\/h2>\n<p><strong>1. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u043c\u043e \u043d\u0430 Greenplum \u2013 <\/strong><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\/commits\/master\"><strong>commit history<\/strong><\/a><strong>:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\/commit\/eafed95ad5b912daf9339d877dfa0ee246bd089f\">eafed95<\/a> &#8212; configure dbt_project.yml for greenplum<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\/commit\/aa2560071b27b2e7f6de924222b7d465e28d8af2\">aa25600<\/a> &#8212; configure package (adapted dbt_vault) for greenplum<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\/commit\/bba7437a7d29fd5dd9c383bff49c4604fc84d2ab\">bba7437<\/a> &#8212; configure data sources for greenplum<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\/commit\/dfc5866a63e81393f5bfc0b163cc84b56efc6354\">dfc5866<\/a> &#8212; configure raw layer for greenplum<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\/commit\/a97a22431a182e59c9cb8be807200f0292672b0f\">a97a224<\/a> &#8212; adapt prepared staging layer for greenplum<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 github gist <a href=\"https:\/\/gist.github.com\/kzzzr\/4ab36bec6897e48e44e792dc2e706de9\"><strong>Data Vault 2.0 + Greenplum + dbtVault assignment<\/strong><\/a>.<\/p>\n<p><strong>2. \u0418\u0437\u0443\u0447\u0438\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (DAG) \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/strong><\/p>\n<pre><code>dbt docs generate dbt docs serve<\/code><\/pre>\n<p><strong>3. \u0420\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u0441 <\/strong><a href=\"https:\/\/dbtvault.readthedocs.io\/en\/latest\/macros\/\"><strong>\u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 dbtVault<\/strong><\/a><\/p>\n<p><strong>4. \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439 \u043f\u043e \u0442\u0435\u043c\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/learning.oreilly.com\/library\/view\/building-a-scalable\/9780128026489\/#\">Building a Scalable Data Warehouse with Data Vault 2.0<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.vertabelo.com\/authors\/kent-graziano\/\">\u0421\u0435\u0440\u0438\u044f \u0438\u0437 4-\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u0442 Kent Graziano (Snowflake)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learning.oreilly.com\/library\/view\/pentaho-kettle-solutions\/9780470635179\/ch19.html\">Pentaho\u00ae Kettle Solutions: Chapter 19. Data Vault Management<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>5. \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u043d\u0430 live \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u044b<\/strong><\/p>\n<p>\u042f \u0438 \u043c\u043e\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0437\u0430\u043d\u044f\u0442\u0438\u0439 \u043d\u0430 \u043a\u0443\u0440\u0441\u0430\u0445 <a href=\"https:\/\/otus.pw\/3F4f\/\"><strong>Data Engineer<\/strong><\/a> \u0438 <a href=\"https:\/\/otus.pw\/KHBK\/\"><strong>Analytics Engineer<\/strong><\/a>:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u043e\u0442 \u043b\u0438\u0434\u0435\u0440\u043e\u0432 \u043e\u0442\u0440\u0430\u0441\u043b\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0436\u0438\u0432\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0412\u0430\u0443\u0447\u0435\u0440 \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0430 \u043d\u0430 \u0432\u0441\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>3 \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0430 \u0432 <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1Bo23j4LG43xE5IBUTP1lQ_RmbJEwLqifP2JVQdO8vf4\/edit#gid=1769766247\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<\/a> \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0442\u0435\u043c\u0435 Data Vault<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0438\u0436\u0443\u0445\u0430 \u0432 Slack \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/588582\/\"> https:\/\/habr.com\/ru\/articles\/588582\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u0440\u0442\u0435\u043c\u0438\u0439 \u2013 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442 \u0432 \u0441\u0444\u0435\u0440\u0435 Data Warehousing, Analytics, DataOps.<\/p>\n<p>\u0423\u0436\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c DWH \u0441  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c dbt, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0441 \u0441 package \u0434\u043b\u044f  \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f Data Vault \u2013 <strong>dbtVault<\/strong>.<\/p>\n<p>\u0412 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 TPC-H<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Greenplum \u0432 \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f \u0432 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b dbtVault<\/p>\n<\/li>\n<li>\n<p>C\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Data Vault<\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f Data Vault<\/h2>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0414\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u0433\u0438\u0438 Data Vault  \u0438\u043b\u0438 \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0445, \u0441\u0445\u043e\u0436\u0438\u0445 \u0441 \u043d\u0435\u0439, \u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0442\u043e\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438 \u0438  \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f. \u042d\u0442\u043e \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2013 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438  \u043e\u0431\u0438\u043b\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0411\u0414, \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u044e\u0442 \u0432  \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0435:<\/p>\n<ul>\n<li>\n<p>\u0415\u0434\u0438\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u043c\u044b\u0441\u043b\u0438\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0430 \u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/p>\n<\/li>\n<li>\n<p>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u0445\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u043d\u043e\u0432\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u0425\u044d\u0448-\u0441\u0443\u043c\u043c\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0445\u0435\u043c\u0430 Data Vault<\/figcaption><\/figure>\n<p>\u0418 \u043b\u044e\u0431\u043e\u0439, \u043a\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0438\u0437\u0443\u0447\u0430\u043b Data Vault \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c  \u0431\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b  \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u0440\u044f\u0434 \u0437\u0430\u0434\u0430\u0447:<\/p>\n<ul>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c \u0434\u043b\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0438 \u0441\u043e\u0442\u0435\u043d \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (DAG)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/dbtvault.readthedocs.io\/en\/latest\/\">dbtVault<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f <a href=\"https:\/\/habr.com\/ru\/company\/wheely\/blog\/549614\/\">dbt<\/a>.<\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2013 TPC-H<\/h2>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u044b\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 (benchmarking) <a href=\"http:\/\/www.tpc.org\/tpch\/\">TPC-H<\/a>. \u042d\u0442\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u043f\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u0441\u0442\u0430\u0432\u043e\u043a-\u043f\u0440\u043e\u0434\u0430\u0436. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <em>scale factor<\/em> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u0440\u0430\u0442\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 (\u044510, \u0445100, \u04451000).<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u043d\u0435 \u0442\u0435\u0440\u043f\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u044f \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e  \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043e\u0431\u0449\u0438\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c 10\u0413\u0431 \u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b \u0432 Yandex  Object Storage:<\/p>\n<pre><code class=\"bash\">mkdir tpch &amp;&amp; cd tpch  # option 1 \u2013 curl curl -O \"https:\/\/storage.yandexcloud.net\/otus-dwh\/tpch-dbgen\/{customer,lineitem,nation,orders,part,partsupp,region,supplier}.csv\" # option 2 \u2013 aws s3 aws configure # enter your Key ID \/ Secret Key aws --endpoint-url=https:\/\/storage.yandexcloud.net s3 ls s3:\/\/otus-dwh\/tpch-dbgen\/ # list files aws --endpoint-url=https:\/\/storage.yandexcloud.net s3 sync s3:\/\/otus-dwh\/tpch-dbgen\/ . # sync files<\/code><\/pre>\n<p>\u0412 github gist \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e: <a href=\"https:\/\/gist.github.com\/kzzzr\/4ab36bec6897e48e44e792dc2e706de9#2a-generate-data-with-dbgen\">Generate data with DBGen<\/a><\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Greenplum \u0432 \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0435<\/h2>\n<p>\u0412 \u0446\u0435\u043b\u044f\u0445 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Greenplum \u0432  \u042f\u043d\u0434\u0435\u043a\u0441.\u041e\u0431\u043b\u0430\u043a\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441  \u043d\u0430\u0448\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u043c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u2013 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u0421\u0423\u0411\u0414  \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 PostgreSQL: Redshift, Vertica, Greenplum. \u0415\u0449\u0435 \u0431\u043e\u043b\u0435\u0435  \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e \u2013 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f\u043c\u0438 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u043e\u0447\u0442\u0438  \u0432 \u043b\u044e\u0431\u043e\u0439 \u0421\u0423\u0411\u0414 \u043d\u0430 \u0432\u0430\u0448 \u0432\u044b\u0431\u043e\u0440. \u041e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435.<\/p>\n<h3>\u041d\u0430\u043f\u043e\u043b\u043d\u0438\u043c Greenplum \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<details class=\"spoiler\">\n<summary>DDL scripts to create table<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"sql\">CREATE TABLE customer (C_CUSTKEY INT,  C_NAME VARCHAR(25), C_ADDRESS VARCHAR(40), C_NATIONKEY INTEGER, C_PHONE CHAR(15), C_ACCTBAL DECIMAL(15,2), C_MKTSEGMENT CHAR(10), C_COMMENT VARCHAR(117)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (C_CUSTKEY);  CREATE TABLE lineitem (L_ORDERKEY BIGINT, L_PARTKEY INT, L_SUPPKEY INT, L_LINENUMBER INTEGER, L_QUANTITY DECIMAL(15,2), L_EXTENDEDPRICE DECIMAL(15,2), L_DISCOUNT DECIMAL(15,2), L_TAX DECIMAL(15,2), L_RETURNFLAG CHAR(1), L_LINESTATUS CHAR(1), L_SHIPDATE DATE, L_COMMITDATE DATE, L_RECEIPTDATE DATE, L_SHIPINSTRUCT CHAR(25), L_SHIPMODE CHAR(10), L_COMMENT VARCHAR(44)) WITH (appendonly=true, orientation=column, compresstype=ZSTD) DISTRIBUTED BY (L_ORDERKEY,L_LINENUMBER) PARTITION BY RANGE (L_SHIPDATE) (start('1992-01-01') INCLUSIVE end ('1998-12-31') INCLUSIVE every (30), default partition others);  CREATE TABLE nation (N_NATIONKEY INTEGER,  N_NAME CHAR(25),  N_REGIONKEY INTEGER,  N_COMMENT VARCHAR(152)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (N_NATIONKEY);  CREATE TABLE orders (O_ORDERKEY BIGINT, O_CUSTKEY INT, O_ORDERSTATUS CHAR(1), O_TOTALPRICE DECIMAL(15,2), O_ORDERDATE DATE, O_ORDERPRIORITY CHAR(15),  O_CLERK  CHAR(15),  O_SHIPPRIORITY INTEGER, O_COMMENT VARCHAR(79)) WITH (appendonly=true, orientation=column, compresstype=ZSTD) DISTRIBUTED BY (O_ORDERKEY) PARTITION BY RANGE (O_ORDERDATE) (start('1992-01-01') INCLUSIVE end ('1998-12-31') INCLUSIVE every (30), default partition others);  CREATE TABLE part (P_PARTKEY INT, P_NAME VARCHAR(55), P_MFGR CHAR(25), P_BRAND CHAR(10), P_TYPE VARCHAR(25), P_SIZE INTEGER, P_CONTAINER CHAR(10), P_RETAILPRICE DECIMAL(15,2), P_COMMENT VARCHAR(23)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (P_PARTKEY);  CREATE TABLE partsupp (PS_PARTKEY INT, PS_SUPPKEY INT, PS_AVAILQTY INTEGER, PS_SUPPLYCOST DECIMAL(15,2), PS_COMMENT VARCHAR(199)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (PS_PARTKEY,PS_SUPPKEY);  CREATE TABLE region (R_REGIONKEY INTEGER,  R_NAME CHAR(25), R_COMMENT VARCHAR(152)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (R_REGIONKEY);  CREATE TABLE supplier  (S_SUPPKEY INT, S_NAME CHAR(25), S_ADDRESS VARCHAR(40), S_NATIONKEY INTEGER, S_PHONE CHAR(15), S_ACCTBAL DECIMAL(15,2), S_COMMENT VARCHAR(101)) WITH (appendonly=true, orientation=column) DISTRIBUTED BY (S_SUPPKEY);<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 CLI-\u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <em>psql<\/em> \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c csv-\u0444\u0430\u0439\u043b\u044b \u0432 \u0431\u0430\u0437\u0443:<\/p>\n<pre><code class=\"bash\">export GREENPLUM_URI=\"postgres:\/\/greenplum:&lt;pass>@&lt;host>:5432\/postgres\" psql $GREENPLUM_URI  \\copy customer from  '\/home\/dbgen\/tpch-dbgen\/data\/customer.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy lineitem from  '\/home\/dbgen\/tpch-dbgen\/data\/lineitem.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy nation from  '\/home\/dbgen\/tpch-dbgen\/data\/nation.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy orders from  '\/home\/dbgen\/tpch-dbgen\/data\/orders.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy part from  '\/home\/dbgen\/tpch-dbgen\/data\/part.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy partsupp from  '\/home\/dbgen\/tpch-dbgen\/data\/partsupp.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy region from  '\/home\/dbgen\/tpch-dbgen\/data\/region.csv' WITH (FORMAT csv, DELIMITER '|'); \\copy supplier from  '\/home\/dbgen\/tpch-dbgen\/data\/supplier.csv' WITH (FORMAT csv, DELIMITER '|');<\/code><\/pre>\n<p>\u0423\u0440\u0430! \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e Data Vault.<\/p>\n<h2> \u0418\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 dbt<\/h2>\n<p><strong>1. \u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u0440\u0435\u043f\u043e \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c dbt <\/strong><a href=\"https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo\"><strong>dbtvault_greenplum_demo<\/strong><\/a><\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/kzzzr\/dbtvault_greenplum_demo.git<\/code><\/pre>\n<p><strong>2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0421\u0423\u0411\u0414 Greenplum<\/strong><\/p>\n<p>dbt \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (\u0445\u043e\u0441\u0442\/\u043f\u043e\u0440\u0442\/\u043b\u043e\u0433\u0438\u043d\/\u043f\u0430\u0441\u0441) \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>~\/.dbt\/profiles.yml<\/code>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 dbt \u2013 <a href=\"https:\/\/docs.getdbt.com\/dbt-cli\/configure-your-profile\">Configure your profile<\/a>. \u041f\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0444\u0430\u0439\u043b \u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <code>profiles.yml<\/code>:<\/p>\n<pre><code class=\"yaml\">config:   send_anonymous_usage_stats: False   use_colors: True   partial_parse: True  dbtvault_greenplum_demo:   outputs:     dev:       type: postgres       threads: 2       host: {yc-greenplum-host}       port: 5432       user: greenplum       pass: {yc-greenplum-pass}       dbname: postgres       schema: public   target: dev<\/code><\/pre>\n<p><strong>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 dbt \u0432\u0435\u0440\u0441\u0438\u0438 0.19.0<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. dbt \u2013 \u044d\u0442\u043e \u043d\u0435 \u0447\u0442\u043e \u0438\u043d\u043e\u0435 \u043a\u0430\u043a python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <a href=\"https:\/\/docs.getdbt.com\/dbt-cli\/installation\">\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 dbt<\/a>. \u041d\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 Pipfile \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438:<\/p>\n<pre><code class=\"bash\">pipenv install pipenv shell<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0421\u0423\u0411\u0414:<\/p>\n<pre><code class=\"bash\">dbt --version dbt debug<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><strong>4. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c dbtVault<\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u043c\u0430\u0433\u0438\u044f. \u0414\u043b\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Data Vault \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c (\u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043b\u0438 package) <a href=\"https:\/\/dbtvault.readthedocs.io\/en\/latest\/\">dbtVault<\/a>. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0421\u0423\u0411\u0414  Snowflake. \u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u044f\u0434\u0430 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441  Greenplum (PostgreSQL): <a href=\"https:\/\/github.com\/kzzzr\/dbtvault\/commit\/47e0261cea67c3284ea409c86dacdc31b1175a39\"><strong>47e0261<\/strong><\/a>.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>packages.yml<\/code> \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"yaml\">packages:   # - package: Datavault-UK\/dbtvault   #   version: 0.7.3   - git: \"https:\/\/github.com\/kzzzr\/dbtvault.git\"     revision: master     warn-unpinned: false<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">dbt deps<\/code><\/pre>\n<h2>C\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f TPC-H<\/h2>\n<p>\u041e\u0434\u043d\u043e \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 Data Vault \u0432 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u043c  \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0437 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 TPC-H \u043c\u044b  \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445,  \u043d\u0430\u0440\u0435\u0437\u0430\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u043d\u044f\u043c.<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e \u0432 TPC-H \u0438\u043c\u0435\u0435\u043c 4 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0441 \u0434\u0430\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>ORDERDATE (ORDERS)<\/p>\n<\/li>\n<li>\n<p>SHIPDATE (LINEITEM)<\/p>\n<\/li>\n<li>\n<p>RECEIPTDATE (LINEITEM)<\/p>\n<\/li>\n<li>\n<p>COMMITDATE (LINEITEM)<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0444\u0430\u043a\u0442\u044b \u0438\u0434\u0443\u0442 \u0432 \u0445\u0440\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435: ORDERDATE  (\u0437\u0430\u043a\u0430\u0437), SHIPDATE (\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430), RECEIPTDATE (\u043e\u043f\u043b\u0430\u0442\u0430), COMMITDATE  (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435). \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u043d\u0430\u044f \u0434\u0430\u0442\u0430 ORDERDATE \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u2013 <code>1992-01-01<\/code>, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u2013 <code>1998-08-02<\/code>. 2405 \u0434\u043d\u0435\u0439 \u2013 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0438\u0437 8-\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e TPC-H \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u043e\u0439 <code>Raw Stage<\/code> \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 3-\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<ul>\n<li>\n<p>raw_inventory \u2013 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043a\u043b\u0430\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u0447\u0435\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>raw_orders \u2013 \u0437\u0430\u043a\u0430\u0437\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0434\u043d\u0435\u0432\u043d\u043e<\/p>\n<\/li>\n<li>\n<p>raw_transactions \u2013 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043a \u0437\u0430\u043a\u0430\u0437\u0430\u043c<\/p>\n<\/li>\n<\/ul>\n<pre><code>dbt run -m tag:raw<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043b\u043e\u0439 Stage<\/h2>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Data Vault.<\/p>\n<ul>\n<li>\n<p>\u0425\u044d\u0448-\u0441\u0443\u043c\u043c\u044b \u0434\u043b\u044f \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0438\u043c\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c <code>dbtvault.stage()<\/code>:<\/p>\n<pre><code class=\"sql\">{%- set yaml_metadata -%}  source_model: 'raw_transactions' derived_columns:   RECORD_SOURCE: '!RAW_TRANSACTIONS'   LOAD_DATE: (TRANSACTION_DATE + 1 * INTERVAL '1 day')   EFFECTIVE_FROM: 'TRANSACTION_DATE' hashed_columns:   TRANSACTION_PK:     - 'CUSTOMER_ID'     - 'TRANSACTION_NUMBER'   CUSTOMER_PK: 'CUSTOMER_ID'   ORDER_PK: 'ORDER_ID' {%- endset -%} {% set metadata_dict = fromyaml(yaml_metadata) %} {% set source_model = metadata_dict['source_model'] %} {% set derived_columns = metadata_dict['derived_columns'] %} {% set hashed_columns = metadata_dict['hashed_columns'] %} {{<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-393140","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/393140","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=393140"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/393140\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=393140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=393140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=393140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}