0

I have a table "base" imported from RDMS having columns:

station_num int(11), zipcode varchar(255), city varchar(255), state varchar(255)

Now I want to export just two columns from table "base" i.e. state and station_num in the same order from this table using sqoop as my output table "baseoutput" has columns: stat varchar(255), num int(11)

Command which I used:

sqoop export --connect jdbc:mysql://localhost/loudacre --username training -P --table base --export-dir /user/trail/basestations --columns num,stat

I'm not getting the expected result.

craigcaulfield
  • 3,381
  • 10
  • 32
  • 40
  • Could you please elaborate “Not getting expected results”. You should have your output table created upfront and order of columns should match between columns argument in sqoop command and output table columns – gbharat May 22 '18 at 07:04
  • I'm trying to export only limited columns as I have fewer columns in the output table than the input. – Shrenik May 24 '18 at 04:01
  • what version of sqoop you are using, and also please provide logs if you have any. I see there was issue using - - columns argument in sqoop export in previous releases of sqoop, in 1.4.1 below versions - - columns argument for export was not mentioned in documentation and later versions it was added. I suspect it might not be working if you are using old version of sqoop – gbharat May 25 '18 at 04:38

0 Answers0