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 script query
cmic
The following DataDeploy config works. It uploads metadata, including filenames
to a database.
However, the "ID" field column should really have a value containing both the
filename as well as the file-path - by concatinating area+"/"+path (ie
"default/main/ACS/WORKAREA/Main/file_1.txt" etc). Right now only the file name
is being uploaded. How should the filepath as well as the filename be uploaded?
The config script follows:
<data-deploy-configuration>
<data-deploy-elements filepath="d:/OpenDeployNG/etc/database.xml" />
<logRules level="verbose" />
<client>
<deployment name="test_tkm_dd1">
<source>
<teamsite-extended-attributes area="/default/main/ACS/WORKAREA/Main/" options="full,wide" >
<path name="." visit-directory="deep" />
</teamsite-extended-attributes>
</source>
<destinations>
<database name="edevapp" db="edevapp.nmh-au:1521:edevapp" vendor="oracle"
table="DOCUMENT" user="eplatform_tkm" password="eplatform_tkm"
delete-tracker="yes" update-type="base" enforce-ri="yes"
state-field="state">
<dbschema>
<group name="DOCUMENT_GROUP" table="DOCUMENT" root-group="yes">
<attrmap>
<column name="ID" data-type="VARCHAR(254)" value-from-field="path" allows-null="no" is-url="no" />
<column name="DOCUMENT_SIZE" data-type="NUMBER(15)" value="102" allows-null="no" is-url="no" />
<column name="MIME_TYPE" data-type="VARCHAR(100)" value="MIME" allows-null="no" is-url="no" />
</attrmap>
<keys>
<primary-key>
<key-column name="ID"/>
</primary-key>
</keys>
</group>
</dbschema>
</database>
</destinations>
</deployment>
</client>
</data-deploy-configuration>
Find more posts tagged with
Comments
iwovGraduate
One way would be to use tuple-processor classes to modify the ID column values prior to deployment.
The DD Admin Guide has more details with examples on this.