Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Fetching Child Entitlement Value from Data Analyzer

vmudagal1
Regular Contributor
Regular Contributor

Hi Team, 

Could anyone please let know how I can fetch the Child Entitlement Value, Custom Properties using data analyzer? 

Currently I am able to fetch parent entitlement value, but not able to select child entitlement value column as well.

I would need the result to look like below:

Endpointname | ParentEntitlement | ChildEntitlement | ChildEntitlement_Custom Property12 | Accountname

Select
E.endpointname,
EV.entitlement_value as ParentEntitlement,
A.name
FROM
ENDPOINTS E,
entitlement_types ET,
entitlement_values EV,
entitlements2 EV2,
account_entitlements1 AE1,
accounts A
Where
E.endpointkey = ET.endpointkey
and EV.entitlementtypekey=ET.entitlementtypekey
and EV2.entitlement_value1key=EV.entitlement_valuekey
and EV.entitlement_valuekey=AE1.entitlement_valuekey
and AE1.accountkey=A.accountkey
and E.endpointkey='37'

Thanks, 

 

5 REPLIES 5

Dhruv_S
Saviynt Employee
Saviynt Employee

Please refer to the following post for tables related to the child entitlement values. Please let us know if you have further questions.

Solved: Query to find child entitlement. - Saviynt Forums - 28197

Regards,

Dhruv

vmudagal1
Regular Contributor
Regular Contributor

Hi @Dhruv_S & All,

We are trying to create an analytics report where the requirement according to client is as below:

Entitlement Type: Privileged Account 

Table 1: Data Imported to Saviynt looks as below for entitlment Type Privileged Account:

Entitlement_valuecustomproperty12customproperty5customproperty6customproperty3customproperty1Accountname
Database-ABCD-ADSHS-DB-RDA-OID-SH-advc.test.net-PAM-SRT-ADSHS-T-A-M3TRGS465473.advc.test.net;TDSH5633.advc.test.net;TRSTS35354.advc.test.net;STRF48987.advc.test.netLocal Windows ServerDEVADSHS-RIM-SET-COD-TRIM-SAV-ADSHS-COD-ATestUser1

Table 2: Analytics Report is expected to fetch data as below representation from above imported data:

Entitlement_valuecustomproperty12customproperty5customproperty6customproperty3customproperty1AccountName
Database-ABCD-ADSHS-DB-RDA-OID-SH-advc.test.net-PAM-SRT-ADSHS-T-A-M3TRGS465473.advc.test.netLocal Windows ServerDEVADSHS-RIM-SET-COD-TRIM-SAV-ADSHS-COD-ATestUser1
Database-ABCD-ADSHS-DB-RDA-OID-SH-advc.test.net-PAM-SRT-ADSHS-T-A-M4TDSH5633.advc.test.netLocal Windows ServerDEVADSHS-RIM-SET-COD-TRIM-SAV-ADSHS-COD-ATestUser1
Database-ABCD-ADSHS-DB-RDA-OID-SH-advc.test.net-PAM-SRT-ADSHS-T-A-M5TRSTS35354.advc.test.netLocal Windows ServerDEVADSHS-RIM-SET-COD-TRIM-SAV-ADSHS-COD-ATestUser1
Database-ABCD-ADSHS-DB-RDA-OID-SH-advc.test.net-PAM-SRT-ADSHS-T-A-M6STRF48987.advc.test.netLocal Windows ServerDEVADSHS-RIM-SET-COD-TRIM-SAV-ADSHS-COD-ATestUser1

QUERY USED TO FECTH ABOVE DATA IN TABLE 2

select distinct SUBSTRING_INDEX(SUBSTRING_INDEX(ev.customproperty12, ';', numbers.n), ';', -1) as 'ServerName',
EV.customproperty5 as 'Application Service',
EV.customproperty6 as 'Environment',
EV.customproperty3 as 'Safe',
EV.customproperty1 as 'Account Name',
A.name as 'User Name'
from
(select 1 n union all
select 2 union all select 3 union all
select 4 union all select 5) numbers INNER JOIN entitlement_values EV
on CHAR_LENGTH(EV.customproperty12)
-CHAR_LENGTH(REPLACE(EV.customproperty12, ';', ''))>=numbers.n-1
INNER JOIN entitlement_types ET on EV.entitlementtypekey=ET.entitlementtypekey
INNER JOIN endpoints E on E.endpointkey=ET.endpointkey
INNER JOIN entitlements2 ET2 on ET2.entitlement_value2key = EV.entitlement_valuekey
INNER JOIN entitlement_values EV2 on ET2.entitlement_value1key = EV2.entitlement_valuekey
INNER JOIN account_entitlements1 AE1 on EV2.entitlement_valuekey=AE1.entitlement_valuekey
INNER JOIN accounts A on AE1.accountkey=A.accountkey
where
E.endpointkey=37

 

NOTE: We are trying to fetch all values separated by delimiter(;) in rows  (Column reference Table 1 customproperty12)

We are able to fetch desired report using below query in Data Analyzer but see below error message when using same query in Creating an Analytics Report for the same query. 

When clicking on "Preview" in Analytics I able to see the data being fetched only while clicking on "Create" to save the analytics seeing below error message

vmudagal1_1-1694614898434.png

 

vmudagal1_0-1694614739074.png

 

Please let know how I can overcome this error as the query is working fine in Data Analyzer. Cross apply String Split() functions is also not acceptable. Provide guidance on what is supported in Analytics Report for query.

Thank you, 

Vidya D Mudagal

Could you please provide screenshot of sample output from the same query from data analyzer.

vmudagal1
Regular Contributor
Regular Contributor

Hi @Dhruv_S

This was resolved by giving a space before and after operators (>=)

-CHAR_LENGTH(REPLACE(EV.customproperty12, ';', ''))>=numbers.n-1 

-CHAR_LENGTH(REPLACE(EV.customproperty12, ';', '')) >= numbers.n-1

Thank you, 

Vidya D Mudagal

Thanks for the update. Could you please accept it as Solution to help others who may have a similar problem.