Member since
10-18-2017
2
Posts
1
Kudos Received
0
Solutions
10-23-2017
07:41 AM
1 Kudo
@mqureshi Thanks for your inputs 🙂 I would like to add that maybe instead of long value, the field is receiving NULL value. Explaining my problem in detail below: Stated below is an outline of the code I'm using: insert overwrite table db.test_tbl
named_struct('end_customers_d_party_id',A.end_customers_d_party_id,'dv_cr_party_id',B.dv_cr_party_id,'original_sales_order',A.original_sales_order) as key,
case when A.manager_name is not NULL OR A.manager_name <> '' OR length(A.manager_name) > 0 then A.manager_name else '' end as manager_name,
case when G.cec_id is not NULL OR G.cec_id <> '' OR length(G.cec_id) > 0 then G.cec_id else '' end as cec_id,
case when G.primary_name is not NULL OR G.primary_name <> '' OR length(G.primary_name) > 0 then G.primary_name else '' end as primary_name,
case when E.cse_id is not NULL OR E.cse_id <> '' OR length(E.cse_id) > 0 then E.cse_id else '' end as cse_id,
case when C.companyname is not NULL OR C.companyname <> '' OR length(C.companyname) > 0 then C.companyname else '' end as companyname,
case when A.product_id is not NULL OR A.product_id <> '' OR length(A.product_id) > 0 then A.product_id else '' end as product_id
from db.amp_provision C
INNER JOIN db.table1 A
ON TRIM(C.guid) = TRIM(A.guid)
INNER JOIN db.table2 D
ON TRIM(C.guid) = TRIM(D.guid)
INNER JOIN db.table3 AUL
ON TRIM(C.guid) = TRIM(AUL.guid)
JOIN db.table4 B
ON TRIM (A.original_sales_order) = B.sales_order_num
AND B.offer_code= 'X'
INNER JOIN db.table5 E
ON TRIM (C.guid) = TRIM(E.offer_reference_id)
INNER JOIN db.table6 F
ON B.dv_cr_party_id = F.cr_party_id
AND E.cse_id = F.cs_ent_cust_id
AND E.offer_name = 'X' The issue that happened that column cse_id came as null for one of the persistent customers, because that customer was getting dropped based on the last join E.cse_id = F.cs_ent_cust_id and was not at all present in table5. (The same value is present in all other tables from 1 to 4) My question now is how can overcome this. I want to persist some customers based on their cse_id; irrespective of its presence in table5 which has high chances of dropping few customers every time its refreshed. Using a LEFT JOIN with table5 causes VERTEX FAILURE in hive run. And the error is posted above. Kindly help with a sturdy solution out of this. I'm happy to explain the above issue in more detail, if required. THANKS ALL !!! 🙂 Swati
... View more