HIVE_CURSOR_ERROR: incorrect data check
This query ran against the "dbreport" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 1ba2a03e-aea9-4305-a4dc-9f9da5a05f46.
This is my first time using the forum, but my error message I should post here and include the Query Id above.
The above came from an automated process that ran successfully every day for a few weeks. Then about a week ago it started generating the above error every day since. I don't believe anything changed on the code or process side, so I'm not sure why this broke.
Below is the query producing the error.
select
session_id,
cid,
domain_nm,
case when calc_sub_domain like '%.%.%.%' then split_part(calc_sub_domain, '.', 3) || '.' || split_part(calc_sub_domain, '.', 4)
when calc_sub_domain like '%.%.%' then split_part(calc_sub_domain, '.', 2) || '.' || split_part(calc_sub_domain, '.', 3)
else calc_sub_domain end calc_domain,
calc_sub_domain,
end_dt,
click_from_email_ind,
page_ct,
best_email_key,
best_email_src_cd,
best_email_group,
best_email_technique,
best_email_source_flag,
best_email_opt_status,
best_email_capture_context,
best_email_click_thru_ind,
best_email_conf_score,
best_email_match_score,
hmid,
hmid_src_cd,
hmid_group,
hmid_technique,
hmid_source_flag,
hmid_opt_status,
hmid_capture_context,
hmid_click_thru_ind,
hmid_conf_score,
hmid_match_score,
browse_total_ct,
cart_created_ind,
cart_total_ct,
order_placed_ind,
order_id,
order_amt,
order_product_ct,
platform_application,
platform_device,
platform_os,
first_page_url,
to_db_dttm
from
(
select
session_id,
cid,
domain_nm,
replace(split_part(split_part(split_part(lower(trim(first_page_url)), '?', 1), '/', 3), ':', 1), 'www.', '') calc_sub_domain,
end_dt,
click_from_email_ind,
page_ct,
best_email_key,
best_email_src_cd,
nullif(split_part(best_email_src_cd, '|', 1), '') best_email_group,
nullif(split_part(best_email_src_cd, '|', 2), '') best_email_technique,
nullif(split_part(best_email_src_cd, '|', 3), '') best_email_source_flag,
nullif(split_part(best_email_src_cd, '|', 4), '') best_email_opt_status,
nullif(split_part(best_email_src_cd, '|', 5), '') best_email_capture_context,
nullif(split_part(best_email_src_cd, '|', 6), '') best_email_click_thru_ind,
best_email_conf_score,
nullif(split_part(best_email_src_cd, '|', 8), '') best_email_match_score,
hmid,
hmid_src_cd,
nullif(split_part(hmid_src_cd, '|', 1), '') hmid_group,
nullif(split_part(hmid_src_cd, '|', 2), '') hmid_technique,
nullif(split_part(hmid_src_cd, '|', 3), '') hmid_source_flag,
nullif(split_part(hmid_src_cd, '|', 4), '') hmid_opt_status,
nullif(split_part(hmid_src_cd, '|', 5), '') hmid_capture_context,
nullif(split_part(hmid_src_cd, '|', 6), '') hmid_click_thru_ind,
hmid_conf_score,
nullif(split_part(hmid_src_cd, '|', 8), '') hmid_match_score,
cast(browse_total_ct as integer) browse_total_ct,
cart_created_ind,
cast(cart_total_ct as integer) cart_total_ct,
order_placed_ind,
order_id,
order_amt,
cast(order_product_ct as integer) order_product_ct,
platform_application,
platform_device,
platform_os,
first_page_url,
to_db_dttm,
row_number () over (partition by session_id order by to_db_dttm desc) rnum
from dbreport.rpt_session_base_view
-- where case when length(session_id) = 60 then 1 else 0 end = 1
)
where rnum = 1
;
Thank you for the information, Aishwarya. I was able to trace the problem to a corrupt file. I appreciate the help.