Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/22/2024 10:13 AM
Hi Team,
Getting below error while running the query in Analytics but its working as expected in Data Analyzer.
Error: Only underscore('_') is allowed in dynamic attribute names
We expect the output to be in the following format: [ {"Id" : A18XXXM} {"Id" : V18XXXK} ]
Please assist us with the query, as we suspect there may be an issue with the CONCAT condition.
We are using below query:
Select
Concat('[',
Group_Concat( Distinct Concat('{"Id": ', Name, ' }')
Separator ' , '), ']') As Account_Name
from
(SELECT
a.NAME
FROM
ACCOUNTS A
JOIN account_entitlements1 ae1 ON A.ACCOUNTKEY = ae1.ACCOUNTKEY
JOIN Entitlement_values ev ON ev.entitlement_valuekey = ae1.entitlement_valuekey
WHERE
ev.ENTITLEMENT_VALUE ='CN=ADB-Users,XXX,DC=com'
Union
SELECT
a.NAME
FROM
ACCOUNTS A
JOIN account_entitlements1 ae1 ON A.ACCOUNTKEY = ae1.ACCOUNTKEY
JOIN Entitlement_values ev ON ev.entitlement_valuekey = ae1.entitlement_valuekey
WHERE
a.Name ='BC32') AS Account_Name
Thanks,
Gopinath
Solved! Go to Solution.
10/22/2024 10:39 AM - edited 10/22/2024 10:41 AM
{ is treated as dynamic value in analytics
SELECT Concat('[', Group_concat(DISTINCT Concat('ccc"Id": ', name, ' cc') SEPARATOR
' , ')
, ']') AS Account_Name
FROM (SELECT a.name
FROM accounts A
JOIN account_entitlements1 ae1
ON A.accountkey = ae1.accountkey
JOIN entitlement_values ev
ON ev.entitlement_valuekey = ae1.entitlement_valuekey
WHERE ev.entitlement_value = 'CN=ADB-Users,XXX,DC=com'
UNION
SELECT a.name
FROM accounts A
JOIN account_entitlements1 ae1
ON A.accountkey = ae1.accountkey
JOIN entitlement_values ev
ON ev.entitlement_valuekey = ae1.entitlement_valuekey
WHERE a.name = 'BC32') AS Account_Name
10/23/2024 02:53 AM
Hi @rushikeshvartak ,
Now query working in analytics. But we are not getting result as below.
We expect the output to be in the following format: [ {"Id" : A18XXXM} {"Id" : V18XXXK} ]
can you suggest to getting result like above.