{"id":469005,"date":"2025-07-29T21:00:12","date_gmt":"2025-07-29T21:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=469005"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=469005","title":{"rendered":"<span>Column Level Security (CLS) \u0432 Apache Superset. Jinja + Handlebars<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0441\u0442\u0438\u043b\u0435 HOWTO, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043b\u044e\u0434\u0438, \u043d\u0443\u0436\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0432 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0435 CLS, \u0443\u0436\u0435 \u0437\u043d\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0435\u0449\u0438 (\u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0436\u0435\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c &#8212; \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b). \u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u043e\u043b\u0435\u0432\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c \u043f\u0440\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Apache Superset. \u0418\u0442\u0430\u043a, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430, \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e <a href=\"https:\/\/superset.apache.org\/docs\/security\/#row-level-security\" rel=\"noopener noreferrer nofollow\">RLS (Row Level Security) \u0432 Apache Superset<\/a> &#8212; \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441 \u0440\u043e\u043b\u044c\u044e, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0442 admin, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 CLS \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0435\u0442. \u0418 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e RLS \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f (\u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c CLS \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u043a\u043e \u0432\u0441\u0435\u043c \u0447\u0430\u0440\u0442\u0430\u043c, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435). \u041d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0447\u0430\u0440\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0430 <a href=\"https:\/\/preset.io\/blog\/intro-jinja-templating-apache-superset\/\" rel=\"noopener noreferrer nofollow\">Jinja <\/a>+ <a href=\"https:\/\/preset.io\/blog\/introduction-to-handlebars-charts-in-preset\/\" rel=\"noopener noreferrer nofollow\">Handlebars<\/a>.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 salary, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (\u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 employee_id=1 &#8212; \u0437\u0430\u0431\u044b\u043b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c, \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c ClickHouse, \u043d\u043e \u044d\u0442\u043e \u0438 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438)<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3c1\/a80\/cfa\/3c1a80cfae11131b0d351828db6ebcb8.jpg\" width=\"541\" height=\"234\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3c1\/a80\/cfa\/3c1a80cfae11131b0d351828db6ebcb8.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3c1\/a80\/cfa\/3c1a80cfae11131b0d351828db6ebcb8.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0440\u0442 \u0442\u0438\u043f\u0430 TABLE \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043b\u043e\u043d\u043a\u0430 employee_salary \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c admin (\u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0437 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438; \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0438\u0437 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f admin &#8212; \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e).<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c &#8212; \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d <a href=\"https:\/\/superset.apache.org\/docs\/configuration\/configuring-superset#feature-flags\" rel=\"noopener noreferrer nofollow\">feature flag<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Jinja. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>superset\/docker\/pythonpath_dev\/superset_config.py<\/code> \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435<code> FEATURE_FLAGS <\/code>\u043a\u043b\u044e\u0447 <code>ENABLE_TEMPLATE_PROCESSING <\/code>\u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>True<\/code>.<\/p>\n<pre><code>FEATURE_FLAGS = {\"ENABLE_TEMPLATE_PROCESSING\": True ...}<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043d\u0435 \u0431\u044b\u043b\u043e &#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0441\u0442\u0430\u0440\u0442 (\u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438). <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b salary \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u0437\u0436\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435\u0442).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u043c\u0435\u043d\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0451 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u0443\u044e \u043a\u043e\u043b\u043e\u043d\u043a\u0443. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 Jinja\u00a0<code>current_username()<\/code>(<a href=\"https:\/\/superset.apache.org\/docs\/configuration\/sql-templating\/#available-macros\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432<\/a>). \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0441\u043e\u0432\u0443\u044e \u0442\u0435\u043e\u0440\u0438\u044e \u2014 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0451 \u0441\u0442\u0430\u043d\u0435\u0442 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0414\u0435\u043b\u0430\u0435\u043c \u0442\u043e\u0447\u044c-\u0432-\u0442\u043e\u0447\u044c, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60a\/51e\/49e\/60a51e49ec1af6df26f3c9a077a1b139.jpg\" alt=\"\" title=\"\" width=\"1082\" height=\"553\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/60a\/51e\/49e\/60a51e49ec1af6df26f3c9a077a1b139.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60a\/51e\/49e\/60a51e49ec1af6df26f3c9a077a1b139.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041c\u0430\u043a\u0440\u043e\u0441 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c &#8212; \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u0442\u0438\u043f\u043e\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 SQL-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e. \u0427\u0442\u043e\u0431\u044b \u044f\u0432\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 SQL-\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f &#8216;<code>username<\/code>&#8216;.  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 TABLE-\u0447\u0430\u0440\u0442, \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 username. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c: <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8d\/c22\/6dc\/b8dc226dca9c9b46714312a03e2bca54.jpg\" width=\"1528\" height=\"553\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b8d\/c22\/6dc\/b8dc226dca9c9b46714312a03e2bca54.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8d\/c22\/6dc\/b8dc226dca9c9b46714312a03e2bca54.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041c\u044b \u0443\u0436\u0435 \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 <code>username <\/code>\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\/\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0443 <code>employee_salary<\/code>. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Handlebars. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0435\u0433\u043e \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0447\u0430\u0440\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cba\/722\/bdd\/cba722bddec5431cbd20ef3b6adfd19f.jpg\" alt=\"\u0414\" title=\"\u0414\" width=\"594\" height=\"384\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cba\/722\/bdd\/cba722bddec5431cbd20ef3b6adfd19f.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cba\/722\/bdd\/cba722bddec5431cbd20ef3b6adfd19f.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0414<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u0447\u0430\u0440\u0442\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 UPDATE CHART, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 CUSTOMIZE \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf2\/e73\/ebf\/bf2e73ebf24f1b5c511d569286407713.jpg\" width=\"1531\" height=\"827\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bf2\/e73\/ebf\/bf2e73ebf24f1b5c511d569286407713.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf2\/e73\/ebf\/bf2e73ebf24f1b5c511d569286407713.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u043a\u0440\u0430\u0442\u043a\u043e \u0438 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u044f\u0441\u043d\u0435\u0435).<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/handlebarsjs.com\/guide\/\" rel=\"noopener noreferrer nofollow\">Handlebars Template<\/a> &#8212; \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 HTML. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <a href=\"https:\/\/www.npmjs.com\/package\/just-handlebars-helpers#helpers\" rel=\"noopener noreferrer nofollow\">\u0445\u0435\u043b\u043f\u0435\u0440\u043e\u0432<\/a> (\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<li>\n<p>CSS Styles &#8212; \u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 CSS \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 CSS. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 Handlebars Template \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438: <\/p>\n<pre><code>&lt;table class=\"data-table\"&gt;   &lt;!-- thead - \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a --&gt;   &lt;thead&gt;     &lt;tr&gt;        &lt;th&gt;ID \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430&lt;\/th&gt;       &lt;th&gt;\u0418\u043c\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430&lt;\/th&gt;       &lt;!-- \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 admin, \u0442\u043e \u044f\u0447\u0435\u0439\u043a\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 --&gt;       &lt;!-- data - \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u0431\u0435\u0440\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 username \u0438\u0437 0 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (\u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430) --&gt;       {{#if (eq data.0.username \"admin\")}}         &lt;th&gt;\u0417\u0430\u0440\u043f\u043b\u0430\u0442\u0430&lt;\/th&gt;       {{\/if}}     &lt;\/tr&gt;   &lt;\/thead&gt;   &lt;tbody&gt;     &lt;!-- #each data - \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0443 data, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0442\u0430\u0431\u043b\u0438\u0446\u044b --&gt;     {{#each data}}       &lt;tr&gt;         &lt;!-- this - \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 --&gt;         &lt;td&gt; {{this.employee_id}}&lt;\/td&gt;         &lt;td&gt; {{this.employee_name}}&lt;\/td&gt;         &lt;!-- \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 admin, \u0442\u043e \u044f\u0447\u0435\u0439\u043a\u0443 employee_salary \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c--&gt;         {{#if (eq this.username \"admin\")}}           &lt;td&gt; {{this.employee_salary}} &lt;\/td&gt;         {{\/if}}       &lt;\/tr&gt;     {{\/each}}   &lt;\/tbody&gt; &lt;\/table&gt;<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 CSS Styles<\/p>\n<pre><code>.data-table {     border-collapse: collapse;     width: 100%;   } .data-table th, .data-table td {   border: 1px solid black;   padding: 8px;   text-align: left; }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>admin <\/code>(\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0438\u043c\u044f \u0432 \u043a\u043e\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e <code>admin<\/code>), \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432 \u043a\u043e\u0434\u0435 Handlebars Template &#8216;<code>admin<\/code>&#8216; \u043d\u0430 &#8216;<code>dsa<\/code>&#8216; (\u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432). \u0412\u043e\u0442 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b15\/a99\/da4\/b15a99da4a248f5bf91d5a7e430fc3c2.jpg\" width=\"1527\" height=\"775\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b15\/a99\/da4\/b15a99da4a248f5bf91d5a7e430fc3c2.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b15\/a99\/da4\/b15a99da4a248f5bf91d5a7e430fc3c2.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0448\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 Column-Level Security (CLS) \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0447\u0430\u0440\u0442\u0430. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 Handlebars Template \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8216;<code>dsa<\/code>&#8216; \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 &#8216;<code>admin<\/code>&#8216;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0440\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0430\u0440\u0442 \u043d\u0430 \u0434\u0430\u0448\u0431\u043e\u0440\u0434<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0443\u0447\u0451\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 (admin \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0418\u0442\u043e\u0433\u043e:<\/strong>\u00a0\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f Jinja + Handlebars + CSS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u043e\u0433\u0430\u0442\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435!\u00a0<\/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\/932184\/\"> https:\/\/habr.com\/ru\/articles\/932184\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0441\u0442\u0438\u043b\u0435 HOWTO, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043b\u044e\u0434\u0438, \u043d\u0443\u0436\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0432 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0435 CLS, \u0443\u0436\u0435 \u0437\u043d\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0435\u0449\u0438 (\u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0436\u0435\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c &#8212; \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b). \u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 &#8212; \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u043e\u043b\u0435\u0432\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c \u043f\u0440\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Apache Superset. \u0418\u0442\u0430\u043a, \u043f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430, \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e <a href=\"https:\/\/superset.apache.org\/docs\/security\/#row-level-security\" rel=\"noopener noreferrer nofollow\">RLS (Row Level Security) \u0432 Apache Superset<\/a> &#8212; \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441 \u0440\u043e\u043b\u044c\u044e, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0442 admin, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 CLS \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0435\u0442. \u0418 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e RLS \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f (\u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c CLS \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u043a\u043e \u0432\u0441\u0435\u043c \u0447\u0430\u0440\u0442\u0430\u043c, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435). \u041d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0447\u0430\u0440\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0430 <a href=\"https:\/\/preset.io\/blog\/intro-jinja-templating-apache-superset\/\" rel=\"noopener noreferrer nofollow\">Jinja <\/a>+ <a href=\"https:\/\/preset.io\/blog\/introduction-to-handlebars-charts-in-preset\/\" rel=\"noopener noreferrer nofollow\">Handlebars<\/a>.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 salary, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 (\u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 employee_id=1 &#8212; \u0437\u0430\u0431\u044b\u043b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c, \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c ClickHouse, \u043d\u043e \u044d\u0442\u043e \u0438 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u0438)<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0440\u0442 \u0442\u0438\u043f\u0430 TABLE \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043b\u043e\u043d\u043a\u0430 employee_salary \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c admin (\u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0437 \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438; \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0438\u0437 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f admin &#8212; \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e).<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c &#8212; \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d <a href=\"https:\/\/superset.apache.org\/docs\/configuration\/configuring-superset#feature-flags\" rel=\"noopener noreferrer nofollow\">feature flag<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Jinja. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>superset\/docker\/pythonpath_dev\/superset_config.py<\/code> \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435<code> FEATURE_FLAGS <\/code>\u043a\u043b\u044e\u0447 <code>ENABLE_TEMPLATE_PROCESSING <\/code>\u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>True<\/code>.<\/p>\n<pre><code>FEATURE_FLAGS = {\"ENABLE_TEMPLATE_PROCESSING\": True ...}<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043d\u0435 \u0431\u044b\u043b\u043e &#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0441\u0442\u0430\u0440\u0442 (\u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438). <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b salary \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u0437\u0436\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043d\u0435\u0442).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u043c\u0435\u043d\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0451 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u0443\u044e \u043a\u043e\u043b\u043e\u043d\u043a\u0443. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 Jinja\u00a0<code>current_username()<\/code>(<a href=\"https:\/\/superset.apache.org\/docs\/configuration\/sql-templating\/#available-macros\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432<\/a>). \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0441\u043e\u0432\u0443\u044e \u0442\u0435\u043e\u0440\u0438\u044e \u2014 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0451 \u0441\u0442\u0430\u043d\u0435\u0442 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0414\u0435\u043b\u0430\u0435\u043c \u0442\u043e\u0447\u044c-\u0432-\u0442\u043e\u0447\u044c, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.  <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u0430\u043a\u0440\u043e\u0441 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c &#8212; \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u0442\u0438\u043f\u043e\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 SQL-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e. \u0427\u0442\u043e\u0431\u044b \u044f\u0432\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 SQL-\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f &#8216;<code>username<\/code>&#8216;.  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 TABLE-\u0447\u0430\u0440\u0442, \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 username. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c: <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041c\u044b \u0443\u0436\u0435 \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 <code>username <\/code>\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\/\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0443 <code>employee_salary<\/code>. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Handlebars. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0435\u0433\u043e \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0447\u0430\u0440\u0442\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0414<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u0447\u0430\u0440\u0442\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 UPDATE CHART, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 CUSTOMIZE \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u043a\u0440\u0430\u0442\u043a\u043e \u0438 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u044f\u0441\u043d\u0435\u0435).<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/handlebarsjs.com\/guide\/\" rel=\"noopener noreferrer nofollow\">Handlebars Template<\/a> &#8212; \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 HTML. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <a href=\"https:\/\/www.npmjs.com\/package\/just-handlebars-helpers#helpers\" rel=\"noopener noreferrer nofollow\">\u0445\u0435\u043b\u043f\u0435\u0440\u043e\u0432<\/a> (\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<li>\n<p>CSS Styles &#8212; \u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 CSS \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 CSS. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 Handlebars Template \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438: <\/p>\n<pre><code>&lt;table class=\"data-table\"&gt;   &lt;!-- thead - \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a --&gt;   &lt;thead&gt;     &lt;tr&gt;        &lt;th&gt;ID \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430&lt;\/th&gt;       &lt;th&gt;\u0418\u043c\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430&lt;\/th&gt;       &lt;!-- \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 admin, \u0442\u043e \u044f\u0447\u0435\u0439\u043a\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 --&gt;       &lt;!-- data - \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u0431\u0435\u0440\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 username \u0438\u0437 0 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (\u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430) --&gt;       {{#if (eq data.0.username \"admin\")}}         &lt;th&gt;\u0417\u0430\u0440\u043f\u043b\u0430\u0442\u0430&lt;\/th&gt;       {{\/if}}     &lt;\/tr&gt;   &lt;\/thead&gt;   &lt;tbody&gt;     &lt;!-- #each data - \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0443 data, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0442\u0430\u0431\u043b\u0438\u0446\u044b --&gt;     {{#each data}}       &lt;tr&gt;         &lt;!-- this - \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 --&gt;         &lt;td&gt; {{this.employee_id}}&lt;\/td&gt;         &lt;td&gt; {{this.employee_name}}&lt;\/td&gt;         &lt;!-- \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 admin, \u0442\u043e \u044f\u0447\u0435\u0439\u043a\u0443 employee_salary \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c--&gt;         {{#if (eq this.username \"admin\")}}           &lt;td&gt; {{this.employee_salary}} &lt;\/td&gt;         {{\/if}}       &lt;\/tr&gt;     {{\/each}}   &lt;\/tbody&gt; &lt;\/table&gt;<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 CSS Styles<\/p>\n<pre><code>.data-table {     border-collapse: collapse;     width: 100%;   } .data-table th, .data-table td {   border: 1px solid black;   padding: 8px;   text-align: left; }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>admin <\/code>(\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0438\u043c\u044f \u0432 \u043a\u043e\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e <code>admin<\/code>), \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432 \u043a\u043e\u0434\u0435 Handlebars Template &#8216;<code>admin<\/code>&#8216; \u043d\u0430 &#8216;<code>dsa<\/code>&#8216; (\u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432). \u0412\u043e\u0442 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0448\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 Column-Level Security (CLS) \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0447\u0430\u0440\u0442\u0430. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 Handlebars Template \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8216;<code>dsa<\/code>&#8216; \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 &#8216;<code>admin<\/code>&#8216;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0440\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0430\u0440\u0442 \u043d\u0430 \u0434\u0430\u0448\u0431\u043e\u0440\u0434<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0443\u0447\u0451\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 (admin \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0418\u0442\u043e\u0433\u043e:<\/strong>\u00a0\u041a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f Jinja + Handlebars + CSS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u043e\u0433\u0430\u0442\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435!\u00a0<\/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\/932184\/\"> https:\/\/habr.com\/ru\/articles\/932184\/<\/a><br \/><\/br><\/br><\/p>\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-469005","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469005","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=469005"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469005\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=469005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=469005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=469005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}