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.

Value of Date type column is getting decremented with two day on sqooping the data from SQL server to Hive

Value of Date type column is getting decremented with two day on sqooping the data from SQL server to Hive

New Contributor

I have one table in database where insertdate is of 'Date' type. However when I import the table into hive using sqoop values in hive tables are getting decremneted.

Example. RDBMS --> insertdate='2013-04-01'

Hive --> insertdate='2013-03-30'

I have used below command to import data:

sqoop import --connect 'jdbc:sqlserver://localhost;username=XXXXX;password=XXXXXXX;database=XXXXXXXXXX'--table tbl_name \ --warehouse-dir /user/hive/warehouse --m 1 \ --hive-import --hive-database db_name --hive-overwrite --null-string '\\N' --null-non-string '\\N' --hive-drop-import-delims

2 REPLIES 2
Highlighted

Re: Value of Date type column is getting decremented with two day on sqooping the data from SQL server to Hive

Mentor

You need to review timezone settings on sql server and on your cluster, you might have discrepancy with GMT vs local timezone.

Highlighted

Re: Value of Date type column is getting decremented with two day on sqooping the data from SQL server to Hive

New Contributor

I have cheked timestamp on cluster as well as on SQL server ,both are in IST timezone.Is there any other possibility?

Don't have an account?
Coming from Hortonworks? Activate your account here