{"id":315,"date":"2020-03-16T02:11:47","date_gmt":"2020-03-16T02:11:47","guid":{"rendered":"https:\/\/snowflake.pavlik.us\/?p=315"},"modified":"2020-03-16T03:33:10","modified_gmt":"2020-03-16T03:33:10","slug":"helper-functions-in-snowflake-stored-procedures","status":"publish","type":"post","link":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/","title":{"rendered":"Helper Functions in Snowflake Stored Procedures"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"450\" src=\"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg\" alt=\"\" class=\"wp-image-316\" srcset=\"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg 555w, https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure-300x243.jpg 300w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/><\/figure><\/div>\n\n\n\n<p>Snowflake supports <a rel=\"noreferrer noopener\" aria-label=\"stored procedures using JavaScript (opens in a new tab)\" href=\"https:\/\/docs.snowflake.net\/manuals\/sql-reference\/stored-procedures.html\" target=\"_blank\">JavaScript stored procedures<\/a>.  You may choose to start by copying and modifying a sample Snowflake stored procedure from the documentation, often <a rel=\"noreferrer noopener\" aria-label=\"this one (opens in a new tab)\" href=\"https:\/\/docs.snowflake.net\/manuals\/sql-reference\/stored-procedures-usage.html#retrieving-result-set-metadata\" target=\"_blank\">this one<\/a>.<\/p>\n\n\n\n<p>As you add more SQL statements, exception handling and increase code complexity, having all code in the main JavaScript function risks becoming spaghetti code. <\/p>\n\n\n\n<p>Fortunately, Snowflake stored procedures allow more than one function. In JavaScript, helper functions are additional functions called from a main function. <\/p>\n\n\n\n<p>It&#8217;s easy to write a helper function. Just before the main function&#8217;s final curly bracket, add the following:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction HelperFunction(stringIn) {\n\n    \/\/Do something here, and then return the value:\n    var s = stringIn;\n    return s;\n}\n<\/pre><\/div>\n\n\n<p>You can also use the <a rel=\"noreferrer noopener\" aria-label=\"Snowflake Stored Procedure API (opens in a new tab)\" href=\"https:\/\/docs.snowflake.net\/manuals\/sql-reference\/stored-procedures-api.html\" target=\"_blank\">Snowflake Stored Procedure API<\/a> inside helper functions. Here two helper functions using the Snowflake SP API that make your main function more readable and modular.  ExecuteNonQuery executes a DML statement or SQL statement that does not return a table. ExecuteSingleValueQuery fetches the first row&#8217;s value for a specified column. You can use this to retrieve flags and settings or other values from control tables.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ncreate or replace procedure SampleSP()\nreturns string\nlanguage javascript\nas\n$$\n    var s;\n\n    try{\n        ExecuteNonQuery(&quot;create or replace table MY_NATION_TABLE like SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.NATION;&quot;);\n        ExecuteNonQuery(&quot;insert into MY_NATION_TABLE select * from SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.NATION;&quot;);\n        s = ExecuteSingleValueQuery(&quot;N_NAME&quot;, &quot;select * from MY_NATION_TABLE where N_NATIONKEY = 24;&quot;);\n        ExecuteNonQuery(&quot;drop table MY_NATION_TABLE;&quot;);\n        return s;\n    }\n    catch(err){\n        return err;\n    }\n\/\/ ----------------------------------------------------------------------------------\n\/\/ Main function above; helper functions below\n\n    function ExecuteNonQuery(queryString) {\n        var out = &#039;&#039;;\n        cmd1 = {sqlText: queryString};\n        stmt = snowflake.createStatement(cmd1);\n        var rs;\n        try{\n            rs = stmt.execute();\n            rs.next();\n            out = &quot;SUCCESS: &quot; + rs.getColumnValue(1);\n        }\n        catch(err) {\n            throw &quot;ERROR: &quot; + err.message.replace(\/\\n\/g, &quot; &quot;);\n        }\n        return out;\n    }\n\n    function ExecuteSingleValueQuery(columnName, queryString) {\n        var out;\n        cmd1 = {sqlText: queryString};\n        stmt = snowflake.createStatement(cmd1);\n        var rs;\n        try{\n            rs = stmt.execute();\n            rs.next();\n            return rs.getColumnValue(columnName);\n        }\n        catch(err) {\n            if (err.message.substring(0, 18) == &quot;ResultSet is empty&quot;){\n                throw &quot;ERROR: No rows returned in query.&quot;;\n            } else {\n                throw &quot;ERROR: &quot; + err.message.replace(\/\\n\/g, &quot; &quot;);\n            } \n        }\n        return out;\n    }\n$$;\n\ncall SampleSP();\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Snowflake supports JavaScript stored procedures. You may choose to start by copying and modifying a sample Snowflake stored procedure from the documentation, often this one. As you add more SQL statements, exception handling and increase code complexity, having all code in the main JavaScript function risks becoming spaghetti code. Fortunately, Snowflake stored procedures allow more [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,13],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","hentry","category-sql","category-stored-procedures-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Helper Functions in Snowflake Stored Procedures - Snowflake in the Carolinas<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Helper Functions in Snowflake Stored Procedures - Snowflake in the Carolinas\" \/>\r\n<meta property=\"og:description\" content=\"Snowflake supports JavaScript stored procedures. You may choose to start by copying and modifying a sample Snowflake stored procedure from the documentation, often this one. As you add more SQL statements, exception handling and increase code complexity, having all code in the main JavaScript function risks becoming spaghetti code. Fortunately, Snowflake stored procedures allow more [&hellip;]\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Snowflake in the Carolinas\" \/>\r\n<meta property=\"article:published_time\" content=\"2020-03-16T02:11:47+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2020-03-16T03:33:10+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg\" \/>\r\n\t<meta property=\"og:image:width\" content=\"555\" \/>\r\n\t<meta property=\"og:image:height\" content=\"450\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\r\n<meta name=\"author\" content=\"Greg Pavlik\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greg Pavlik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/\"},\"author\":{\"name\":\"Greg Pavlik\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#\\\/schema\\\/person\\\/019455f4675665b6cf5edea31ec44d7b\"},\"headline\":\"Helper Functions in Snowflake Stored Procedures\",\"datePublished\":\"2020-03-16T02:11:47+00:00\",\"dateModified\":\"2020-03-16T03:33:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/\"},\"wordCount\":166,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Clippy_StoredProcedure.jpg\",\"articleSection\":[\"SnowSQL\",\"Stored Procedures\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/\",\"url\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/\",\"name\":\"Helper Functions in Snowflake Stored Procedures - Snowflake in the Carolinas\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Clippy_StoredProcedure.jpg\",\"datePublished\":\"2020-03-16T02:11:47+00:00\",\"dateModified\":\"2020-03-16T03:33:10+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#\\\/schema\\\/person\\\/019455f4675665b6cf5edea31ec44d7b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#primaryimage\",\"url\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Clippy_StoredProcedure.jpg\",\"contentUrl\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Clippy_StoredProcedure.jpg\",\"width\":555,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/16\\\/helper-functions-in-snowflake-stored-procedures\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/snowflake.pavlik.us\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Helper Functions in Snowflake Stored Procedures\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#website\",\"url\":\"https:\\\/\\\/snowflake.pavlik.us\\\/\",\"name\":\"Snowflake in the Carolinas\",\"description\":\"Random thoughts on all things Snowflake in the Carolinas\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/snowflake.pavlik.us\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#\\\/schema\\\/person\\\/019455f4675665b6cf5edea31ec44d7b\",\"name\":\"Greg Pavlik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d81df729eebf37a042922b17d4a4c834b1e0ccfa9fea1c2c78cb8e95c7e91701?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d81df729eebf37a042922b17d4a4c834b1e0ccfa9fea1c2c78cb8e95c7e91701?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d81df729eebf37a042922b17d4a4c834b1e0ccfa9fea1c2c78cb8e95c7e91701?s=96&d=mm&r=g\",\"caption\":\"Greg Pavlik\"},\"description\":\"Greg is a Senior Sales Engineer at Snowflake Computing, in the Raleigh-Durham area. He's been in data management and security for the twenty years.\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Helper Functions in Snowflake Stored Procedures - Snowflake in the Carolinas","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/","og_locale":"en_US","og_type":"article","og_title":"Helper Functions in Snowflake Stored Procedures - Snowflake in the Carolinas","og_description":"Snowflake supports JavaScript stored procedures. You may choose to start by copying and modifying a sample Snowflake stored procedure from the documentation, often this one. As you add more SQL statements, exception handling and increase code complexity, having all code in the main JavaScript function risks becoming spaghetti code. Fortunately, Snowflake stored procedures allow more [&hellip;]","og_url":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/","og_site_name":"Snowflake in the Carolinas","article_published_time":"2020-03-16T02:11:47+00:00","article_modified_time":"2020-03-16T03:33:10+00:00","og_image":[{"width":555,"height":450,"url":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg","type":"image\/jpeg"}],"author":"Greg Pavlik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greg Pavlik","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#article","isPartOf":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/"},"author":{"name":"Greg Pavlik","@id":"https:\/\/snowflake.pavlik.us\/#\/schema\/person\/019455f4675665b6cf5edea31ec44d7b"},"headline":"Helper Functions in Snowflake Stored Procedures","datePublished":"2020-03-16T02:11:47+00:00","dateModified":"2020-03-16T03:33:10+00:00","mainEntityOfPage":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/"},"wordCount":166,"commentCount":0,"image":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#primaryimage"},"thumbnailUrl":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg","articleSection":["SnowSQL","Stored Procedures"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/","url":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/","name":"Helper Functions in Snowflake Stored Procedures - Snowflake in the Carolinas","isPartOf":{"@id":"https:\/\/snowflake.pavlik.us\/#website"},"primaryImageOfPage":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#primaryimage"},"image":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#primaryimage"},"thumbnailUrl":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg","datePublished":"2020-03-16T02:11:47+00:00","dateModified":"2020-03-16T03:33:10+00:00","author":{"@id":"https:\/\/snowflake.pavlik.us\/#\/schema\/person\/019455f4675665b6cf5edea31ec44d7b"},"breadcrumb":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#primaryimage","url":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg","contentUrl":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/Clippy_StoredProcedure.jpg","width":555,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/16\/helper-functions-in-snowflake-stored-procedures\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/snowflake.pavlik.us\/"},{"@type":"ListItem","position":2,"name":"Helper Functions in Snowflake Stored Procedures"}]},{"@type":"WebSite","@id":"https:\/\/snowflake.pavlik.us\/#website","url":"https:\/\/snowflake.pavlik.us\/","name":"Snowflake in the Carolinas","description":"Random thoughts on all things Snowflake in the Carolinas","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/snowflake.pavlik.us\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/snowflake.pavlik.us\/#\/schema\/person\/019455f4675665b6cf5edea31ec44d7b","name":"Greg Pavlik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d81df729eebf37a042922b17d4a4c834b1e0ccfa9fea1c2c78cb8e95c7e91701?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d81df729eebf37a042922b17d4a4c834b1e0ccfa9fea1c2c78cb8e95c7e91701?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d81df729eebf37a042922b17d4a4c834b1e0ccfa9fea1c2c78cb8e95c7e91701?s=96&d=mm&r=g","caption":"Greg Pavlik"},"description":"Greg is a Senior Sales Engineer at Snowflake Computing, in the Raleigh-Durham area. He's been in data management and security for the twenty years."}]}},"_links":{"self":[{"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/comments?post=315"}],"version-history":[{"count":19,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"predecessor-version":[{"id":335,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/posts\/315\/revisions\/335"}],"wp:attachment":[{"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}