Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

decimal or java.BigDecimal support with Sqoop and AVRO or Parquet

decimal or java.BigDecimal support with Sqoop and AVRO or Parquet

New Contributor

hello, 

 

I am using CDH5.7.0 and sqoop to ingest data from Oracle to AVRO or Parquet (has not made my mind yet).

 

The problem I am having is with fixed precision numbers (decimal type e.g. number(12,4)) and sqoop creating schemas for these columns using string type.

 

I tried to explicitely use --map-column-java AMOUNT=java.math.BigDecimal or just Decimal and it does not work.

 

I do not really want to use float or double type as I need exact fixed precision as in the source.

 

I know that AVRO supports java.math.BigDecimal and also logical type for Decimal(n,n) so it must be a sqoop issue.

1 REPLY 1
Highlighted

Re: decimal or java.BigDecimal support with Sqoop and AVRO or Parquet

New Contributor

looks like this is addressed in sqoop 1.4.7

https://issues.apache.org/jira/browse/SQOOP-1493

 

the only question when it gets to CDH