Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
akumar2
Contributor
Contributor

data Migration

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.

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
jlolling
Creator III
Creator III

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.

https://github.com/jlolling/talendcomp_tDBTableTransfer

View solution in original post

4 Replies
Shicong_Hong
Support
Support

Hi 

Double check the query and schema, the fields returned by query should map the columns defined on the schema of tDBInput.

Regards

Shicong

jlolling
Creator III
Creator III

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.

https://github.com/jlolling/talendcomp_tDBTableTransfer

akumar2
Contributor
Contributor
Author

Thanks @Shicong_Hong. Error was resolved, it was error from mapping. Thanks for you reply @Shicong_Hong.

akumar2
Contributor
Contributor
Author

Hi @jlolling, error was resolved. It was error from mapping. Thank you for you response @jlolling.