Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DD Filtering Metadata dumpfiles
PaulW
I am trying to do a 3 tier OD-DD sync.
I have configured the TS box to create a dump file and deploy it to the web server, and then have the web server run a script which deploys the data to the sql server. Just the way the sample solution describes. This tries to deploy files fine.
The problem is, when there are files that have 1 of the metadata fields that have not been filled in, I don't want to deploy those records, otherwise the deploy fails, because they do not allow nulls in the database.
I cannot find any documentation on how to filter out when fields contain nulls, when deploying from Metadata dump file to Database.
Does anyone have any ideas?
Find more posts tagged with
Comments
Migrateduser
Questions/possible solutions since I just spent several weeks working with od-dd sync:
1) are you deploying teamsite metadata or custom metadata?
if you are deploying custom then in tsxml.cfg change your root values to teamsite-templating-records
2) you can change the loaddb.cfg to accept or not accept nulls by setting the not-null field to yes or no depending on what you desire?
PaulW
Thanks for the response. I am getting suicidal.
1) I am deploying TeamSite metadata. So my source in the tsxml.cfg file is "teamsite-extended-attributes".
2 there is an allow-nulls field that i set to "no" for the field that is causing the grief. This does not help. And I can't see any documentation to indicate that this allow-nulls field is used when deploying from metadata dump files to a DB.
Have I said something wrong? Any further suggestions?
Migrateduser
Do you have a mdc_dd.cfg file somewhere - you can modify the fields to suit your needs since your using teamsite metadata?
The file should be created in the teasmite\local\config directory by running
iwsyncdb.ipl -mdcddgen
then in that same directory take metadata-rules.cfg.example and rename it to metadata-rules.cfg then look at that file and you can change it to suit your needs
Other then this - I don't know - the od-dd sync was the last major piece I built and took me the longest by far to figure out
Edited by koneill on 05/22/03 07:30 AM (server time).
PaulW
Yeah, I configured it all exaclty as you said to do it. And when i did a test run with a few files that have all the fields filled in, it worked fine.
It only screwed up when i had files with metadata fields that were not present. The allow-nulls option doesn't seem to work for XML->DB deployment. There must be someway around this.
ANyone have any ideas?
Migrateduser
If you set allows-null="no" DD will create table with column that doesnt allow null attributes. If you set allows-null="yes" you need to make sure that you are providing a value for that particular column. One workaround would be to alter the table to make the specific columns to allow null values or drop the table, change the config file to set allow-nulls=yes for the specific columns and rerun the deployment.
PaulW
so does that mean the allows-null attribute is only used for the table creation? I already have the database table created. My problem arises when DD is trying to insert tuples that are missing fields (eg. TeamSite/Metadata/DateUpdate)
It is trying to insert records for files that have never been manually tagged by users, but they have been tagged by Templating. That is why my fields have no values.
So i need to figure out how to prevent records from being inserted if they have not been tagged by a user before.
Migrateduser
allows-null attribute is only used for table creation. DD cannot prevent inserting null values for non-key columns currently.
If you want to ignore the error while inserting null attributes and continue with the deployment, you could set commit-batch-size="1" in your <database> element that way if the insert fails due to null constraint violation you can go further with rest of the deployment.
PaulW
Thanks for the advice. I inserted:
<database use = "DevTeamSite"
update-type = "standalone"
state-field = "state"
commit-batch-size = "1" >
And it appears to inser thte reocrd in the log file, but everything gets rolled back. Are there any other catches to this method? It doesn't seem that the commit-batch-size="1" is even getting read.
thanks.
Migrateduser
Please post your log file
PaulW
Here is my log file
Migrateduser
This is due to bug#40405: commit-batch-size is not supported for source xml-formatted-data. Please follow up with TechSupport for a fix.