Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Cannot delete rows from UDS using DD
lhdavis
I am having trouble deleting rows from our database using a UDS and DD 5.5.2 on a Windows 2000 box. Inserts and updates to the database work fine but deletes do not. I'm executing DD using the iwdd.ipl command passing the cfg file name, deployment name, and a ddsrcArea variable which is equal to a particular EDITION.
I know there was a prior post on this but it seemed to be a little unclear to me on how to fix the issue. Any thoughts?
I've included our edited UDS below. Thanks!
<data-deploy-configuration>
<client>
<!-- This deployment dumps EA data from a TeamSite area to -->
<!-- several different database destinations -->
<deployment name="DeployDocs">
<source>
<!-- Pull data tuples from TeamSite Docs folder EAs -->
<teamsite-extended-attributes
options="wide,full"
area="$ddsrcArea" >
<path name="cis/cistp/docs" visit-directory="deep" />
</teamsite-extended-attributes>
</source>
<destinations>
<!--
/**
* Update the Content Metadata table for Docs
*/
-->
<database db = <removed database name>"
user = "<removed user name>"
password = "<removed password>"
vendor = "ibm"
table = "<removed table name>"
update-type = "standalone"
state-field = "state"
drop-table = "yes"
delete-tracker = "yes" >
<dbschema>
<group name="Master" root-group="yes" table="<removed table name>">
<attrmap>
<column name="FILE_TYPE" data-type="VARCHAR(15)" value-from-field="TeamSite/Metadata/file_type" allows-null="no" is-url="no"/>
<column name="URL" data-type="VARCHAR(255)" value-from-callout="iwov:dd:java:CIS.IWGetPath" allows-null="no" is-url="no"/>
<column name="FILE_NAME" data-type="VARCHAR(50)" value-from-field="TeamSite/Metadata/file_name" allows-null="no" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="CONTENT_META_DATA_ID"/>
</primary-key>
</keys>
</group>
</dbschema>
</database>
</destinations>
</deployment>
</client>
</data-deploy-configuration>
Find more posts tagged with
Comments
Migrateduser
deletes are possible only if you do a differential deployment (in which DD can identify the deleted files between two areas automatically by comparing them) or by explicitly specifying the path of the deleted file in the source element. If you explicitly specify the path of the deleted file (relative to the area) in the source or in a filelist., deletes should work.
lhdavis
I had seen this in a previous post and attempted the differential deployment method. Basically I cleared out and refreshed the database with my latest edition using the differential deployment so that my path values would be correct. However, once I tried to deploy a new edition with a deleted value, I see a similar error to my previous attempt using a full deployment. Basically, a NullPointerException occurs when trying to select from IWDELTRACKER.
SELECT KEYCOLNAME , KEYCOLVALUE FROM IWDELTRACKER WHERE PATH = ? AND AREA = ?
java.lang.NullPointerException
at com.interwoven.dd100.dd.TDbDataTypes.convertForDataType(TDbDataTypes.java:481)
at com.interwoven.dd100.dd.TDeleteTracker.GetPKColValues(TDeleteTracker.java:212)
at com.interwoven.dd100.dd.TDbSchemaGroupInfo.PrepareForDeleteUsingDeleteTracker(TDbSchemaGroupInfo.java:115)
at com.interwoven.dd100.dd.TDbSchemaCfg.DeleteUsingDelTracker(TDbSchemaCfg.java:688)
at com.interwoven.dd100.dd.TDbSchemaCfg.Delete(TDbSchemaCfg.java:461)
at com.interwoven.dd100.dd.TDbSchemaAgent.BasicWriteTuple(TDbSchemaAgent.java:377)
at com.interwoven.dd100.dd.TDbSchemaAgent.WriteTuple(TDbSchemaAgent.java:314)
at com.interwoven.dd100.dd.TConsumerManager.WriteConsumerInternal(TConsumerManager.java:393)
at com.interwoven.dd100.dd.TConsumerManager.WriteConsumers(TConsumerManager.java:382)
at com.interwoven.dd100.dd.TAgentClient.DoOneTeamSiteSource(TAgentClient.java:834)
at com.interwoven.dd100.dd.TAgentClient.DoTeamSiteSources(TAgentClient.java:423)
at com.interwoven.dd100.dd.TAgentClient.DoOneDeployment(TAgentClient.java:246)
at com.interwoven.dd100.dd.TAgentClient.Go(TAgentClient.java:179)
at com.interwoven.dd100.dd.IWDataDeploy.Go(IWDataDeploy.java:385)
at com.interwoven.dd100.dd.IWDataDeploy.runDeploy(IWDataDeploy.java:409)
at com.interwoven.dd100.dd.IWDataDeploy.main(IWDataDeploy.java:401)
ERROR:Exception occured: null
ERROR:WriteTuple failure to consumer[0]
ERROR:Unable to process TeamSite source cis/cistp/docs
ERROR:deployment [DeployDocs] FAILED
Error occured in area outside TDbAgent consumer (explicit rollback initiated)
I'd rather figure out why either of these two methods do not work for me than have to try and change the deployment to a filelist deployment. Any other thoughts?
Migrateduser
Did you do the following:
1. when you cleared out the database, did you delete appropriate rows from iwdeltracker table as well?
2. perform initial deployment with the source pointing to an edition., say edition1
3. delete files from a workarea in the branch. submit the deletes. publish edition, say edition 2
4. now run a differential deployment between edition1 and edition2
lhdavis
My answers are below:
1. when you cleared out the database, did you delete appropriate rows from iwdeltracker table as well?
Yes. This is the only content in the database, I deleted all rows from IWDELTRACKER.
2. perform initial deployment with the source pointing to an edition., say edition1
The initial differential deployment I performed was between edition 1 (8 documents) and edition 38 (18 documents) and all of the data was correct in the database.
3. delete files from a workarea in the branch. submit the deletes. publish edition, say edition 2
Yes, I deleted a file, submitted the delete, published edition 39 (17 documents).
4. now run a differential deployment between edition1 and edition2
Ran the differential deployment between edition 39 (area) and 38 (base_area).
marcussteiner
Hi,
I've got a similar sort of problem with the database entries not been deleted from the uds database schema. We want to deploy the extended attributes for generated files (jsp's) to the database. We run a workflow to generate, submit and deploy single files immediate to the target server using a (od)filelist deployment. So when generating the jsp's we run iwextattr to write some of the dcr data to the extended attributes (including the relative path of the file) of the jsp's. Then we run the first dnr script to trigger tsxml and to write the extended attributes to a dump file:
<deployment name="teamsite_metadata">
<source>
<teamsite-extended-attributes
options="wide,full"
area="/default/main/br_name/WORKAREA/wa1" >
<path name = "www" visit-directory="deep"/>
</teamsite-extended-attributes>
</source>
<destinations>
<xml-formatted-data file="c:\iw\iwod_src_meta_dump\teamsite_metadata.dump" />
</destinations>
</deployment>
This dump file (holding ea's for all files in wa1/www) is deploy with the jsp's from the (od)filelist deployment to the
targer server.
Then we trigger a second dnr script to run loaddb.cfg. We've modified the ddsync.ipl script to generate the (dd)filelist also containing the deployed generated files and not only the dcr's. So what we've got on the target server is the dump file, the (dd)filelist and the jsp's PLUS the iwdeltracker table (columns: PATH, AREA, KEYCOLNAME, KEYCOLVALUE)
in the database. Loaddb.cfg looks like this:
<source>
<xml-formatted-data file="C:\iw\iwod_rcv_meta_dump\teamsite_metadata.dump"
filelisttt="c:\iw\iwod_rcv_xml_dump\general_main.filelist">
<fields>
<field name="pfad" element="pfad" />
<field name="rolle" element="rolle" />
</fields>
</xml-formatted-data>
</source>
So we like to dump the xml-formatted-data dump file into the database using the provided filelist. Again it's working fine for updates and inserts but the deletes don't work. It seems like dd is just ignoring the filelist argument (even if i spell it wrong like above). When deleting jsp's the name of the file is
fine in the (dd)filelist but (obviously) not in the dump file anymore. So what happens when doing a delete is that
dd is loading the complete dumpfile into the database instead of only the ones from the filelist. I've read that iwdeltracker won't work when there is a mapping to path. I've tested that as well with different mappings and the same result.
This is DD5.6 on windows but I'll have to do this for DD5.5.2 on AIX as well
All ideas and suggestions or highly appreciated....
Migrateduser
Your usage of filelist is incorrect for xml-formatted-data element filelist attribute is used with xml-formatted-data only if you have multiple xml dumpfiles. You need to include the state field in the source and make sure that your xml dump contains the state field and it should be marked "NotPresent" if its deleted:
Eg:
<deployment name="xml-to-db">
<source>
<!-- Pull data tuples from XML file -->
<xml-formatted-data file="e:\cfgfiles\toxml\ts2xml.out" >
<fields>
<field name="state" element="iw-state" />
<field name="path" element="Path" />
...
</fields>
</xml-formatted-data>
<data-tuple>
<tuple-field name="TeamSite/Templating/DCR/Type">intranet/weather</tuple-field>
<tuple-field name="Announcement">fffff</tuple-field>
<tuple-field name="state">NotPresent</tuple-field>
<tuple-field name="path">templatedata\intranet\weather\data\j6</tuple
-field>
<tuple-field name="iw_internal_area">/default/main/br1/WORKAREA/ddtestwa</tuple-field>
<tuple-field name="Todays Day">bar</tuple-field>
</data-tuple>
bboyle
we had trouble deleting rows and it turned out to be with filters in the configuration file. Deleted files were being excluded by the filters so datadeploy wasn't actually even trying to delete them.
So if you are using filters, make sure you include a "keep" condition like <field name="state" match="NotPresent"/> so that deleted files are included in the deployment.
Just thought I'd add this to the topic for future reference
streamstudio.zip
jkm
Hi All,
Is there any other way to delete a row from the table using datadeploy rather than doing differential deployment. We are doing filelist deployment and pushing data to database as well. If user deletes a file in the teamsite then this file has to be deleted from database as well. Is there anyway to turn on the flag in dd config file to delete the row for a particular deployment rather than comparing editions and then deploy the content.
Thanks!
Bill Klish
Why wouldn't you just do a file list deployment, which will flag the file as deleted automatically when it checks to see if it exists?
jkm
I generate my filelist with user file selection. If the file is deleted then what is the best way to put something in the filelist. Shall we invoke the workflow while deleting the file itself and generate the file list or any other best practice ?