Sqoop Import Create File Name with Date -
i working on sqoop script want create target directory current date. have options in sqoop --target-dir /dir1/$date. if so, exact syntax?
you can't directly add $date sqoop can use shell script , pass parameters in shell script e.g.
# -----------myscript.sh------------------ date=`date` echo sqoop import --connect jdbc:db2://localhost:<port_number>/<db> --table table_name --username user -password pass -m 1 --target-dir /user/$date #------------end script----------------------
now
add permission script file
chmod 777 myscript.sh
run script file
./myscript.sh
Comments
Post a Comment