From: Steve F. <sfi...@pc...> - 2003-12-17 21:30:07
|
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 > > |