Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop, mail # dev - Review Request: SQOOP-503 --columns argument support for export


Copy link to this message
-
Review Request: SQOOP-503 --columns argument support for export
Cheolsoo Park 2012-06-17, 04:36

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5342/
-----------------------------------------------------------

Review request for Sqoop, Bilung Lee and Jarek Cecho.
Description
-------

Currently, Sqoop complains about --columns option if used with export:

ERROR tool.BaseSqoopTool: Error parsing arguments for export:
ERROR tool.BaseSqoopTool: Unrecognized argument: --columns

Adding the --columns option to ExportTool fixes the problem.
This addresses bug SQOOP-503.
    https://issues.apache.org/jira/browse/SQOOP-503
Diffs
-----

  /src/java/org/apache/sqoop/tool/ExportTool.java 1351025
  /src/test/com/cloudera/sqoop/TestExport.java 1351025

Diff: https://reviews.apache.org/r/5342/diff/
Testing
-------

1) Added a unit test to the TestExport suite as follows:

- Create a table that has col0, col1, and col2.
- Generate an input file that only contains col0 and col2.
- Run export with --columns col0,col2.
- Verify col0 and col2 are exported to the DB.
- Verify col1 remains null in the DB.

2) Ran ant test, ant test -Dthridpary=true, and ant checkstyle.
Thanks,

Cheolsoo Park