Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MySql To MS SQL - Cannot insert null values into column

Hello All,

I am newbie to talend and trying to explore talend in different ways.

First thing that i have tried is transforming data from MySql to MS SQL server.

I was able to create connection and the connection was successful for both MySql and MS Sql Servers.

 

The flow is looks like as below image.

MySql Connection:- 

0683p000009M4q8.png

 

MS SQL server Connection:-

0683p000009M4qD.png

 

Both Connections are successful .

i did used tMap to map columns between these to.

0683p000009M4qI.png

 

MySql connection DB Input configurations:

 

0683p000009M4qN.png

 

And the schema of table looks like this.

 

0683p000009M4h4.png

tMap Configuration and mapping:-

 

0683p000009M4qS.png

 

MS Sql Server Output Configuration:-

 

0683p000009M4qX.png

 

Schema of MS SQL Server Table:-

0683p000009M4qc.png

 

But when i try to run this job,

it giving me error as null values cant be inserted into the table as below image.

0683p000009M4qh.png

 

Can anyone please guide me where i am going wrong.

 

Thanks in advance.

Mohan V.

 

Labels (4)
1 Solution

Accepted Solutions
manodwhb
Champion II

@Moe , I am attaching the sample code,pleas find.


Tests.zip

View solution in original post

5 Replies
manodwhb
Champion II

@Moe ,can you check that in mysql side is that empid having null values? if yes you need to restrict in tmap ,by activating filter like row1.empid != null .

you can verify that empid is coming as null from my sql to write to file or tlogrow.

Anonymous
Not applicable
Author

@manodwhb  thanks for the quick reply.

0683p000009M4ik.png

 

I am not sure where i have to write this filter expression in tmap.

so i jus tried this as above image.

but it giving the error as "Exception in thread "main" java.lang.Error: Unresolved compilation problem: "

 

Can you please guide me where exactly i have to write this expression and how

manodwhb
Champion II

@Moe ,what is the data type of empid?

Anonymous
Not applicable
Author

its varchar(8)

manodwhb
Champion II

@Moe , I am attaching the sample code,pleas find.


Tests.zip