{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/scalding/pulls/comments/22419586","id":22419586,"diff_hunk":"@@ -0,0 +1,25 @@\n+package com.twitter.scalding.jdbc.macros\n+\n+import scala.language.experimental.macros\n+import com.twitter.scalding.jdbc.macros.impl._\n+import com.twitter.scalding.jdbc.{ ColumnDefinitionProvider, JDBCTypeInfo }\n+\n+sealed trait ScaldingJdbcAnnotation\n+// This is the size in characters for a string field\n+// For integers its really for display purposes\n+@scala.annotation.meta.getter\n+class size(val size: Int) extends annotation.StaticAnnotation with ScaldingJdbcAnnotation\n+\n+@scala.annotation.meta.getter","path":"scalding-jdbc-macros/src/main/scala/com/twitter/scalding/jdbc/macros/JDBCMacro.scala","position":13,"original_position":13,"commit_id":"b18bdcffdd96050d68969d73910881fcf979b34a","original_commit_id":"b18bdcffdd96050d68969d73910881fcf979b34a","user":{"login":"ianoc","id":446652,"avatar_url":"https://avatars.githubusercontent.com/u/446652?v=3","gravatar_id":"","url":"https://api.github.com/users/ianoc","html_url":"https://github.com/ianoc","followers_url":"https://api.github.com/users/ianoc/followers","following_url":"https://api.github.com/users/ianoc/following{/other_user}","gists_url":"https://api.github.com/users/ianoc/gists{/gist_id}","starred_url":"https://api.github.com/users/ianoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianoc/subscriptions","organizations_url":"https://api.github.com/users/ianoc/orgs","repos_url":"https://api.github.com/users/ianoc/repos","events_url":"https://api.github.com/users/ianoc/events{/privacy}","received_events_url":"https://api.github.com/users/ianoc/received_events","type":"User","site_admin":false},"body":"add comments on each of these, along with a top one above as to what they are for","created_at":"2015-01-02T19:25:09Z","updated_at":"2015-01-02T19:25:09Z","html_url":"https://github.com/twitter/scalding/pull/1149#discussion_r22419586","pull_request_url":"https://api.github.com/repos/twitter/scalding/pulls/1149","_links":{"self":{"href":"https://api.github.com/repos/twitter/scalding/pulls/comments/22419586"},"html":{"href":"https://github.com/twitter/scalding/pull/1149#discussion_r22419586"},"pull_request":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1149"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/scalding/pulls/1149","id":26740055,"html_url":"https://github.com/twitter/scalding/pull/1149","diff_url":"https://github.com/twitter/scalding/pull/1149.diff","patch_url":"https://github.com/twitter/scalding/pull/1149.patch","issue_url":"https://api.github.com/repos/twitter/scalding/issues/1149","number":1149,"state":"open","locked":false,"title":"WIP, for comment. Jdbc Macros","user":{"login":"ianoc","id":446652,"avatar_url":"https://avatars.githubusercontent.com/u/446652?v=3","gravatar_id":"","url":"https://api.github.com/users/ianoc","html_url":"https://github.com/ianoc","followers_url":"https://api.github.com/users/ianoc/followers","following_url":"https://api.github.com/users/ianoc/following{/other_user}","gists_url":"https://api.github.com/users/ianoc/gists{/gist_id}","starred_url":"https://api.github.com/users/ianoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianoc/subscriptions","organizations_url":"https://api.github.com/users/ianoc/orgs","repos_url":"https://api.github.com/users/ianoc/repos","events_url":"https://api.github.com/users/ianoc/events{/privacy}","received_events_url":"https://api.github.com/users/ianoc/received_events","type":"User","site_admin":false},"body":"Still in real world testing though has unit tests here. Not for merging yet. Want to solidify on the API and migrate some/all of our internal usages of JDBC to it to verify it covers all cases properly. \r\n\r\nto be contributed also is a sibling source+tap combo that uses the method outlined @ http://www.vertica.com/2012/07/05/teaching-the-elephant-new-tricks/ with vertica. Over jdbc its been 80x faster for people(the api, not my code), and also is inside one transaction. This portion is functional but I want to hammer on it a bit in the real world before trying to place in scalding. \r\n\r\nSample usage:\r\n\r\n```\r\nimport com.twitter.scalding.macros._\r\nimport MacroImplicits._\r\nimport com.twitter.scalding.jdbc._\r\nimport com.twitter.scalding.jdbc.macros._\r\nimport com.twitter.scalding.macros._\r\n\r\nval cc = ConnectionConfig(\r\n    ConnectUrl(\"jdbc:mysql://yourmysqlserver:3306/scaldingtestdb\"),\r\n    UserName(\"your username\"),\r\n    Password(\"yourpassword\"),\r\n    Adapter(\"mysql\"))\r\n\r\ncase class TypedSource1(\r\n  date_id: Int,\r\n  @size(64) user_name: String,\r\n  age: Int,\r\n  @size(22) gender: String = \"male\")\r\n\r\ncase class TypedSource1JdbcSource() extends TypedJDBCSource[TypedSource1(TableName(\"helloWorld\"), cc)\r\n\r\nTypedPipe.from(List(TypedSource1(1234, \"asdf\", 13))).save(TypedSource1JdbcSource())\r\n```","created_at":"2015-01-01T02:33:36Z","updated_at":"2015-01-02T19:25:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"504522ddbdc30e544b617f09a0e73ff17963065b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/scalding/pulls/1149/commits","review_comments_url":"https://api.github.com/repos/twitter/scalding/pulls/1149/comments","review_comment_url":"https://api.github.com/repos/twitter/scalding/pulls/comments/{number}","comments_url":"https://api.github.com/repos/twitter/scalding/issues/1149/comments","statuses_url":"https://api.github.com/repos/twitter/scalding/statuses/b18bdcffdd96050d68969d73910881fcf979b34a","head":{"label":"twitter:jdbcMacros2","ref":"jdbcMacros2","sha":"b18bdcffdd96050d68969d73910881fcf979b34a","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":3146558,"name":"scalding","full_name":"twitter/scalding","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/scalding","description":"A Scala API for Cascading","fork":false,"url":"https://api.github.com/repos/twitter/scalding","forks_url":"https://api.github.com/repos/twitter/scalding/forks","keys_url":"https://api.github.com/repos/twitter/scalding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/scalding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/scalding/teams","hooks_url":"https://api.github.com/repos/twitter/scalding/hooks","issue_events_url":"https://api.github.com/repos/twitter/scalding/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/scalding/events","assignees_url":"https://api.github.com/repos/twitter/scalding/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/scalding/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/scalding/tags","blobs_url":"https://api.github.com/repos/twitter/scalding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/scalding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/scalding/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/scalding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/scalding/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/scalding/languages","stargazers_url":"https://api.github.com/repos/twitter/scalding/stargazers","contributors_url":"https://api.github.com/repos/twitter/scalding/contributors","subscribers_url":"https://api.github.com/repos/twitter/scalding/subscribers","subscription_url":"https://api.github.com/repos/twitter/scalding/subscription","commits_url":"https://api.github.com/repos/twitter/scalding/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/scalding/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/scalding/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/scalding/issues/comments/{number}","contents_url":"https://api.github.com/repos/twitter/scalding/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/scalding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/scalding/merges","archive_url":"https://api.github.com/repos/twitter/scalding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/scalding/downloads","issues_url":"https://api.github.com/repos/twitter/scalding/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/scalding/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/scalding/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/scalding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/scalding/labels{/name}","releases_url":"https://api.github.com/repos/twitter/scalding/releases{/id}","created_at":"2012-01-10T16:22:08Z","updated_at":"2015-01-02T04:43:40Z","pushed_at":"2015-01-01T02:30:08Z","git_url":"git://github.com/twitter/scalding.git","ssh_url":"git@github.com:twitter/scalding.git","clone_url":"https://github.com/twitter/scalding.git","svn_url":"https://github.com/twitter/scalding","homepage":"http://twitter.com/scalding","size":18652,"stargazers_count":1867,"watchers_count":1867,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":419,"mirror_url":null,"open_issues_count":202,"forks":419,"open_issues":202,"watchers":1867,"default_branch":"develop"}},"base":{"label":"twitter:develop","ref":"develop","sha":"b97558e7870be5eeddd6fea15c6ac27b4873112f","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":3146558,"name":"scalding","full_name":"twitter/scalding","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/scalding","description":"A Scala API for Cascading","fork":false,"url":"https://api.github.com/repos/twitter/scalding","forks_url":"https://api.github.com/repos/twitter/scalding/forks","keys_url":"https://api.github.com/repos/twitter/scalding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/scalding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/scalding/teams","hooks_url":"https://api.github.com/repos/twitter/scalding/hooks","issue_events_url":"https://api.github.com/repos/twitter/scalding/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/scalding/events","assignees_url":"https://api.github.com/repos/twitter/scalding/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/scalding/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/scalding/tags","blobs_url":"https://api.github.com/repos/twitter/scalding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/scalding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/scalding/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/scalding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/scalding/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/scalding/languages","stargazers_url":"https://api.github.com/repos/twitter/scalding/stargazers","contributors_url":"https://api.github.com/repos/twitter/scalding/contributors","subscribers_url":"https://api.github.com/repos/twitter/scalding/subscribers","subscription_url":"https://api.github.com/repos/twitter/scalding/subscription","commits_url":"https://api.github.com/repos/twitter/scalding/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/scalding/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/scalding/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/scalding/issues/comments/{number}","contents_url":"https://api.github.com/repos/twitter/scalding/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/scalding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/scalding/merges","archive_url":"https://api.github.com/repos/twitter/scalding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/scalding/downloads","issues_url":"https://api.github.com/repos/twitter/scalding/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/scalding/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/scalding/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/scalding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/scalding/labels{/name}","releases_url":"https://api.github.com/repos/twitter/scalding/releases{/id}","created_at":"2012-01-10T16:22:08Z","updated_at":"2015-01-02T04:43:40Z","pushed_at":"2015-01-01T02:30:08Z","git_url":"git://github.com/twitter/scalding.git","ssh_url":"git@github.com:twitter/scalding.git","clone_url":"https://github.com/twitter/scalding.git","svn_url":"https://github.com/twitter/scalding","homepage":"http://twitter.com/scalding","size":18652,"stargazers_count":1867,"watchers_count":1867,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":419,"mirror_url":null,"open_issues_count":202,"forks":419,"open_issues":202,"watchers":1867,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1149"},"html":{"href":"https://github.com/twitter/scalding/pull/1149"},"issue":{"href":"https://api.github.com/repos/twitter/scalding/issues/1149"},"comments":{"href":"https://api.github.com/repos/twitter/scalding/issues/1149/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1149/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/scalding/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/twitter/scalding/pulls/1149/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/scalding/statuses/b18bdcffdd96050d68969d73910881fcf979b34a"}}}}