{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments/145589613","pull_request_review_id":70411341,"id":145589613,"diff_hunk":"@@ -179,11 +179,16 @@ def _import_cmd(self, target_dir, append, file_type, split_by, direct,\n         if driver:\n             cmd += [\"--driver\", driver]\n \n+        if extra_import_options:\n+            for key, value in extra_import_options.items():\n+                cmd += ['--{}'.format(key)]\n+                if value: cmd += [value]\n+\n         return cmd\n \n-    def import_table(self, table, target_dir, append=False, file_type=\"text\",\n+    def import_table(self, table, target_dir=None, append=False, file_type=\"text\",","path":"airflow/contrib/hooks/sqoop_hook.py","position":98,"original_position":98,"commit_id":"cb83e4732be333118d4c8966fbdb372e2e67b7a0","original_commit_id":"cb83e4732be333118d4c8966fbdb372e2e67b7a0","user":{"login":"Acehaidrey","id":10408007,"avatar_url":"https://avatars0.githubusercontent.com/u/10408007?v=4","gravatar_id":"","url":"https://api.github.com/users/Acehaidrey","html_url":"https://github.com/Acehaidrey","followers_url":"https://api.github.com/users/Acehaidrey/followers","following_url":"https://api.github.com/users/Acehaidrey/following{/other_user}","gists_url":"https://api.github.com/users/Acehaidrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Acehaidrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acehaidrey/subscriptions","organizations_url":"https://api.github.com/users/Acehaidrey/orgs","repos_url":"https://api.github.com/users/Acehaidrey/repos","events_url":"https://api.github.com/users/Acehaidrey/events{/privacy}","received_events_url":"https://api.github.com/users/Acehaidrey/received_events","type":"User","site_admin":false},"body":"`target_dir` should be optional\r\n\r\nadd the option to pass in extra import arguments that sqoop offers. There are many options that sqoop offers that aren't part of the SqoopOperator and there should be a way to pass those in.","created_at":"2017-10-19T02:47:45Z","updated_at":"2017-10-19T02:47:45Z","html_url":"https://github.com/apache/incubator-airflow/pull/2703#discussion_r145589613","pull_request_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments/145589613"},"html":{"href":"https://github.com/apache/incubator-airflow/pull/2703#discussion_r145589613"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703","id":147454960,"html_url":"https://github.com/apache/incubator-airflow/pull/2703","diff_url":"https://github.com/apache/incubator-airflow/pull/2703.diff","patch_url":"https://github.com/apache/incubator-airflow/pull/2703.patch","issue_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2703","number":2703,"state":"open","locked":false,"title":"[AIRFLOW-1734] bux fixes in Sqoop hook/operator and adding options","user":{"login":"Acehaidrey","id":10408007,"avatar_url":"https://avatars0.githubusercontent.com/u/10408007?v=4","gravatar_id":"","url":"https://api.github.com/users/Acehaidrey","html_url":"https://github.com/Acehaidrey","followers_url":"https://api.github.com/users/Acehaidrey/followers","following_url":"https://api.github.com/users/Acehaidrey/following{/other_user}","gists_url":"https://api.github.com/users/Acehaidrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Acehaidrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acehaidrey/subscriptions","organizations_url":"https://api.github.com/users/Acehaidrey/orgs","repos_url":"https://api.github.com/users/Acehaidrey/repos","events_url":"https://api.github.com/users/Acehaidrey/events{/privacy}","received_events_url":"https://api.github.com/users/Acehaidrey/received_events","type":"User","site_admin":false},"body":"Dear Airflow maintainers,\r\n\r\nPlease accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!\r\n\r\n\r\n### JIRA\r\n- [x] My PR addresses the following [Airflow 1734](https://issues.apache.org/jira/browse/AIRFLOW-1734) issues and references them in the PR title. It's in regards to the Sqoop Operator and Hook and how it contains logic errors & needs options to pass more sqoop options.\r\n\r\n\r\n### Description\r\n- [x] Here are some details about my PR, including screenshots of any UI changes:\r\nAfter taking a look at the Sqoop Operator I have found a number of errors with it. It includes assigning wrong parameters, not hiding the users raw password in the logs (though a method to do that had been created in the hook, wrong if conditions, and the inability to add other Sqoop options that would make sense to have the option to pass those.\r\n\r\nI will also make notes in the exact places in the code where I noticed these mishaps.\r\n\r\nI have made some remarks in past commits about it too in the case I'm misinterpreting but regardless there are definitely errors.\r\nhttps://github.com/apache/incubator-airflow/pull/2177#pullrequestreview-70046796\r\n\r\n### Tests\r\n- [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:\r\nThere are tests that already exist.\r\n\r\n### Commits\r\n- [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from \"[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)\":\r\n    1. Subject is separated from body by a blank line\r\n    2. Subject is limited to 50 characters\r\n    3. Subject does not end with a period\r\n    4. Subject uses the imperative mood (\"add\", not \"adding\")\r\n    5. Body wraps at 72 characters\r\n    6. Body explains \"what\" and \"why\", not \"how\"\r\n\r\n","created_at":"2017-10-19T02:38:06Z","updated_at":"2017-10-19T02:47:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41714333d21ad54ef33a4490f5c7773e7c305fb7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2703/comments","statuses_url":"https://api.github.com/repos/apache/incubator-airflow/statuses/cb83e4732be333118d4c8966fbdb372e2e67b7a0","head":{"label":"Acehaidrey:sqoop_contrib_fixes","ref":"sqoop_contrib_fixes","sha":"cb83e4732be333118d4c8966fbdb372e2e67b7a0","user":{"login":"Acehaidrey","id":10408007,"avatar_url":"https://avatars0.githubusercontent.com/u/10408007?v=4","gravatar_id":"","url":"https://api.github.com/users/Acehaidrey","html_url":"https://github.com/Acehaidrey","followers_url":"https://api.github.com/users/Acehaidrey/followers","following_url":"https://api.github.com/users/Acehaidrey/following{/other_user}","gists_url":"https://api.github.com/users/Acehaidrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Acehaidrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acehaidrey/subscriptions","organizations_url":"https://api.github.com/users/Acehaidrey/orgs","repos_url":"https://api.github.com/users/Acehaidrey/repos","events_url":"https://api.github.com/users/Acehaidrey/events{/privacy}","received_events_url":"https://api.github.com/users/Acehaidrey/received_events","type":"User","site_admin":false},"repo":{"id":94568127,"name":"incubator-airflow","full_name":"Acehaidrey/incubator-airflow","owner":{"login":"Acehaidrey","id":10408007,"avatar_url":"https://avatars0.githubusercontent.com/u/10408007?v=4","gravatar_id":"","url":"https://api.github.com/users/Acehaidrey","html_url":"https://github.com/Acehaidrey","followers_url":"https://api.github.com/users/Acehaidrey/followers","following_url":"https://api.github.com/users/Acehaidrey/following{/other_user}","gists_url":"https://api.github.com/users/Acehaidrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Acehaidrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acehaidrey/subscriptions","organizations_url":"https://api.github.com/users/Acehaidrey/orgs","repos_url":"https://api.github.com/users/Acehaidrey/repos","events_url":"https://api.github.com/users/Acehaidrey/events{/privacy}","received_events_url":"https://api.github.com/users/Acehaidrey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Acehaidrey/incubator-airflow","description":"Apache Airflow (Incubating)","fork":true,"url":"https://api.github.com/repos/Acehaidrey/incubator-airflow","forks_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/forks","keys_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/teams","hooks_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/hooks","issue_events_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/issues/events{/number}","events_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/events","assignees_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/assignees{/user}","branches_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/branches{/branch}","tags_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/tags","blobs_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/languages","stargazers_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/stargazers","contributors_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/contributors","subscribers_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/subscribers","subscription_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/subscription","commits_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/contents/{+path}","compare_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/merges","archive_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/downloads","issues_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/issues{/number}","pulls_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/labels{/name}","releases_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/releases{/id}","deployments_url":"https://api.github.com/repos/Acehaidrey/incubator-airflow/deployments","created_at":"2017-06-16T17:45:50Z","updated_at":"2017-09-06T00:06:53Z","pushed_at":"2017-10-19T02:26:23Z","git_url":"git://github.com/Acehaidrey/incubator-airflow.git","ssh_url":"git@github.com:Acehaidrey/incubator-airflow.git","clone_url":"https://github.com/Acehaidrey/incubator-airflow.git","svn_url":"https://github.com/Acehaidrey/incubator-airflow","homepage":"","size":13593,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"b464d23a6d9799b75ae53b3f858e779a48115fed","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":33884891,"name":"incubator-airflow","full_name":"apache/incubator-airflow","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-airflow","description":"Apache Airflow (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-airflow","forks_url":"https://api.github.com/repos/apache/incubator-airflow/forks","keys_url":"https://api.github.com/repos/apache/incubator-airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-airflow/teams","hooks_url":"https://api.github.com/repos/apache/incubator-airflow/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-airflow/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-airflow/events","assignees_url":"https://api.github.com/repos/apache/incubator-airflow/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-airflow/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-airflow/tags","blobs_url":"https://api.github.com/repos/apache/incubator-airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-airflow/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-airflow/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-airflow/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-airflow/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-airflow/subscription","commits_url":"https://api.github.com/repos/apache/incubator-airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-airflow/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-airflow/merges","archive_url":"https://api.github.com/repos/apache/incubator-airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-airflow/downloads","issues_url":"https://api.github.com/repos/apache/incubator-airflow/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-airflow/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-airflow/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-airflow/deployments","created_at":"2015-04-13T18:04:58Z","updated_at":"2017-10-19T00:24:15Z","pushed_at":"2017-10-19T02:40:15Z","git_url":"git://github.com/apache/incubator-airflow.git","ssh_url":"git@github.com:apache/incubator-airflow.git","clone_url":"https://github.com/apache/incubator-airflow.git","svn_url":"https://github.com/apache/incubator-airflow","homepage":"","size":13687,"stargazers_count":6261,"watchers_count":6261,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1836,"mirror_url":null,"open_issues_count":314,"forks":1836,"open_issues":314,"watchers":6261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703"},"html":{"href":"https://github.com/apache/incubator-airflow/pull/2703"},"issue":{"href":"https://api.github.com/repos/apache/incubator-airflow/issues/2703"},"comments":{"href":"https://api.github.com/repos/apache/incubator-airflow/issues/2703/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2703/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-airflow/statuses/cb83e4732be333118d4c8966fbdb372e2e67b7a0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Acehaidrey"}}