How to count log for each process in each folder?
Issue: How to know the logs count for each process with each folder and each TENANT
Resolution:
- Perform the below query,
[Query]
SELECT o.DisplayName as Foldername, l.ProcessName, COUNT(*) as Logcount , t.TenancyName FROM
[%UIPATH Database NAME%.[dbo].[Logs] l,
[%UIPATH Database NAME%].[Releases] r ,
[%UIPATH Database NAME%].[OrganizationUnits] o ,
[%UIPATH Database NAME%].[Tenants] t
where
r.OrganizationUnitId = o.Id and
l.OrganizationUnitId = r.OrganizationUnitId and
t.id = l.TenantId and
r.Name = l.ProcessName
group by ProcessName , o.DisplayName , t.TenancyName
Order by DisplayName
- Remove "UIPATH Database NAME" with actual schema name.
Note: Above query is version specific. In future if the UIPATH schema is changed, then update the same. The outcome shall contain the Process name, Tenancy and Folder name etc.