Hi all,
I have a very strage problem in configuring datadepoloy (5.6).
I understood how to write a basic DD-configuration and at the moment we are using DD to deploy EA's.
Now we want to deploy DCR data as well. So I set up a very basic config to find out how to set up DD:
------------------------------ datacapture.cfg ---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data-capture-requirements SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content">
<ruleset name="mytest">
<description>Testing dcr-deployment</description>
<item name="mytext">
<text required="t" size="50" />
</item>
</ruleset>
</data-capture-requirements>
------------------------------ datacapture.cfg ---------------------------------------
------------------------------ dbschema.cfg ---------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<dbschema>
<group name="test2" root-group="yes">
<attrmap>
<column name="Path" data-type="varchar(255)" value-from-field="path"/>
<column name="myrow" data-type="VARCHAR(255)" value-from-field="mytext" allows-null="no" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="Path"/>
</primary-key>
</keys>
</group>
</dbschema>
------------------------------ dbschema.cfg ---------------------------------------
This configuration results in the following DAS config-file:
------------------------------ mytest_dd.cfg ---------------------------------------
<data-deploy-configuration>
<data-deploy-elements filepath="c:/dd-home/conf/database.xml" />
<client>
<deployment name="basearea">
<source>
<!-- Pull data tuples from TeamSite Templating DCR's -->
<teamsite-templating-records
custom = "yes"
options = "wide,full"
area = "$mybasearea">
<path name = "$mytemplatepath"
visit-directory = "deep" />
</teamsite-templating-records>
</source>
<destinations>
<!-- IBM db2 -->
<database use ="ibm_db2_db"
update-type = "base"
state-field = "state">
<search results-suppress-vpath ="f"
results-program = "" />
<dbschema>
<group name="test2" table="$mybasetablenameprefix^__test2__$mybasetablenamesuffix" root-group="yes">
<attrmap>
<column name="Path" data-type="varchar(255)" value-from-field="path"/>
<column name="IW_State" data-type="varchar(255)" value-from-field="state"/>
<column name="myrow" data-type="VARCHAR(255)" allows-null="no" is-url="no" value-from-field="mytext" />
</attrmap>
<keys >
<primary-key >
<key-column name="Path" />
</primary-key>
</keys>
</group>
</dbschema>
</database>
</destinations>
</deployment>
</data-deploy-configuration>
------------------------------ mytest_dd.cfg ---------------------------------------
This configuration doesn't work!
When DD tried to evaluate the date to be deployed, I always get the following error:
...
TUPLE={IWOV_PROC_FLAG=true, state=Original, record/0/item/0=
, record/0/item/0/value/0=mein neuer test..., record/0/item/0/name=mytext, record/0=
, record/0/type=content, TeamSite/Templating/DCR/Type=hk010_contents/mytest, record/0/name=test0815, path=templatedata\hk010_contents\rpri295\data\mytest}
Starting SchemaHelperCache Cleanup Thread...
TTableSchemaHelper not found in cache for [DEFAULT_HK010_CONTENTS_RPRI295__TEST3__MAIN_TEST_STAGING]. Creating new.
SELECT NAME, COLTYPE, LENGTH, NULLS FROM SYSIBM.SYSCOLUMNS WHERE TBNAME = ?
RowsExistForPath

ELECT COUNT(*) FROM DEFAULT_HK010_CONTENTS_RPRI295__TEST3__MAIN_TEST_STAGING WHERE Path = ?
INSERT:INSERT INTO DEFAULT_HK010_CONTENTS_RPRI295__TEST3__MAIN_TEST_STAGING(IW_State,Path,t_headline) VALUES (?,?,?)
Column: IW_State, field: state, Index: 1,Converting 'Original' to VARCHAR
Column: Path, field: path, Index: 2,Converting 'templatedata\hk010_contents\mytest\data\test0815' to VARCHAR
<b>Column: myrow, field: mytext, Index: 3,null</b>
*******************************************************
SQLException occured in TDbSchemaGroupCfg
Exception Message: [IBM][CLI Driver][DB2/6000] SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=28, COLNO=2" is not allowed. SQLSTATE=23502
Vendor Error Code: -407
SQL state: 23502
*******************************************************
*******STACK TRACE*************
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=28, COLNO=2" is not allowed. SQLSTATE=23502
.....
As you can see at the bold marked line, no data is being extracted from my dcr.
If I change the following line in dbschema.cfg it works:
change from:
<column name="myrow" data-type="VARCHAR(255)" value-from-field="mytext" allows-null="no" is-url="no"/>
change to:
<column name="myrow" data-type="VARCHAR(255)" value-from-field="record/0/item/0/value/0" allows-null="no" is-url="no"/>
But using the above syntax is NO option, because, if someone changes anything inside the datacapture.cfg (i.e. the field order), my deployment won't work anymore.
ANY ideas what I am doing wrong?
Thank you very much!
Stephan