load_from_hcatalog --- error while selecting Varchar,Date,Timestamp column

Aster
Enthusiast

load_from_hcatalog --- error while selecting Varchar,Date,Timestamp column

Hi All,

We are trying to read data from Hive table and load into teradata table after lots of transformation. So, we are trying to use "load_from_hcatalog". But while selecting data, we are getting below error:

*** Error 7827 Java SQL Exception SQLSTATE 39001: Invalid SQL state ([TD- SQLH]: java.lang.TypeNotPresentException: Type timestamp not present).

We have teradata version as 14.10 and Hortonworks distribution.

Below is our table structure:

hive> desc formatted default.ticket_solution_ref_current_tst;
OK
# col_name data_type comment

ticket_solution_id int
ticket_solution_name varchar(255)
ticket_solution_desc varchar(255)
ticket_solution_category_name varchar(30)
ticket_solution_subcategory_name varchar(30)
ticket_solution_cdv_ind tinyint
ticket_solution_hsi_ind tinyint
ticket_solution_video_ind tinyint
audit_job_id int
audit_information_source_cd varchar(10)
audit_created_by_user_id varchar(30)
audit_updated_by_user_id varchar(30)
audit_inserted_ts timestamp
audit_updated_ts timestamp
current_record_ind char(1)
eff_dt date
eff_ts timestamp
exp_ts timestamp

# Partition Information
# col_name data_type comment

exp_dt string

Below is the query we are using from bteq prompt:

SELECT
ticket_solution_id,
ticket_solution_name,
ticket_solution_desc,
ticket_solution_category_name,
ticket_solution_subcategory_name,
ticket_solution_cdv_ind,
ticket_solution_hsi_ind,
ticket_solution_video_ind,
audit_job_id,
audit_information_source_cd,
audit_created_by_user_id,
audit_updated_by_user_id,
audit_inserted_ts,
audit_updated_ts,
current_record_ind,
eff_dt,
eff_ts,
exp_ts
FROM load_from_hcatalog(
USING
server('HiveMetaStoreHost')
port('HiveMetaStorePort')
username('UserName')
dbname('DataBaseName')
tablename('SourceTableName')
columns('*')
templeton_port('TemplateonPort')
) as dt;
*** Error 7827 Java SQL Exception SQLSTATE 39001: Invalid SQL state ([TD-
SQLH]: java.lang.TypeNotPresentException: Type timestamp not present).
*** Total elapsed time was 1 second.

Our observation is, when we are changing the datatype from Varchar/Timestamp/Date to String, query using "load_from_hcatalog" is working fine. But it's not able to support Varchar/Timestamp/Date.

Can you please help us regarding the issue?

Thanks & Regards,

Arpan


1 REPLY
Enthusiast

Re: load_from_hcatalog --- error while selecting Varchar,Date,Timestamp column

Hi All,

Can you please help us om load_from_hcatalog issue we are facing?

Thanks in advance.

Arpan.