While developing a data migration application, using Mulesoft's Anypoint Platform, I've encountered an issue with the insertion of the data of a table that has an identity attribute.
To insert data on those types of tables, I usually use the command
SET IDENTITY_INSERT table_name ON;
proceed to insert the information and use the command
SET IDENTITY_INSERT table_name OFF;
to turn it back off. However, with Mulesoft it's a bit different. My flow looks like this.
I've tried it multiple ways, I used Execute Script instead of Execute DDL, I've changed the Execute DDL component to different locations but anywhere other than where it's at changes the payload, I've also tried to put all the commands on the same component but it's not allowed any command other than Insert on the Insert component and with the Execute DDL component I can't receive the payload.
Any help is appreciated!
Thank you
EDIT: To anyone that has this problem creating a stored procedure with the IDENDITY_INSERT and the insert code should do it!