Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Sqoop import using last-value from a hdfs file

avatar
New Contributor
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