AnsweredAssumed Answered

Issue with date field while scooping data from oracle

Question asked by sonalitotade on Mar 11, 2016
Latest reply on Mar 24, 2016 by sonalitotade

votefavorite

 

 

I am trying to scoop import Date column from oracle database to Avro format. Below is the sample on how I am executing.

My options file content

--target-dir /.. /
--delete-target-dir
--as-avrodatafile
--query Select chg_ts from abc
--map-column-java chg_ts=String

My scoop import contains

sqoop import -D oraoop.timestamp.string=false --options-file $1 --options-file $2 --fetch-size=0 -m 1 --mapreduce-job-name $job_name"_"$instance

After doing the above steps I am still getting the date as "type" : [ "null", "long" ] in avro file and takes Bigint in Hive.

Please guide me if I am missing something here.

Outcomes