Data Migration - Preview of SQL Statement to be generated

Related products: Software Factory

Data Migration - Preview of SQL Statement to be generated 

When using Data Migration it should be nice to see a preview of the generated SQL 

for the column and for the table.

 

So we can dry run the statement to check the output and dont have to deploy to see if the sql is working correct

 

 

Hi Theo,

I like the idea of showing the generated code of the Data migration itself. But to dry-run the code it would require a couple different queries, such as the rename existing table, create new table, migration of data from one to another, and the drop table statement. We cannot run these statements in a single statement/query as these type of queries must be the only statement in a batch; hence we divide these queries using "GO”.

And there could be one or more Upgrade control procedure that perform mutations on the data or handle the data for this particular migration. Those would then not be included in this overview as there's no assignment between the data migration and the assignments of the Upgrade control procedure.

 

We would like to know why you would like to dry-run this. Do you often use expression or are there other bad experiences that fuel the desire to dry-run a data migration?


NewNeeds feedback

NewNeeds feedback

Mark

 

i don't want to dry run this in SF, i just want to reproduce the sql so i can use it in SSMS to dry run


i don't want to dry run this in SF, i just want to reproduce the sql so i can use it in SSMS to dry run

I understand, but to dry run this you would need a copy of your product database to test this on and run the complete Upgrade code file. Minimum we could offer to do that is to generate the Upgrade code group and the source code for it. This would allow you to open it externally and run it on a copy of your product database.

However, we may be able to solve the need for this by identifying the challenges you currently face. We would like to know why you would like to dry-run this. Do you often use expressions in the data migration or are there other bad experiences that fuel the desire to dry-run a data migration?


Mark,

 

the reason why i came to this, was that the sql which was created used a coalesce statement which i didnt expect. 

I understand that the dry run should make it more complex so just a preview should be sufficient for us.

then we can create the dry run ourselves. i suspect it could just look like the sql output we can preview in the unit tests functionality

 


Okay, the coalesce most likely occurred because both the Default value (query) and the From column were filled. This indicates to the Software Factory that when the From column does not supply a value to the new table, that the Default value (query) is then used to supply a value to that column. If the coalesce was undesired, the From column should be empty.

Nevertheless, I will open the idea for the possibility to view the data migration code from the Data migration screen 👍


Needs feedbackOpen