Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Sqoop import using last-value from a hdfs file

avatar
I was trying to sqoop data using --last-value property whose value will be read from a hdfs file.

the hdfs file has following content-
'1900-01-01 00:00:00.000'

mylastValue=`hadoop fs -cat propertiesFile.txt`

when I use --last-value ${mylastValue}

The sqoop argument splits at the space in the lastValue passed and I get Error parsing arguments.
1 ACCEPTED SOLUTION

avatar
Mentor
This is a shell behaviour, not Sqoop.

"When referencing a variable, it is generally advisable to enclose its name
in double quotes."

"Use double quotes to prevent word splitting. An argument enclosed in
double quotes presents itself as a single word, even if it contains
whitespace separators."

- http://tldp.org/LDP/abs/html/quotingvar.html

View solution in original post

1 REPLY 1

avatar
Mentor
This is a shell behaviour, not Sqoop.

"When referencing a variable, it is generally advisable to enclose its name
in double quotes."

"Use double quotes to prevent word splitting. An argument enclosed in
double quotes presents itself as a single word, even if it contains
whitespace separators."

- http://tldp.org/LDP/abs/html/quotingvar.html