{"action":"created","comment":{"url":"https://api.github.com/repos/Clever/redshifter/pulls/comments/42188224","id":42188224,"diff_hunk":"@@ -41,84 +197,215 @@ func TestGetJSONCopySQL(t *testing.T) {\n \t}\n }\n \n-func TestCopyGzipCsvDataFromS3(t *testing.T) {\n-\ts3Info := S3Info{\n-\t\tRegion:    \"testregion\",\n-\t\tAccessID:  \"accesskey\",\n-\t\tSecretKey: \"secretkey\",\n+// test create and getColumnSQL at the same time\n+// getColumnSQL is too simple to be worth testing independently","path":"redshift/redshift_test.go","position":221,"original_position":221,"commit_id":"05b5743794e165418fcf07e7207f963e5ce29140","original_commit_id":"05b5743794e165418fcf07e7207f963e5ce29140","user":{"login":"drhurd","id":3298966,"avatar_url":"https://avatars.githubusercontent.com/u/3298966?v=3","gravatar_id":"","url":"https://api.github.com/users/drhurd","html_url":"https://github.com/drhurd","followers_url":"https://api.github.com/users/drhurd/followers","following_url":"https://api.github.com/users/drhurd/following{/other_user}","gists_url":"https://api.github.com/users/drhurd/gists{/gist_id}","starred_url":"https://api.github.com/users/drhurd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drhurd/subscriptions","organizations_url":"https://api.github.com/users/drhurd/orgs","repos_url":"https://api.github.com/users/drhurd/repos","events_url":"https://api.github.com/users/drhurd/events{/privacy}","received_events_url":"https://api.github.com/users/drhurd/received_events","type":"User","site_admin":false},"body":"Bold words.","created_at":"2015-10-15T22:18:26Z","updated_at":"2015-10-15T22:18:26Z","html_url":"https://github.com/Clever/redshifter/pull/20#discussion_r42188224","pull_request_url":"https://api.github.com/repos/Clever/redshifter/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/Clever/redshifter/pulls/comments/42188224"},"html":{"href":"https://github.com/Clever/redshifter/pull/20#discussion_r42188224"},"pull_request":{"href":"https://api.github.com/repos/Clever/redshifter/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/Clever/redshifter/pulls/20","id":47470006,"html_url":"https://github.com/Clever/redshifter/pull/20","diff_url":"https://github.com/Clever/redshifter/pull/20.diff","patch_url":"https://github.com/Clever/redshifter/pull/20.patch","issue_url":"https://api.github.com/repos/Clever/redshifter/issues/20","number":20,"state":"open","locked":false,"title":"Convert to s3 to redshift worker","user":{"login":"schimmy","id":603357,"avatar_url":"https://avatars.githubusercontent.com/u/603357?v=3","gravatar_id":"","url":"https://api.github.com/users/schimmy","html_url":"https://github.com/schimmy","followers_url":"https://api.github.com/users/schimmy/followers","following_url":"https://api.github.com/users/schimmy/following{/other_user}","gists_url":"https://api.github.com/users/schimmy/gists{/gist_id}","starred_url":"https://api.github.com/users/schimmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schimmy/subscriptions","organizations_url":"https://api.github.com/users/schimmy/orgs","repos_url":"https://api.github.com/users/schimmy/repos","events_url":"https://api.github.com/users/schimmy/events{/privacy}","received_events_url":"https://api.github.com/users/schimmy/received_events","type":"User","site_admin":false},"body":"Actual PR for the s3-to-redshift worker. It removes the old `mixpanel` and `postgres` export functionality as we won't need that in the future and I'm pretty confident no one else uses this in the wild. This PR creates a worker which can pull from s3 into redshift using `COPY` looking for the most recent file or a set date.\r\n\r\nAfter reading a configuration file, the worker ensures the target redshift table exists and has the proper columns. If not, it performs the proper SQL commands to get into the state dictated by the configuration file. Then it attempts to find the most recent file on s3 matching a pattern. If the s3 data is more recent than what is in redshift, it loads that s3 data into redshift.","created_at":"2015-10-12T22:09:03Z","updated_at":"2015-10-15T22:18:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ca2f5855b1fe5b126b549f0be96f7df02ec94bd","assignee":{"login":"drhurd","id":3298966,"avatar_url":"https://avatars.githubusercontent.com/u/3298966?v=3","gravatar_id":"","url":"https://api.github.com/users/drhurd","html_url":"https://github.com/drhurd","followers_url":"https://api.github.com/users/drhurd/followers","following_url":"https://api.github.com/users/drhurd/following{/other_user}","gists_url":"https://api.github.com/users/drhurd/gists{/gist_id}","starred_url":"https://api.github.com/users/drhurd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drhurd/subscriptions","organizations_url":"https://api.github.com/users/drhurd/orgs","repos_url":"https://api.github.com/users/drhurd/repos","events_url":"https://api.github.com/users/drhurd/events{/privacy}","received_events_url":"https://api.github.com/users/drhurd/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Clever/redshifter/pulls/20/commits","review_comments_url":"https://api.github.com/repos/Clever/redshifter/pulls/20/comments","review_comment_url":"https://api.github.com/repos/Clever/redshifter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Clever/redshifter/issues/20/comments","statuses_url":"https://api.github.com/repos/Clever/redshifter/statuses/05b5743794e165418fcf07e7207f963e5ce29140","head":{"label":"Clever:convert-to-s3-to-redshift-worker","ref":"convert-to-s3-to-redshift-worker","sha":"05b5743794e165418fcf07e7207f963e5ce29140","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":29368865,"name":"redshifter","full_name":"Clever/redshifter","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/redshifter","description":"libraries for transferring data from various data sources like postgres, mixpanel to s3 and a library to copy data into redshift from s3","fork":false,"url":"https://api.github.com/repos/Clever/redshifter","forks_url":"https://api.github.com/repos/Clever/redshifter/forks","keys_url":"https://api.github.com/repos/Clever/redshifter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/redshifter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/redshifter/teams","hooks_url":"https://api.github.com/repos/Clever/redshifter/hooks","issue_events_url":"https://api.github.com/repos/Clever/redshifter/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/redshifter/events","assignees_url":"https://api.github.com/repos/Clever/redshifter/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/redshifter/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/redshifter/tags","blobs_url":"https://api.github.com/repos/Clever/redshifter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/redshifter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/redshifter/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/redshifter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/redshifter/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/redshifter/languages","stargazers_url":"https://api.github.com/repos/Clever/redshifter/stargazers","contributors_url":"https://api.github.com/repos/Clever/redshifter/contributors","subscribers_url":"https://api.github.com/repos/Clever/redshifter/subscribers","subscription_url":"https://api.github.com/repos/Clever/redshifter/subscription","commits_url":"https://api.github.com/repos/Clever/redshifter/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/redshifter/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/redshifter/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/redshifter/issues/comments{/number}","contents_url":"https://api.github.com/repos/Clever/redshifter/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/redshifter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/redshifter/merges","archive_url":"https://api.github.com/repos/Clever/redshifter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/redshifter/downloads","issues_url":"https://api.github.com/repos/Clever/redshifter/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/redshifter/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/redshifter/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/redshifter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/redshifter/labels{/name}","releases_url":"https://api.github.com/repos/Clever/redshifter/releases{/id}","created_at":"2015-01-16T21:35:10Z","updated_at":"2015-10-15T18:10:04Z","pushed_at":"2015-10-13T20:51:06Z","git_url":"git://github.com/Clever/redshifter.git","ssh_url":"git@github.com:Clever/redshifter.git","clone_url":"https://github.com/Clever/redshifter.git","svn_url":"https://github.com/Clever/redshifter","homepage":"","size":646,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":10,"default_branch":"master"}},"base":{"label":"Clever:master","ref":"master","sha":"80b758757e122964d910389cc6f4c33b4937d5f0","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":29368865,"name":"redshifter","full_name":"Clever/redshifter","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?v=3","gravatar_id":"","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/redshifter","description":"libraries for transferring data from various data sources like postgres, mixpanel to s3 and a library to copy data into redshift from s3","fork":false,"url":"https://api.github.com/repos/Clever/redshifter","forks_url":"https://api.github.com/repos/Clever/redshifter/forks","keys_url":"https://api.github.com/repos/Clever/redshifter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/redshifter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/redshifter/teams","hooks_url":"https://api.github.com/repos/Clever/redshifter/hooks","issue_events_url":"https://api.github.com/repos/Clever/redshifter/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/redshifter/events","assignees_url":"https://api.github.com/repos/Clever/redshifter/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/redshifter/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/redshifter/tags","blobs_url":"https://api.github.com/repos/Clever/redshifter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/redshifter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/redshifter/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/redshifter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/redshifter/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/redshifter/languages","stargazers_url":"https://api.github.com/repos/Clever/redshifter/stargazers","contributors_url":"https://api.github.com/repos/Clever/redshifter/contributors","subscribers_url":"https://api.github.com/repos/Clever/redshifter/subscribers","subscription_url":"https://api.github.com/repos/Clever/redshifter/subscription","commits_url":"https://api.github.com/repos/Clever/redshifter/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/redshifter/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/redshifter/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/redshifter/issues/comments{/number}","contents_url":"https://api.github.com/repos/Clever/redshifter/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/redshifter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/redshifter/merges","archive_url":"https://api.github.com/repos/Clever/redshifter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/redshifter/downloads","issues_url":"https://api.github.com/repos/Clever/redshifter/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/redshifter/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/redshifter/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/redshifter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/redshifter/labels{/name}","releases_url":"https://api.github.com/repos/Clever/redshifter/releases{/id}","created_at":"2015-01-16T21:35:10Z","updated_at":"2015-10-15T18:10:04Z","pushed_at":"2015-10-13T20:51:06Z","git_url":"git://github.com/Clever/redshifter.git","ssh_url":"git@github.com:Clever/redshifter.git","clone_url":"https://github.com/Clever/redshifter.git","svn_url":"https://github.com/Clever/redshifter","homepage":"","size":646,"stargazers_count":10,"watchers_count":10,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Clever/redshifter/pulls/20"},"html":{"href":"https://github.com/Clever/redshifter/pull/20"},"issue":{"href":"https://api.github.com/repos/Clever/redshifter/issues/20"},"comments":{"href":"https://api.github.com/repos/Clever/redshifter/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/Clever/redshifter/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/Clever/redshifter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Clever/redshifter/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/Clever/redshifter/statuses/05b5743794e165418fcf07e7207f963e5ce29140"}}}}