Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DataDeploy - create multiple rows?
rbuelling
We are trying to determine whether DataDeploy can fulfill our requirements for populating a database and we have the following question:
We are using a DCR that defines an article with multiple sections:
<record name="Article" type="content">
<item name="Title">
<value>Sample Article Title</value>
</item>
<item name="Section">
<value>Section1</value>
<value>Section2</value>
<value>Section3</value>
</item>
</record>
We would like to deploy this information to two tables:
1) Article table. Columns:
- Article ID (primary key)
- Title (from DCR)
2) Section table. Columns:
- Article ID (foreign key to article table)
- Section ID (primary key of section table)
- Section Name (from DCR)
With the sample DCR from above we would like DataDeploy to add one row to the article table and three rows to the section table (one row for each value in the DCR).
Is it possible to do that? If yes: where is the best place to look for documentation/examples for how to do that?
Thanks.
Ralph
Find more posts tagged with
Comments
Migrateduser
Yes DD can map the DCT to a set of RDBMS tables like your requirement. You can use the DDUI or CLT to map the DCT to a dbschema.cfg, this is documented in the new DD Manual.
Migrateduser
> this is documented in the new DD Manual
Specifically, please check out the DataDeploy 5.5 Admin Guide, Part #90-25-00-560-300, April 2003.
Also, there's a DevNet webcast scheduled for this Thursday on deploying XML-based content into user-defined database schemas. There's still time to register... ;-)
Todd Scallan
Group Product Manager
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com
rbuelling
Todd,
Thanks for the information. The recording of the webcast and the documentation were very helpful. Could you please answer a few follow up questions:
We would like to deploy the following DCR into a database:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE record SYSTEM "dcr4.5.dtd">
<record name="test1" type="content">
<item name="Title">
<value>Test Title</value>
</item>
<item name="Product">
<value>Product 1</value>
<value>Product 2</value>
</item>
</record>
The DCR should be deployed to 2 tables:
a) Table Content. Columns: Path (Primary Key), Title
b) Table Content_Product. Columns: Path, Product. These 2 columns should be the primary key.
With the sample DCR from above we would like to get one record in the content table and two records in the Content_Product table (one for "Product 1" and one for "Product 2").
We're using the following datadeploy config file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<data-deploy-configuration>
<client>
<deployment name="test1">
<source>
<teamsite-templating-records options="wide" area="/default/main/EAS_Test/WORKAREA/content/templatedata/test/whatsnew" area-type="ts-filesystem" xml-type="interwoven">
<path name="data" visit-directory="deep"/>
</teamsite-templating-records>
</source>
<destinations>
<database db="servername:?database=DataDep" user="user" password="password"
vendor="microsoft-inetuna" update-type="base" state-field="state" delete-tracker="yes" enforce-ri="no">
<dbschema>
<group name = "content" root-group="yes" table= "content">
<attrmap>
<column name="Title" data-type="VARCHAR(255)" value-from-field="Title" allows-null="no" is-url="no"/>
<column name="Path" data-type="VARCHAR(50)" value-from-field="path" allows-null="no" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="Path"/>
</primary-key>
</keys>
</group>
<group name = "content_product" root-group="no" table= "content_product">
<attrmap>
<column name="Product" is-replicant="true" data-type="VARCHAR(10)" value-from-field="Product" allows-null="no" is-url="no"/>
<column name="Path" data-type="VARCHAR(50)" value-from-field="path" allows-null="no" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="Path"/>
<key-column name="Product"/>
</primary-key>
<foreign-key parent-group="content">
<column-pair parent-column="Path"
child-column="Path" />
</foreign-key>
</keys>
</group>
</dbschema>
</database>
</destinations>
</deployment>
</client>
</data-deploy-configuration>
We have the following issues:
1) DataDeploy does populate the 2 tables, but it only creates one record in the content_product table. The product column for this record is "Product 1, Product 2". How can we configure DataDeploy to create two records, one for "Product 1" and one for "Product 2"?
2) Inserts and Updates work correctly, but deletes are not reflected in the database. I looked through the other posts about this topic, but couldn't get it resolved with that information. Any ideas?
Any help would be appreciated.
Thanks.
Ralph
Migrateduser
Correction to my previous post: Should have been "DataDeploy 5.6 Admin Guide, Part #90-25-00-560-300, April 2003", and not "5.5".
Todd Scallan
Group Product Manager
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com
Migrateduser
You might be missing some UI Patches. Could you please file a report with Support.
Migrateduser
Hi,
Case was filed, error for item 1 was the non-use of "Deploying Comma Separated Lists of Values as Replicants" methods and the is-replicant syntax.
Item 2 is being worked.