Uploaded file count DSpace 8

21 views
Skip to first unread message

Meelis Lilbok

unread,
Dec 11, 2025, 7:24:08 AM (7 days ago) Dec 11
to DSpace Technical Support
Hello,

Please help!

How to get total count of uploaded files and exclude thumbnails/license files, using sql query?

Regards
Meelis

mw...@iu.edu

unread,
Dec 15, 2025, 4:31:10 PM (3 days ago) Dec 15
to dspac...@googlegroups.com
On Thu, Dec 11, 2025 at 12:01:47PM +0000, Meelis Lilbok wrote:
> How to get total count of uploaded files and exclude thumbnails/license files, using sql query?

I think this should work:

SELECT COUNT(*)
FROM bundle b
JOIN bundle2bitstream AS b2b ON b2b.bundle_id = b.uuid
JOIN metadatavalue m ON b.uuid = m.dspace_object_id
JOIN metadatafieldregistry f USING (metadata_field_id)
WHERE f.element = 'title'
AND f.qualifier IS NULL
AND m.text_value = 'ORIGINAL';

The uploaded files should all be in the ORIGINAL bundle, while the
license text is in LICENSE and the thumbnails in THUMBNAIL. The name
of the bundle is in its 'title' metadata field.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
library.indianapolis.iu.edu
signature.asc

Meelis Lilbok

unread,
Dec 16, 2025, 11:06:42 AM (2 days ago) Dec 16
to DSpace Technical Support
Thank you Mark!

metadatafieldregistry was the table i was missing in my query :)

Regards
Meelis
Reply all
Reply to author
Forward
0 new messages