{"id":337,"date":"2020-03-18T04:11:59","date_gmt":"2020-03-18T04:11:59","guid":{"rendered":"https:\/\/snowflake.pavlik.us\/?p=337"},"modified":"2020-03-19T16:48:35","modified_gmt":"2020-03-19T16:48:35","slug":"using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table","status":"publish","type":"post","link":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/","title":{"rendered":"Multi-Table Inserts with Good and Bad Row Tables"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png\" alt=\"\" class=\"wp-image-340\" width=\"348\" height=\"278\" srcset=\"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png 423w, https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks-300x240.png 300w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><\/figure><\/div>\n\n\n\n<p>Many customers have asked me how to separate good rows from bad rows during a data load. You can use the <a rel=\"noreferrer noopener\" aria-label=\"VALIDATE  (opens in a new tab)\" href=\"https:\/\/docs.snowflake.net\/manuals\/sql-reference\/functions\/validate.html\" target=\"_blank\">validate<\/a> table function to return all the errors encountered during the load. This may not be exactly what you need though. <\/p>\n\n\n\n<p>What you may be looking for is a design pattern like this:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Load data from files into a raw table<\/li><li>Except for major errors, insert rows with minor data quality issues into the raw table<\/li><li>After loading the raw table, insert good rows to staging (if more processing to do) or production<\/li><li>At the same time, insert bad rows into a separate table for examination of data quality problems<\/li><\/ul>\n\n\n\n<p>You usually load Snowflake tables from files. Files are string data, so you can define all columns in your raw table as string type. This ensures simple errors will not disrupt the load process. Major errors such as an improper number of columns in a row will generate an error during the load. You can specify the appropriate <a rel=\"noreferrer noopener\" aria-label=\"copy option (opens in a new tab)\" href=\"https:\/\/docs.snowflake.net\/manuals\/sql-reference\/sql\/copy-into-table.html#copy-options-copyoptions\" target=\"_blank\">copy option<\/a> to set how you want Snowflake to handle major errors like this.<\/p>\n\n\n\n<p>After defining a raw table, you can create a staging table  or a production table. Either option uses proper data types instead of all strings. You&#8217;ll insert new rows to the target table while sending bad ones to a table containing the original bad values. You can then examine the bad rows to see why they failed to convert to the proper data types. <\/p>\n\n\n\n<p>You can use the following SQL script as a template for how to use Snowflake multi-table Inserts to do this.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n-- Create a staging table with all columns defined as strings.\n-- This will hold all raw values from the load files.\ncreate or replace table SALES_RAW\n(                                       -- Actual Data Type\n  SALE_TIMESTAMP            string,     -- timestamp\n  ITEM_SKU                  string,     -- int\n  PRICE                     string,     -- number(10,2)\n  IS_TAXABLE                string,     -- boolean\n  COMMENTS                  string      -- string\n);\n\n-- Create the production table with actual data types.\ncreate or replace table SALES_STAGE\n(\n  SALE_TIMESTAMP            timestamp,\n  ITEM_SKU                  int,\n  PRICE                     number(10,2),\n  IS_TAXABLE                boolean,\n  COMMENTS                  string\n);\n\n-- Simulate adding some rows from a load file. Two rows are good.\n-- Four rows generate errors when converting to the data types.\ninsert into SALES_RAW \n    (SALE_TIMESTAMP, ITEM_SKU, PRICE, IS_TAXABLE, COMMENTS) \n    values\n    (&#039;2020-03-17 18:21:34&#039;, &#039;23289&#039;, &#039;3.42&#039;,   &#039;TRUE&#039;,  &#039;Good row.&#039;),\n    (&#039;2020-17-03 18:21:56&#039;, &#039;91832&#039;, &#039;1.41&#039;,   &#039;FALSE&#039;, &#039;Bad row: SALE_TIMESTAMP has the month and day transposed.&#039;),\n    (&#039;2020-03-17 18:22:03&#039;, &#039;7O242&#039;, &#039;2.99&#039;,   &#039;T&#039;,     &#039;Bad row: ITEM_SKU has a capital &quot;O&quot; instead of a zero.&#039;),\n    (&#039;2020-03-17 18:22:10&#039;, &#039;53921&#039;, &#039;$6.25&#039;,  &#039;F&#039;,     &#039;Bad row: PRICE should not have a dollar sign.&#039;),\n    (&#039;2020-03-17 18:22:17&#039;, &#039;90210&#039;, &#039;2.49&#039;,   &#039;Foo&#039;,   &#039;Bad row: IS_TAXABLE cannot be converted to true or false&#039;),\n    (&#039;2020-03-17 18:22:24&#039;, &#039;80386&#039;, &#039;1.89&#039;,   &#039;1&#039;,     &#039;Good row.&#039;);\n\n-- Make sure the rows inserted okay.\nselect * from SALES_RAW;\n\n-- Create a table to hold the bad rows.\ncreate or replace table SALES_BAD_ROWS like SALES_RAW;\n\n-- Using multi-table inserts (https:\/\/docs.snowflake.net\/manuals\/sql-reference\/sql\/insert-multi-table.html)\n-- Insert good rows into SALES_STAGE and bad rows into SALES_BAD_ROWS\ninsert  first\n  when  SALE_TIMESTAMP_X is null and SALE_TIMESTAMP is not null or\n        ITEM_SKU_X       is null and SALE_TIMESTAMP is not null or\n        PRICE_X          is null and PRICE          is not null or\n        IS_TAXABLE_X     is null and IS_TAXABLE     is not null\n  then \n        into SALES_BAD_ROWS\n            (SALE_TIMESTAMP, ITEM_SKU, PRICE, IS_TAXABLE, COMMENTS)\n        values\n            (SALE_TIMESTAMP, ITEM_SKU, PRICE, IS_TAXABLE, COMMENTS)  \n  else \n        into SALES_STAGE \n            (SALE_TIMESTAMP, ITEM_SKU, PRICE, IS_TAXABLE, COMMENTS) \n         values \n            (SALE_TIMESTAMP_X, ITEM_SKU_X, PRICE_X, IS_TAXABLE_X, COMMENTS)\nselect  try_to_timestamp (SALE_TIMESTAMP)   as SALE_TIMESTAMP_X,\n        try_to_number    (ITEM_SKU, 10, 0)  as ITEM_SKU_X,\n        try_to_number    (PRICE, 10, 2)     as PRICE_X,\n        try_to_boolean   (IS_TAXABLE)       as IS_TAXABLE_X,\n                                               COMMENTS, \n                                               SALE_TIMESTAMP,\n                                               ITEM_SKU,\n                                               PRICE,\n                                               IS_TAXABLE\nfrom    SALES_RAW;\n\n-- Examine the two good rows\nselect * from SALES_STAGE;\n\n-- Examine the four bad rows\nselect * from SALES_BAD_ROWS;\n<\/pre><\/div>\n\n\n<p>If your incoming values have no nulls or a default value, you can eliminate the null check from the SQL. Now<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n  when  SALE_TIMESTAMP_X is null or\n        ITEM_SKU_X       is null or\n        PRICE_X          is null or\n        IS_TAXABLE_X     is null \n<\/pre><\/div>\n\n\n<p>This works because if the original value isn&#8217;t null, the only reason it would be null is type cast failure. There&#8217;s one final note on this section of the SQL. Why doesn&#8217;t the &#8220;when&#8221; section with several &#8220;and&#8221; and &#8220;or&#8221; operators need parenthesis?<\/p>\n\n\n\n<p>The short answer is that AND has a higher <a rel=\"noreferrer noopener\" aria-label=\"operator precedence (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Order_of_operations\" target=\"_blank\">operator precedence<\/a> than the OR operator. This is true in SQL and most programming languages and seems familiar to many people. If it improves clarity you can add parenthesis. As an academic exercise, this shows the operator precedence of &#8220;and&#8221; and &#8220;or&#8221;.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nselect TRUE and TRUE or FALSE and FALSE; -- In operator precedence, AND comes first, then left to right. This evaluates to TRUE.\n\n-- Processing AND first\nselect (TRUE and TRUE) or (FALSE and FALSE); -- This is functionally equivalent to the above statement.\n\n-- Processing OR first\nselect TRUE and (TRUE or FALSE) and FALSE; -- This shows what would happen if OR had higher operator precedence\n\n-- Processing only left to right\nselect ((TRUE and TRUE) or FALSE) and FALSE; -- This shows what would happen with no operator precedence, just left to right\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many customers have asked me how to separate good rows from bad rows during a data load. You can use the validate table function to return all the errors encountered during the load. This may not be exactly what you need though. What you may be looking for is a design pattern like this: Load [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,2,1],"tags":[],"class_list":["post-337","post","type-post","status-publish","format-standard","hentry","category-error-handling","category-sql","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Multi-Table Inserts with Good and Bad Row Tables - 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\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Multi-Table Inserts with Good and Bad Row Tables - Snowflake in the Carolinas\" \/>\r\n<meta property=\"og:description\" content=\"Many customers have asked me how to separate good rows from bad rows during a data load. You can use the validate table function to return all the errors encountered during the load. This may not be exactly what you need though. What you may be looking for is a design pattern like this: Load [&hellip;]\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Snowflake in the Carolinas\" \/>\r\n<meta property=\"article:published_time\" content=\"2020-03-18T04:11:59+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2020-03-19T16:48:35+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"423\" \/>\r\n\t<meta property=\"og:image:height\" content=\"338\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"5 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\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/\"},\"author\":{\"name\":\"Greg Pavlik\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#\\\/schema\\\/person\\\/019455f4675665b6cf5edea31ec44d7b\"},\"headline\":\"Multi-Table Inserts with Good and Bad Row Tables\",\"datePublished\":\"2020-03-18T04:11:59+00:00\",\"dateModified\":\"2020-03-19T16:48:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/\"},\"wordCount\":394,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/QualityChecks.png\",\"articleSection\":[\"Error Handling\",\"SnowSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/\",\"url\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/\",\"name\":\"Multi-Table Inserts with Good and Bad Row Tables - Snowflake in the Carolinas\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/QualityChecks.png\",\"datePublished\":\"2020-03-18T04:11:59+00:00\",\"dateModified\":\"2020-03-19T16:48:35+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/#\\\/schema\\\/person\\\/019455f4675665b6cf5edea31ec44d7b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#primaryimage\",\"url\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/QualityChecks.png\",\"contentUrl\":\"https:\\\/\\\/snowflake.pavlik.us\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/QualityChecks.png\",\"width\":423,\"height\":338},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/snowflake.pavlik.us\\\/index.php\\\/2020\\\/03\\\/18\\\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/snowflake.pavlik.us\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multi-Table Inserts with Good and Bad Row Tables\"}]},{\"@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":"Multi-Table Inserts with Good and Bad Row Tables - 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\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/","og_locale":"en_US","og_type":"article","og_title":"Multi-Table Inserts with Good and Bad Row Tables - Snowflake in the Carolinas","og_description":"Many customers have asked me how to separate good rows from bad rows during a data load. You can use the validate table function to return all the errors encountered during the load. This may not be exactly what you need though. What you may be looking for is a design pattern like this: Load [&hellip;]","og_url":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/","og_site_name":"Snowflake in the Carolinas","article_published_time":"2020-03-18T04:11:59+00:00","article_modified_time":"2020-03-19T16:48:35+00:00","og_image":[{"width":423,"height":338,"url":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png","type":"image\/png"}],"author":"Greg Pavlik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greg Pavlik","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#article","isPartOf":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/"},"author":{"name":"Greg Pavlik","@id":"https:\/\/snowflake.pavlik.us\/#\/schema\/person\/019455f4675665b6cf5edea31ec44d7b"},"headline":"Multi-Table Inserts with Good and Bad Row Tables","datePublished":"2020-03-18T04:11:59+00:00","dateModified":"2020-03-19T16:48:35+00:00","mainEntityOfPage":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/"},"wordCount":394,"commentCount":0,"image":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#primaryimage"},"thumbnailUrl":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png","articleSection":["Error Handling","SnowSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/","url":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/","name":"Multi-Table Inserts with Good and Bad Row Tables - Snowflake in the Carolinas","isPartOf":{"@id":"https:\/\/snowflake.pavlik.us\/#website"},"primaryImageOfPage":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#primaryimage"},"image":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#primaryimage"},"thumbnailUrl":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png","datePublished":"2020-03-18T04:11:59+00:00","dateModified":"2020-03-19T16:48:35+00:00","author":{"@id":"https:\/\/snowflake.pavlik.us\/#\/schema\/person\/019455f4675665b6cf5edea31ec44d7b"},"breadcrumb":{"@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#primaryimage","url":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png","contentUrl":"https:\/\/snowflake.pavlik.us\/wp-content\/uploads\/2020\/03\/QualityChecks.png","width":423,"height":338},{"@type":"BreadcrumbList","@id":"https:\/\/snowflake.pavlik.us\/index.php\/2020\/03\/18\/using-snowflake-multi-table-inserts-to-insert-good-rows-and-put-bad-ones-in-another-table\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/snowflake.pavlik.us\/"},{"@type":"ListItem","position":2,"name":"Multi-Table Inserts with Good and Bad Row Tables"}]},{"@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\/337","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=337"}],"version-history":[{"count":16,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/posts\/337\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/posts\/337\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/categories?post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/snowflake.pavlik.us\/index.php\/wp-json\/wp\/v2\/tags?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}