Home
TeamSite
DataDeploy-Updation
System
Hi,
I am using datadeploy update-type="base".
I have a dcr with info which will move to 5 tables. First main table is contents which is having primary key. Remainign all tables are dependant tables .
while i am deploying content using iwdd.ipl it is pusing into all tables. while i am updating the dcr only main table is updating . In remaining tables it is inserting news rows and it is not deleting which ever info. i deleted in the table
Thanx in advance
Find more posts tagged with
Comments
Migrateduser
Here is my datadeploy configuration file.Pls. check the attachment.
Thanx in advance
DFS_Dev_guide.pdf
Migrateduser
there is a problem in your config file. You are not specifying the dependency between the tables. i.e. You are using content_id as the key in all tables but dont specify anywhere that its a foreign key of the root group in all the child tables.
Migrateduser
Thanx for your reply
So i have to specify foreigh-key column. Could pls check below entry of foreign key column andlet me know whether i am doing correct way or not
<group name="ProductModels" table="CONTENT_MODELS" root-group="no">
<attrmap>
<column name="CONTENT_ID" data-type="NUMBER" value-from-field="Content_Id" allows-null="no" is-url="no"/>
<column name="MODEL_ID" data-type="NUMBER" list-to-replicant="yes" list-field="ProductModels/0/SelectedModels" value-from-field="ProductModels/0/SelectedModels/[0-99]/SelectedModels" is-replicant="yes" allows-null="no" is-url="no"/>
<column name="MODEL_TYPE" data-type="VARCHAR(1)" value="1" allows-null="no" is-url="no"/>
<column name="MODEL_CATEGORY_ID" data-type="NUMBER" value-from-field="ProductCategories" allows-null="no" is-url="no"/>
<column name="MACHINE_MODEL_ID" data-type="NUMBER" list-to-replicant="yes" list-field="ProductModels/0/SelectedModels" value-from-field="ProductModels/0/SelectedModels/[0-99]/SelectedModels" is-replicant="yes" allows-null="no" is-url="no"/>
<column name="CREATED_DATE" data-type="DATE" data-format="MM/dd/yy" value-from-field="Created_Date" allows-null="no" is-url="no"/>
<column name="CREATED_USER_ID" data-type="VARCHAR(20)" value-from-field="Created_Userid" allows-null="no" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="CONTENT_ID"/>
<key-column name="MODEL_ID"/>
<key-column name="MACHINE_MODEL_ID"/>
</primary-key>
<foreign-key parent-group="Advt">
<column-pair parent-column="CONTENT_ID" child-column="MODEL_ID"/>
<column-pair parent-column="CONTENT_ID" child-column="MACHINE_MODEL_ID"/>
</foreign-key>
</keys>
</group>
Thanx in advance
Migrateduser
Thats incorrect, you need to just refer content_id in product_models since thats the only PK defined in advt.
foreign-key parent-group="Advt">
<column-pair parent-column="CONTENT_ID" child-column="content_ID"/>
</foreign-key>
However if consumables is child table of product_models you need to make sure you refer to the PK's of that table as FK in consumables group. There should be some examples in dd_home/conf directory.
Migrateduser
Hi,
It works after i specified foreign-key column in dependant files.
I had one more issue here
productmodels,consumables, accessories all there groups going to the table called Models.
when i update accessoroies it is updating accessories table but it is deleting remaing all. But in my case i want to delete only accessories.
I am attaching my new configuration file
Thanx in advance
Migrateduser
I did some more test on that.Only it ok with that table.
For example i added new group to the dcr. content_profile_groups table is ok it is updated But it is deleting in other tables for example models , related_files tables
Thanx in advance
Migrateduser
Your Foreign keys are still incomplete. you are not specifying them correctly. i.e. if you have a table which is referring to a bunch of cols from its immediate parents you need to include all those keys in the child groups foreign key section.
Migrateduser
Thanx for your reply.I modified my configuration file and i am attaching .
Now when i update it is not doing it and it is giving error ORA-01722: invalid number error.
Could you pls.check my configuration file once again.
Thanx in advance
RuntimeAndBeforeJobScript.png
PageBeginScript.png
LabelSettings.png
Migrateduser
Your keys are still incorrect, you cant have 3 keys pointing to the same FK. Also MODEL_ID and MACHINE_MODEL_ID dont seem to be available in 3rd_party_vendors. Same goes with consumable tables its child of product_models and it refers to keys from that group.
<foreign-key parent-group="3rd_Party_Vendors">
<column-pair parent-column="CONTENT_ID" child-column="CONTENT_ID" />
<column-pair parent-column="CONTENT_ID" child-column="MODEL_ID" />
<column-pair parent-column="CONTENT_ID" child-column="MACHINE_MODEL_ID" />
</foreign-key>
Migrateduser
Thanx for your reply.
in my config 3rd_Party_vendors goes to CONTENTS table which has primary key CONTENT_ID
In case of models group goes to model table which has
CONTENT_ID,
MODEL_ID,
MACHINE_MODEL_ID
IN ABOVE THREE ONLY CONTENT_ID IS AVAILABLE IN CONTENTS TABLE.
MODEL_ID AND MACHINE_MODEL_ID ONLY AVAILABLE IN MODELS TABLE.
for example for MODEL_ID AND MACHI_MODEL_ID I DON'T HAVE any parent column in 3rd_Party_Vendors group(Contents table).
I am wondering to how to refer in foreign key column pair
Thanx in advance
Edited by krishna1288 on 07/16/03 03:23 PM (server time).
Migrateduser
Hi,
Here i am giving my tables info.Could you pls. correct me in prepare configuration file for it.
CONTENTS PK
CONTENT_ID 1
BUSINNESS_UNIT
CONTENT_CATEGORY_ID
...
...
...
CONTENT_CHANNELS PK
CONTENT_ID 1
CHANNEL_CODE 2
CREATED_DATE
CREATED_USER_ID
CONTENT_DEALERS PK
CONTENT_ID 1
CHANNEL_CODE 2
CREATED_DATE
CREATED_USER_ID
CONTENT_MODELS PK
CONTENT_ID 1
MODEL_ID 2
MACHINE_MODEL_ID 3
MODEL_TYPE
CREATED_DATE
CREATED_USER_ID
CONTENT_PROFILE_GROUPS PK
CONTENT_ID 1
PROFILE_GROUP_ID 2
CREATED_DATE
CREATED_USER_ID
RELATED_CONTENTS PK
CONTENT_ID 2
RELATED_CONTENT_ID 1
CREATED_DATE
CREATED_USER_ID
RELATED_FILES PK
CONTENT_ID 1
FILE_ID 2
FILE_NAME
...
...
..
Thanx in advance
Migrateduser
Take a look at the attached example, for dcr type internet/medical. This is deeply nested and should help you in designing your schema.
Migrateduser
Thanx for your example.It is pretty clear.
I designed same way still it strange for me.In my dcr when i created dcr it is updated all the tables.
Second time i just edited my dcr only the title field. It is deleting row sfrom the models table ( in dd.cfg PRODUCT_MODELS rows) and RELATED_FILES first row.Remaining all same.
Any way once again thx for your suggestion.Here i am attaching configuration file.
Migrateduser
Sorry, I missed this before , you need to set update-type="standalone" and since you dont have path column you need to set delete-tracker="yes"
Migrateduser
Thanx for your reply. I added delete-tracker="yes" and update-type="yes".
Now i left with one more issue.
if you see my config file. I am updating my CONTENT_MODELS TABLE TWO TIMES when i save dcr. For example Product Models will go into the table with type =1 and accessories or consumables will store either type=2 or 3.
When i am using delete tracker it is just updating latest entry and deleting the previous entries in that. Remaining all working fine.
It seems in this it is just deleting based on primary key then inserting right?
Thanx for your help