Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Sqoop export with HCatalog, getting NULLs for datetime columns


Copy link to this message
-
Re: Sqoop export with HCatalog, getting NULLs for datetime columns
Sqoop is a map reduce job and you typically get nulls when there is a
mismatch of data type and file content, try changing the small int in your
table definition to string.

Regards
Sunita

On Tuesday, January 7, 2014, Vengala Reddy wrote:

> I am trying to export HDFS data into SQL Server with Sqoop and HCatalog.
>
>
> sqoop export --verbose --connect
> 'jdbc:sqlserver://ras-sql-q20.qa.c000.local\mssql2012;
> database=IBCDW;username=sqoop;password=sqoop'
> --table stgROLE --hcatalog-database ibcods --hcatalog-table care_role2.
>
>
> CREATE EXTERNAL TABLE IF NOT EXISTS care_role(
> client_id SMALLINT COMMENT 'The unique ID of the client sending files.  The
> client will be supplied this number when originally setting up file
> submissions.'
> ,care_role_id STRING
> ,care_role_desc STRING
> ,rec_load_dttm STRING
> ,rec_last_upd_dttm STRING
> ,rec_del_ind STRING
> )
> COMMENT 'A function performed by a physician on behalf of the member.'
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
> STORED AS SEQUENCEFILE
>
>
> The below columns are datetime in SQL Server.
> ,rec_load_dttm datetime
> ,rec_last_upd_dttm datetime
>
> When I export data, datetime fileds are getting populated as NULL values.
>
> Please help me on this.
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB