Hi Darq Moth In your query from clause must precede the where clause Venkat
On Fri, Mar 21, 2014 at 3:28 AM, Darq Moth <[email protected]> wrote: > 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! > > -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.
