From: Elisabetta M. <man...@pc...> - 2003-12-18 14:33:29
|
I think it's best that you use UpdateGusFromXML. If I recall correctly the UpdateGusFromCla was only implementing part of the functionality of UpdateGusFromXML. I think UPdateGusFromCla can be considered deprecated. Elisabetta On Thu, 18 Dec 2003, sucheta Tripathy wrote: > Hi Steve, > > Thanks for the suggestion. I also tried UpdateGusFromCla plugin. But not > sure if I should use it. It looks like the program ends successfully, but > does not update any value. > > Here is the snapshot: > ===================== > > >>ga GUS::Common::Plugin::UpdateGusFromCla --tablename > >>SRes::ExternalDatabase --at > >>trlist external_database_id,name,lowercase_name --valuelist > >>"16^^^PfamA^^^pfama" > >> --refresh --verbose --commit > >> > >>It looks like the program ends normally, but the database does not get > >>updated. > >> > >>Following is the output: > >>======================== > >>Reading properties from > >> /home/apps/GUS/dev/gushome/config/GUS-PluginMgr.prop > >>Reading properties from /home/apps/GUS/dev/.gus.properties > >>Wed Dec 17 14:58:55 2003 ALGINVID 102 > >>Wed Dec 17 14:58:55 2003 ARGS algoinvo 1 > >>Wed Dec 17 14:58:55 2003 ARGS attrlist > >>external_database_id,nam > >>e,lowercase_name > >>Wed Dec 17 14:58:55 2003 ARGS comment > >>Wed Dec 17 14:58:55 2003 ARGS commit 1 > >>Wed Dec 17 14:58:55 2003 ARGS debug > >>Wed Dec 17 14:58:55 2003 ARGS group > >>Wed Dec 17 14:58:55 2003 ARGS gusconfigfile > >>/home/apps/GUS/dev/.gus. > >>properties > >>Wed Dec 17 14:58:55 2003 ARGS project > >>Wed Dec 17 14:58:55 2003 ARGS refresh 1 > >>Wed Dec 17 14:58:55 2003 ARGS sqlVerbose > >>Wed Dec 17 14:58:55 2003 ARGS tablename > >>SRes::ExternalDatabase > >>Wed Dec 17 14:58:55 2003 ARGS usage > >>Wed Dec 17 14:58:55 2003 ARGS user > >>Wed Dec 17 14:58:55 2003 ARGS valuelist > >> 16^^^PfamA^^^pfama > >>Wed Dec 17 14:58:55 2003 ARGS verbose 1 > >>Wed Dec 17 14:58:55 2003 ARGS veryVerbose > >>Wed Dec 17 14:58:55 2003 COMMIT commit on > >>Wed Dec 17 14:58:55 2003 Result primary key is found in database, > >>doing > >>update > >>name Pfa > > > Any comments. > > Sucheta > > Sucheta- > > > > it does look like there is a flaw in SubmitRow (I wrote it!) which > > doesn't properly handle inserting. > > > > As a workaround, try UdateGusFromXML > > > > To see what the xml should look like, use printXML to print out an > > existing row from that table > > > > steve > > > > sucheta Tripathy wrote: > > > >>Hi, > >> > >>We have been trying to update some data into GUS using the SubmitRow > >> plugin. > >>Apparently from the first description line it appears the --refresh > >> option > >>updates the data, so we used the following option: > >> > >>ga GUS::Common::Plugin::SubmitRow --tablename SRes::ExternalDatabase > >>--attrlist > >> external_database_id,name,lowercase_name --valuelist > >> "16^^^PfamA^^^pfama" > >>--ref > >>resh --verbose --commit > >> > >>Instead of executing the sql statement as update it says: insert > >> into..... > >> > >>It gives the following error: > >>============================= > >> > >>Wed Dec 17 14:31:26 2003 ALGINVID 98 > >>Wed Dec 17 14:31:26 2003 COMMIT commit on > >>DBD::Oracle::st execute failed: ORA-00001: unique constraint > >>(SRES.PK_EXTERNALDA > >>TABASE) violated (DBD ERROR: OCIStmtExecute) [for Statement " > >> INSERT INTO SRes.ExternalDatabase ( other_read, group_write, > >>group_read, lo > >>wercase_name, name, user_read, row_user_id, external_database_id, > >>modification_d > >>ate, other_write, row_project_id, row_alg_invocation_id, row_group_id, > >>user_writ > >>e ) > >> VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, SYSDATE, ?, ?, ?, ?, ? ) " with > >>ParamVal > >>ues: :p5='PfamA', :p6='1', :p3='1', :p12='1', :p7='1', :p1='1', :p8='16', > >>:p4='p > >>fama', :p10='1', :p9='0', :p13='1', :p11='98', :p2='1'] at > >>/home/apps/GUS/dev/gu > >>shome/lib/perl/GUS/ObjRelP/DbiDbHandle.pm line 145. > >>========================================================================== > >> > >>SO I tried another plugin UpdateGusFromCla > >>using the following option: > >> > >>ga GUS::Common::Plugin::UpdateGusFromCla --tablename > >>SRes::ExternalDatabase --at > >>trlist external_database_id,name,lowercase_name --valuelist > >>"16^^^PfamA^^^pfama" > >> --refresh --verbose --commit > >> > >>It looks like the program ends normally, but the database does not get > >>updated. > >> > >>Following is the output: > >>======================== > >>Reading properties from > >> /home/apps/GUS/dev/gushome/config/GUS-PluginMgr.prop > >>Reading properties from /home/apps/GUS/dev/.gus.properties > >>Wed Dec 17 14:58:55 2003 ALGINVID 102 > >>Wed Dec 17 14:58:55 2003 ARGS algoinvo 1 > >>Wed Dec 17 14:58:55 2003 ARGS attrlist > >>external_database_id,nam > >>e,lowercase_name > >>Wed Dec 17 14:58:55 2003 ARGS comment > >>Wed Dec 17 14:58:55 2003 ARGS commit 1 > >>Wed Dec 17 14:58:55 2003 ARGS debug > >>Wed Dec 17 14:58:55 2003 ARGS group > >>Wed Dec 17 14:58:55 2003 ARGS gusconfigfile > >>/home/apps/GUS/dev/.gus. > >>properties > >>Wed Dec 17 14:58:55 2003 ARGS project > >>Wed Dec 17 14:58:55 2003 ARGS refresh 1 > >>Wed Dec 17 14:58:55 2003 ARGS sqlVerbose > >>Wed Dec 17 14:58:55 2003 ARGS tablename > >>SRes::ExternalDatabase > >>Wed Dec 17 14:58:55 2003 ARGS usage > >>Wed Dec 17 14:58:55 2003 ARGS user > >>Wed Dec 17 14:58:55 2003 ARGS valuelist > >> 16^^^PfamA^^^pfama > >>Wed Dec 17 14:58:55 2003 ARGS verbose 1 > >>Wed Dec 17 14:58:55 2003 ARGS veryVerbose > >>Wed Dec 17 14:58:55 2003 COMMIT commit on > >>Wed Dec 17 14:58:55 2003 Result primary key is found in database, > >>doing > >>update > >>name PfamA > >>lowercase_name pfama > >>Wed Dec 17 14:58:55 2003 RESULT > >> > >>So, Now I am in doubt whether I am using the correct plugin(s). > >>Are there any plugins which does the database update job?Do I need to do > >>it at the SQL commandline. > >> > >>Thanks > >> > >>Sucheta > >> > >> > > > > > -- Elisabetta Manduchi Computational Biology and Informatics Laboratory Center for Bioinformatics University of Pennsylvania 1428 Blockley Hall 423 Guardian Drive Philadelphia, PA 19104-6021 phone: 215-573-4408 fax: 215 573-3111 email: man...@pc... web: http://www.cbil.upenn.edu/~manduchi --- |