Single Account Query cannot fetch '$(identity)'

Hello everybody,
I am working with JDBC connector, and faced an issue with a single account aggregation. The query for Single account is exactly the same as Account SQL Query, just added WHERE e.emp_id = '$(identity)'. The query is working in SQL Studio if I substitute e.emp_id with an actual value, like:
WHERE e.emp_id = '777777'
I checked the logs, and thats what I am getting:
image

I will attach the whole sql query just in case:

SELECT    e.emp_id, e.emp_login_nm,  e.emp_title_id,  e.emp_proc_grp_id,  e.emp_sec_group_id,  e.inactive_ind, e.emp_fname, e.emp_lname, e.emp_email, e.emp_phone, , e.emp_proc_id, e.emp_officer_id, e.appr_id, e.emp_officer_ind, e.emp_sys_user_yn, e.emp_new_user_yn, e.emp_external_yn, e.appr_g_role_type_id, e.emp_locale_id, e.emp_timezone_code, e.emp_deal_desicion_yn, e.emp_official_yn, case when e.inactive_ind IS NOT NULL then 'true'  else 'false' end as IIQDisabled, t.pos_desc
,CASE WHEN emp_officer_id IS NOT NULL then 'isOfficer_Y'ELSE 'isOfficer_N' END AS isOfficer_YN, affs.lgl_ent_id, l2.lgl_ent_val, rl.code_desc, appr_rel.appr_g_id
FROM [emp] e 
LEFT JOIN [sec_group] sg ON e.emp_sec_group_id = sg.secg_id
LEFT JOIN [legal_ent] l ON e.emp_lgl_ent_id = l.lgl_ent_id
LEFT JOIN internal_position t ON e.emp_title_id = t.pos_id
LEFT JOIN process_group p ON e.emp_proc_grp_id = p.proc_grp_id
LEFT JOIn emp_affiliate_rel affs ON e.emp_id = affs.emp_id
LEFT JOIN legal_ent l2 on affs.lgl_ent_id = l2.lgl_ent_id
LEFT JOIN code rl on e.appr_g_role_type_id = rl.code_id
LEFT JOIN emp_appr_rel appr_rel on e.emp_id = appr_rel.emp_id
LEFT JOIN approval_matrix a on appr_rel.appr_g_id = a.appr_id
WHERE e.emp_id = '$(identity)'

Please help, thanks in advance!

The picture was unclear, so essentially that is what I am getting:
WHERE e.emp_id = ?].

@pulatoi can you try instead of WHERE e.emp_id = ‘$(identity)’ to WHERE e.emp_id = ‘$getObject.nativeIdentity’. LMK if it works.

Thanks
Shantha Kumar

“exception_message”:“Conversion failed when converting the varchar value ‘$getObject.nativeIdentity’ to data type int.”},“stack”:“ccg”,“pod”:“stg02-useast1”,“connector-logging”:“163”,“Operation”:“GetObject”

This is weird, assuming that my native identity is string and not int, so why would it convert to int?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.