Developer forum

Forum » Integration » Manipulate data from integration source

Manipulate data from integration source

Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

We have an integration source which give boolean data in a wrong format, and it cant be changed.
Is it possible to manipulate this in the integration job, ex. with @Code() ?

Ex. the data source return "0" or "1" as a string, representing "0" = false and "1" = true.
How can we manipulate that data so that the integration job understand that "0" = false and "1" = true?

I tried something like this in the scripting section of the integration job column @Code({{ColumnName}} == "1" ? true : false) but that was clearly wrong...


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Martin,
if you are importing from source column of type System.String to the destination column of type System.Boolean then it should work and auto convert 1 to true and other value to false.
Try to check if your schema is of type System.String for the source column where you have 0/1 values and System.Boolean is the destination column type.
Also if that still does not help, let me know what are your source and destination providers that are not working?
BR, Dmitrij

 
Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

Hi Dmitrij,

When we try to import it directly we get this error: Import job failed: cannot parse '1' to a System.Boolean.
The source is SQL provider with views and the destination is Dynamicweb provider maybe thats the issue?

 

You must be logged in to post in the forum