Command line: sqoop import --connect jdbc:mysql://server/db --username xxxx --password yyyy --options-file sql.txt --target-dir /data/test -m 1 --null-string '\\N' --null-non-string '\\N' --hive-import --hive-table phone
where sql.txt contains: --query select mobile, name where \$CONDITIONS from test does not work. What is wrong? - I tried putting different argument combinations in optios-file, all result in general error message from Sqoop. It would help if you could post an example of using options-file to pass select expression that works for you. On Tue, Mar 18, 2014 at 7:35 PM, Jarek Jarcec Cecho <[email protected]>wrote: > Are you perhaps looking for --options-file option? > > > http://sqoop.apache.org/docs/1.4.4/SqoopUserGuide.html#_using_options_files_to_pass_arguments > > Jarcec > > On Tue, Mar 18, 2014 at 05:34:41PM +0400, Darq Moth wrote: > > Hello, > > When importing data from MySQL to Hive I need to normalize several text > > fields containing phone numbers. This requires quite complex logic which > is > > hard to express in Sqoop command line with a single SQL replace function. > > Is it possible to specify SQL select expressions in a separate file and > > refer to it from a command line? > > > > Thanks! >
