Hi Joseph, Minho stats copies some values of metadata into its own tables for indexing. In DSpace the length is unlimited, but minho has a cap of 200 chars, so it gives an error when copying if your DSpace metadata is bigger than 200 chars. Expanding the "field_value" column in the following tables should fix the error when aggregating (we set ours to 2000 chars but that's probably overkill):
stats.view_metadata_month stats.view_metadata_coll_month stats.view_metadata_comm_month stats.download_metadata_month stats.download_metadata_coll_month stats.download_metadata_comm_month If you use non-standard metadata fields you may also want to check that it's indexing the correct fields. I think by default it does date.issued, title, and contributor.author. But if you've moved/edited fields it may be looking in the wrong place. You can see the list of fields it's indexing via running this db query. select * from metadatafieldregistry where metadata_field_id in (select metadata_field_id from stats.metadata_aggreg); Hope that helps, Daniel Ishimitsu University of Hawaii Hamilton Library, DNS > Date: Wed, 26 Aug 2009 16:47:30 +0100 > From: joseph greene <[email protected]> > Subject: [Dspace-tech] U. Minho Stats package error > To: [email protected] > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > Has anyone encountered the following error when trying to run the > stats.aggregate(); script of the U. Minho Stats package? I'm on DSpace 1.4.2, > stats-addon-2.0, though I think it may be the same code as 2.1. I would > really appreciate the help-- I've gotten it to work this far, would love for > the whole thing to be working. I'm up to my ears in the code trying to trace > it back, but this pgsql procedural language is new to me. > > Here's the error: > > select stats.aggregate(); > ERROR:? value too long for type character varying(200) > CONTEXT:? SQL statement "INSERT INTO stats.view_metadata_month (field_id, > field_value, yearmo > nth,year,value) values ( $1 ,? $2 , stats.getyearmonth( $3 ::date), > date_part('year', $4 )::i > nteger,? $5 )" > ??????? PL/pgSQL function "aggregate_view" line 211 at SQL statement > ??????? PL/pgSQL function "aggregate" line 11 at assignment > STATEMENT:? select stats.aggregate(); > ERROR:? value too long for type character varying(200) > CONTEXT:? SQL statement "INSERT INTO stats.view_metadata_month (field_id, > field_value, yearmonth,year,value) values ( $1 ,? $2 , stats.getyearmonth( $3 > ::date), date_part('year', $4 )::integer,? $5 )" > PL/pgSQL function "aggregate_view" line 211 at SQL statement > PL/pgSQL function "aggregate" line 11 at assignment > > Many thanks, > > Joseph Greene > Institutional Repository Project Manager > 325 James Joyce Library > University College Dublin > Belfield, Dublin 4 > > 353 (0)1 716 7398 > [email protected] > http://irserver.ucd.ie/dspace/ > > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

