StrataFrame Forum

Problem in deploying data with DDT

http://forum.strataframe.net/Topic21853.aspx

By GRocchi - 2/6/2009

I have a project and a table which I'd like to get deployed by the DDT.

If I run the DDT and the target table is empty in the database I get 74 records (that's correct)
If instead the table has records in it (the 74 I just exported) the DDT says he has imported 74 records, but when I see the table actually only 20 exist.

The Deployment data package is configured with the Overwrite option (I expect to rewrite the whole table every time) and the table has a primary key made by two column (this last thing is perhaps the only difference between other tables that are working well)

What can the problem be?

By Trent L. Taylor - 2/6/2009

That sounds strange.  If you have the overwrite set, then it should create the records and overwrite any existing PKs that are in the table.  However, if there are some constraints that could be associated with the table in question and the records, when added, prevent a constraint error, it could be possible to see something like this.  I would be curious to see the package file and deploy it here along with a SQL database that has records in it that reproduces the problem.  But the first place I would look would be contraints and then verify that the overwrite is set on the data packages.
By GRocchi - 2/16/2009

Sorry for delay, but I'm rather busy at the moment:

Attached is my file: the table of interest is the "CausaliConfigurazioni" Table:
I am sure that the table in my source db has 74 records, when I deploy the data the DDT says "74 records imported" but when I look into the table I find the records to be only 20

Incidentally I noticed that the records are suspiciously the same as if I would try to Insert the records one at a time and if the primary key would be only made of one field(so that some records overwrite each other)

Perhaps I should tell the DDT that the table has 2 fields as Primary key? How can I do this?

Thanks in advance and best regards

By Dustin Taylor - 2/16/2009

Oh, trust us, we understand being busy Wink.

One thing to check: I imported the table structures in your package file and noticed that neither of your PKs are marked as Updatable (see attatched image).  Are these keys both auto-incrimenting? If either or both of those columns are not autoincrimenting, I would try checking that check box and re-deploying the package to see if the problem persists. The issue may be that the DDT thinks it can't overwrite the values for those PKs and as such isn't overwriting the existing records as it should.

Unfortunately we can't test this definitievely on our development machines at the moment. We've recently updated the structure of the DDT package files and, as such, I can't deploy a DDT package created with the old version w00t. We'll be releasing a new beta build within the next few days that will have the new DDT structures, so if the above idea doesn't shed any light on this, we can load that on your end, re-create the package, and then we'll be able to deploy it on our development machines and get a better idea of what is going on.

By Edhy Rijo - 2/16/2009

Dustin Taylor (02/16/2009)
...We'll be releasing a new beta build within the next few days that will have the new DDT structures...

I love having new updates down the pipe Tongue

By Dustin Taylor - 2/17/2009

Trent posted the new beta build this morning here. So if you are still running into this, GRocci, load that, re-generate your DDT package, and let's take another stab at it. Smile