COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Administration and Security => Topic started by: cognosjon on 03 Jul 2020 05:40:02 AM

Title: File uploads and data set stats
Post by: cognosjon on 03 Jul 2020 05:40:02 AM
Hi Everyone,
Does anyone know of a way to monitor or obtain details about the size of file uploads per user and the size of data sets stored per user from an Admin perspective?

As more and more users begin to use this capability, the size of the content store is obviously growing (not moved the default location yet) but users also want to know how much space they have left of their allowed limit?

Would seem to be something that each user should be able to view and manage themselves, but as yet isn't offered as standard by IBM.
I'm currently on version 11.1.3 (holding out for 11.1.7 LTS before upgrading)

Any thoughts appreciated.

Thanks



Title: Re: File uploads and data set stats
Post by: MFGF on 06 Jul 2020 07:22:42 AM
Quote from: cognosjon on 03 Jul 2020 05:40:02 AM
Hi Everyone,
Does anyone know of a way to monitor or obtain details about the size of file uploads per user and the size of data sets stored per user from an Admin perspective?

As more and more users begin to use this capability, the size of the content store is obviously growing (not moved the default location yet) but users also want to know how much space they have left of their allowed limit?

Would seem to be something that each user should be able to view and manage themselves, but as yet isn't offered as standard by IBM.
I'm currently on version 11.1.3 (holding out for 11.1.7 LTS before upgrading)

Any thoughts appreciated.

Thanks

That's an interesting question, and you're right - it is something that would be useful for users to know.

I'm not sure if BSP has anything that would do this - I will reach out and ask...

Cheers!

MF.
Title: Re: File uploads and data set stats
Post by: cognosjon on 06 Jul 2020 07:57:15 AM
Cheers MF,

I Spoke with IBM support on Friday and the only option at present is to raise a RFE. I did take a look at doing this but it does appear that 2 or 3 have been raised previously and over a year ago but looks as though they didn't receive much traction and as a result have not yet been considered.

These are the two RFE's that i've now voted for that support what i'm seeking, feel free to take a look and add a vote. Whats the worst that could happen  :D

https://ibm-data-and-ai.ideas.aha.io/ideas/CAOP-I-1433 (https://ibm-data-and-ai.ideas.aha.io/ideas/CAOP-I-1433)
https://ibm-data-and-ai.ideas.aha.io/ideas/CAOP-I-929 (https://ibm-data-and-ai.ideas.aha.io/ideas/CAOP-I-929)



Title: Re: File uploads and data set stats
Post by: jeamsx on 16 Jul 2020 07:26:24 PM
I have a SQL query to Content Store to do that. And you can join to CMOBJPROPS33 by CMDATA.CMID to get user name (UPPER(COALESCE(props33.USERID, props33.NAME)) USERID)

SELECT CONTENTTYPE,
OBJECT_TYPE,
GROUP_SIZE,
ORDER_BY_SIZE,
COUNT(*) QTD
FROM
(SELECT
CASE CONTENTTYPE
   WHEN 'application/csv; charset=utf-16le'                                        THEN 'CSV'
   WHEN 'application/octet-stream'                                                 THEN 'UPLOADED FILE'
   WHEN 'application/pdf'                                                          THEN 'PDF'
   WHEN 'application/vnd.ibm.bi.pq'                                                THEN 'DATASET'
   WHEN 'application/vnd.ms-excel'                                                 THEN 'EXCEL'
   WHEN 'application/vnd.ms-excel; charset=utf-8'                                  THEN 'EXCEL'
   WHEN 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'        THEN 'EXCEL'
   WHEN 'text/html'                                                                THEN 'HTML'
   WHEN 'text/html; charset=utf-8'                                                 THEN 'HTML'
   WHEN 'text/xml'                                                                 THEN 'XML'
   WHEN 'text/xml; charset=utf-8'                                                  THEN 'XML'
END AS CONTENTTYPE ,
UPPER(c.NAME) AS OBJECT_TYPE,
CASE
WHEN LENGTH(DATAPROP) > 0 AND LENGTH(DATAPROP) <= 1048576 THEN 'ATÉ 1MB'
WHEN LENGTH(DATAPROP) > 1048576 AND LENGTH(DATAPROP) <= 10485760 THEN '1MB - 10MB'
WHEN LENGTH(DATAPROP) > 10485760 AND LENGTH(DATAPROP) <= 26214400 THEN '10MB - 25MB'
WHEN LENGTH(DATAPROP) > 26214400 AND LENGTH(DATAPROP) <= 52428800 THEN '25MB - 50MB'
WHEN LENGTH(DATAPROP) > 52428800 AND LENGTH(DATAPROP) <= 104857600 THEN '50MB - 100MB'
WHEN LENGTH(DATAPROP) > 104857600 THEN 'MAIOR QUE 100MB'
END AS GROUP_SIZE,
CASE
WHEN LENGTH(DATAPROP) > 0 AND LENGTH(DATAPROP) <= 1048576 THEN '1'
WHEN LENGTH(DATAPROP) > 1048576 AND LENGTH(DATAPROP) <= 10485760 THEN '2'
WHEN LENGTH(DATAPROP) > 10485760 AND LENGTH(DATAPROP) <= 26214400 THEN '3'
WHEN LENGTH(DATAPROP) > 26214400 AND LENGTH(DATAPROP) <= 52428800 THEN '4'
WHEN LENGTH(DATAPROP) > 52428800 AND LENGTH(DATAPROP) <= 104857600 THEN '5'
WHEN LENGTH(DATAPROP) > 104857600 THEN '6'
END AS ORDER_BY_SIZE
FROM CMDATA cd
INNER JOIN CMOBJECTS o ON cd.CMID = o.CMID
INNER JOIN CMCLASSES c on c.CLASSID = o.CLASSID
WHERE DATAPROP IS NOT NULL
AND CONTENTTYPE in ('application/csv; charset=utf-16le' , 'application/octet-stream' , 'application/pdf' , 'application/vnd.ibm.bi.pq' , 'application/vnd.ms-excel' , 'application/vnd.ms-excel; charset=utf-8' , 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' , 'text/html' , 'text/html; charset=utf-8' , 'text/xml' ,'text/xml; charset=utf-8' ) ) T
GROUP BY
CONTENTTYPE,
OBJECT_TYPE,
GROUP_SIZE,
ORDER_BY_SIZE