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)
How to DataDeploy multiple replicants from DCR?
DevIntervowen
This may be simple query but I searched through devnet and DD docs and couldn't find any solution so posting it here.
How to deploy data from multiple replicants from DCR using DD?
For eg: If I have an container named "type" and another container named "books" [nested in type] I am specifying following config. in DD configuration file.
column name="BOOKS" data-type="nvarchar(255)" value-from-element="content/0/author/0/type/[0-2]/books/[0-2]/name/0" is-replicant="yes" is-url="no" allows-null="no" [This is in xml tag]
When I execute this DD, it deploys only first 3 instance to database as [0-2] is mentioned in this configuration. [If I change it to [0-10], it deploys data till 10 replicants and if there are only 2 replicants filled then it deploys null for other 8 records]. How can I specify dynamic config. so that it takes all number of filled replicants from DCR dynamically?
Find more posts tagged with
Comments
nipper
That does not sound correct. I use this mode often and my XML looks like this:
[php]
[/php]
Are there blank entries in the XML for the replicants showing null ?
DevIntervowen
Thanks nick for reply.
There's no blank entries in the XML for replicants showing null.. I also confirmed it in DCR source. Even if it has 2 replicants and i give [0-2], DD deploys 3 records..
This fields is nullable [allowed null] in database.. Also, I do have nested container [upto 2 level]..
DevIntervowen
Is it necessary that all tables that are deployed through DD always requires primary key ?
Is it necessary that primary keys in DB table should "always" match with primary keys in "KEYS" xml tag of DD config? If I dont have PK on DB table for some reason and it requires some time to key constraint on DB [because of process], can I restrict users and mention some PK through DD config? will it work?
I really don't see good documents explaining this stuff.. I am still facing problem of deployment of more records than actual replicants present in DCR.
Really Appreciate your help.
nipper
yes you *must* have a primary key and it need to be in the DCR.
DevIntervowen
Thanks nipper again for chipping in..
I sent request to add primary key to DD too.. will try it again once PK is added in DB.
I was thinking that the way DD works is if I define "keys" column in DD config., DD will take care and it acts as PK. Hence it will not insert records with duplicate "keys" in DB.
But it seems that DD works differently. That's if there's [0-10] in DD config, then DD will always deploy 11 records ["n" filled replicants from DCR + null records in rest "11-n"] in DB but because of Primary Key in Database, DB will restrict DD from entering null.
DevIntervowen
Thanks nipper.. I got it working. PK in DB was issue.. Anway I learnt it how exactly DD is working. Practically DD doesn't restrict from inserting duplicate "key" records but DB restrict it. DD just blindly insert everything based on number of replicants mentioned in DD config rather than actual replicants filled in DCR..