Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am migrating data from source to target, both are Postgresql databases and it is direct mapping. Now while i am trying to migrate data from source to target, i am getting error like Cannot cast to boolean: "3". I have checked my source there is no column with value 3 for boolean datatype. I didn't know from where it is getting, i have used option like guess query in source. Can anyone help me to resolve this issue. Thanks in advance. Please find the screen shot of my job for more information.
The mapping between the fields of your query and the fields of the schema is not done by the name, it is done by the simple order of the field.
For large number of fields this can be cumbersome to finde the position and the related field.
The by far best way to handle such problems is to let the studio create the schema for you with the Guess Schema function. This way you can be sure to have the right schema. If this schema does not match exactly to the desired traget schema put a tMap between source and target and map there the differences.
If your use case is to transfer a lot of tables without changing the field names you can also consider to use the custom component tPostgresqlTrableTransfer. This component transfers the data from any source database into a postgresql target database without the need to handle a schema. The component creates the transfer schema automatically internal.
Hi
Double check the query and schema, the fields returned by query should map the columns defined on the schema of tDBInput.
Regards
Shicong
The mapping between the fields of your query and the fields of the schema is not done by the name, it is done by the simple order of the field.
For large number of fields this can be cumbersome to finde the position and the related field.
The by far best way to handle such problems is to let the studio create the schema for you with the Guess Schema function. This way you can be sure to have the right schema. If this schema does not match exactly to the desired traget schema put a tMap between source and target and map there the differences.
If your use case is to transfer a lot of tables without changing the field names you can also consider to use the custom component tPostgresqlTrableTransfer. This component transfers the data from any source database into a postgresql target database without the need to handle a schema. The component creates the transfer schema automatically internal.
Thanks @Shicong_Hong. Error was resolved, it was error from mapping. Thanks for you reply @Shicong_Hong.