- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Sqoop: What happens if both the --query and --columns parameters are present in the Sqoop command? Will one override the other?
- Labels:
-
Apache Sqoop
Created ‎11-08-2016 05:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎11-11-2016 01:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As with all "interesting" questions like this, the best answer is to try it and see for yourself. My hypothesis was that sqoop would report these directives are incompatible with each other and I was glad to see that was what happened when I gave it a try myself.
[root@sandbox Lab3.1]# sqoop import --connect jdbc:mysql://sandbox/test?user=root --table salaries --columns gender,age --query "select * from salaries s where s.salary > 90000.00 and \$CONDITIONS" --split-by gender -m 2 --target-dir willItWork 16/11/11 08:22:34 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.3.2.0-2950 Cannot specify --query and --table together. Try --help for usage instructions. [root@sandbox Lab3.1]#
Created ‎11-11-2016 01:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As with all "interesting" questions like this, the best answer is to try it and see for yourself. My hypothesis was that sqoop would report these directives are incompatible with each other and I was glad to see that was what happened when I gave it a try myself.
[root@sandbox Lab3.1]# sqoop import --connect jdbc:mysql://sandbox/test?user=root --table salaries --columns gender,age --query "select * from salaries s where s.salary > 90000.00 and \$CONDITIONS" --split-by gender -m 2 --target-dir willItWork 16/11/11 08:22:34 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.3.2.0-2950 Cannot specify --query and --table together. Try --help for usage instructions. [root@sandbox Lab3.1]#
