{"action":"created","issue":{"url":"https://api.github.com/repos/snowplow/sql-runner/issues/38","labels_url":"https://api.github.com/repos/snowplow/sql-runner/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/snowplow/sql-runner/issues/38/comments","events_url":"https://api.github.com/repos/snowplow/sql-runner/issues/38/events","html_url":"https://github.com/snowplow/sql-runner/issues/38","id":110149619,"number":38,"title":"sql-runner fails on IF EXISTS statements","user":{"login":"gabrielcrowdtilt","id":6201675,"avatar_url":"https://avatars.githubusercontent.com/u/6201675?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielcrowdtilt","html_url":"https://github.com/gabrielcrowdtilt","followers_url":"https://api.github.com/users/gabrielcrowdtilt/followers","following_url":"https://api.github.com/users/gabrielcrowdtilt/following{/other_user}","gists_url":"https://api.github.com/users/gabrielcrowdtilt/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielcrowdtilt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielcrowdtilt/subscriptions","organizations_url":"https://api.github.com/users/gabrielcrowdtilt/orgs","repos_url":"https://api.github.com/users/gabrielcrowdtilt/repos","events_url":"https://api.github.com/users/gabrielcrowdtilt/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielcrowdtilt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snowplow/sql-runner/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jbeemster","id":7984544,"avatar_url":"https://avatars.githubusercontent.com/u/7984544?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeemster","html_url":"https://github.com/jbeemster","followers_url":"https://api.github.com/users/jbeemster/followers","following_url":"https://api.github.com/users/jbeemster/following{/other_user}","gists_url":"https://api.github.com/users/jbeemster/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeemster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeemster/subscriptions","organizations_url":"https://api.github.com/users/jbeemster/orgs","repos_url":"https://api.github.com/users/jbeemster/repos","events_url":"https://api.github.com/users/jbeemster/events{/privacy}","received_events_url":"https://api.github.com/users/jbeemster/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/snowplow/sql-runner/milestones/4","html_url":"https://github.com/snowplow/sql-runner/milestones/Version%200.4.0","labels_url":"https://api.github.com/repos/snowplow/sql-runner/milestones/4/labels","id":1303908,"number":4,"title":"Version 0.4.0","description":"","creator":{"login":"alexanderdean","id":200511,"avatar_url":"https://avatars.githubusercontent.com/u/200511?v=3","gravatar_id":"","url":"https://api.github.com/users/alexanderdean","html_url":"https://github.com/alexanderdean","followers_url":"https://api.github.com/users/alexanderdean/followers","following_url":"https://api.github.com/users/alexanderdean/following{/other_user}","gists_url":"https://api.github.com/users/alexanderdean/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderdean/subscriptions","organizations_url":"https://api.github.com/users/alexanderdean/orgs","repos_url":"https://api.github.com/users/alexanderdean/repos","events_url":"https://api.github.com/users/alexanderdean/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderdean/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2015-09-14T08:59:28Z","updated_at":"2015-11-12T16:50:41Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2015-10-07T04:19:50Z","updated_at":"2015-11-12T18:31:15Z","closed_at":null,"body":"For example, web-incremental step 00-preparation:\r\nhttps://github.com/snowplow/snowplow/blob/master/5-data-modeling/sql-runner/redshift/sql/web-incremental/00-preparation/00-preparation.sql#L25\r\n\r\nGives this output\r\n```\r\n2015/10/07 04:12:30 EXECUTING 00-preparation (in step 00-preparation @ snowplow): /opt/snowplow/sql_runner/analytics/sql/web-incremental/00-preparation/00-preparation.sql\r\n2015/10/07 04:12:30 FAILURE: 00-preparation (step 00-preparation @ target snowplow), ERROR: ERROR #3F000 schema \"snplw_temp\" does not exist: \r\n2015/10/07 04:12:30 \r\nTARGET INITIALIZATION FAILURES:\r\nQUERY FAILURES:\r\n* Query 00-preparation /opt/snowplow/sql_runner/analytics/sql/web-incremental/00-preparation/00-preparation.sql (in step 00-preparation @ target snowplow), ERROR:\r\n  - ERROR #3F000 schema \"snplw_temp\" does not exist: \r\n```\r\n\r\nCan sql-runner be made to handle this edge case. It would also allow one to create playbooks for all initial schema and table setup."},"comment":{"url":"https://api.github.com/repos/snowplow/sql-runner/issues/comments/156193905","html_url":"https://github.com/snowplow/sql-runner/issues/38#issuecomment-156193905","issue_url":"https://api.github.com/repos/snowplow/sql-runner/issues/38","id":156193905,"user":{"login":"alexanderdean","id":200511,"avatar_url":"https://avatars.githubusercontent.com/u/200511?v=3","gravatar_id":"","url":"https://api.github.com/users/alexanderdean","html_url":"https://github.com/alexanderdean","followers_url":"https://api.github.com/users/alexanderdean/followers","following_url":"https://api.github.com/users/alexanderdean/following{/other_user}","gists_url":"https://api.github.com/users/alexanderdean/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderdean/subscriptions","organizations_url":"https://api.github.com/users/alexanderdean/orgs","repos_url":"https://api.github.com/users/alexanderdean/repos","events_url":"https://api.github.com/users/alexanderdean/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderdean/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T18:31:15Z","updated_at":"2015-11-12T18:31:15Z","body":"Let's create a separate ticket to upgrade to v3 of the PG driver in this release anyway..."}}