sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarek Jarcec Cecho <jar...@apache.org>
Subject Re: SQOOP-1493: Add ability to import/export true decimal in Avro instead of serializing
Date Mon, 18 Apr 2016 14:15:02 GMT
Hi Zuo,
this kind of question is best asked on our user mailing list. Please see [1] for instructions
how to sign up.

To answer your question, SQOOP-1493 is not changing the mapping by default as that would broke
backward compatibility. You need to explicitly enable the behavior with sqoop.avro.logical_types.decimal.enable
property, for example:

sqoop import -Dsqoop.avro.logical_types.decimal.enable=true —connect ...

Jarcec

Links:
1: http://sqoop.apache.org/mail-lists.html

> On Apr 16, 2016, at 1:11 AM, WANG Zuo (王佐) <wangzuo3@wanda.cn> wrote:
> 
> Hi, Jarcec
>  
> I want to import table in Sql Server to Hive using option –as-parquetfile. And I want
columns of Number format to be mapped to Decimal format in Hive, instead of String format
as it’s the case now in Sqoop 1.4.6.
> I apply the patch to Sqoop 1.4.6. But I found the column of Number format in Sql Server
is not mapped to Decimal format in Hive. Below is my my command below:
>  
>          sqoop import --connect 'jdbc:sqlserver://10.199.84.60;username=####;password=####;database=####'
--table $table \
>          --hive-import --hive-drop-import-delims --hive-overwrite --create-hive-table
--hive-database dw_plaza --hive-table $hive_table --null-string '\\N' --null-non-string '\\N'
\
>          --fields-terminated-by '\001' --lines-terminated-by '\n' --m 1 --as-parquetfile
>  
> Could you please tell why it doesn’t work or my problem is not supposed to be solved
by this patch?
>  
> Best Regards,
> Zuo


Mime
View raw message