{"id":2450,"date":"2015-07-13T02:32:27","date_gmt":"2015-07-13T02:32:27","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2450"},"modified":"2015-07-13T02:32:27","modified_gmt":"2015-07-13T02:32:27","slug":"rethinkdb-filter-for-the-absence-of-a-column-in-python","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/rethinkdb-filter-for-the-absence-of-a-column-in-python\/","title":{"rendered":"RethinkDB filter for the absence of a column in python"},"content":{"rendered":"<p>The following query will find rows that don&#8217;t have a given column. This is useful in ETL scenarios, where you are incrementally augmenting data with additional columns.<\/p>\n<p>This is slightly tricky to figure out, because this is &#8220;has_fields&#8221; in python, and &#8220;hasFields&#8221; in ReQL, and &#8220;not_&#8221; in python, as &#8220;not&#8221; is a reserved word.<\/p>\n<pre lang=\"python\">\nprint table.filter(r.row.has_fields(\"Title_Query_Distance\").not_()).count().run()\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following query will find rows that don&#8217;t have a given column. This is useful in ETL scenarios, where you are incrementally augmenting data with additional columns. This is slightly tricky to figure out, because this is &#8220;has_fields&#8221; in python, and &#8220;hasFields&#8221; in ReQL, and &#8220;not_&#8221; in python, as &#8220;not&#8221; is a reserved word. print &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/rethinkdb-filter-for-the-absence-of-a-column-in-python\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;RethinkDB filter for the absence of a column in python&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[157,160,447,462,466],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2450"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2450"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2450\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}