Null pointer error with SCD component before data arrives

Highlighted
Seven Stars

Null pointer error with SCD component before data arrives

Using Talend Open Studio 6.4.0 I am trying to make use of the tMysqlSCD component. When I run the job I immediately get a null pointer error, even when no rows have been ingested or processed through the job. 

My input doesn't have null values for the primary key and the surrogate key is generated by talend based on the settings of the SCD component

The job has 2 sql connections to read main and lookup flows from a staging database and then write to a data mart using SCD

Exception in component tMysqlSCD_1 (jobname) 
java.lang.NullPointerException at projectworkspace.jobname_version.jobname.tMysqlInput_1Process(jobname.java:2288)
at projectworkspace.jobname_version.jobname.tMysqlConnection_1Process(Researcher_Dimension.java:687)
at projectworkspace.jobname_version.jobname..runJobInTOS(Researcher_Dimension.java:5741)
at projectworkspace.jobname_version.jobname..main(Researcher_Dimension.java:5502)

Is there something obvious I am missing 

 


Accepted Solutions
Seven Stars

Re: Null pointer error with SCD component before data arrives

thanks @cterenzi and @xdshi

The before picture, I had the connections set on Component Ok because I assumed it would validate the connection (never really considered it a subjob)

tMysqlSCDBefore.png

The After Picture

Job runs without null pointer on SCD

tMysqlSCDAfter.png

View solution in original post


All Replies
Ten Stars

Re: Null pointer error with SCD component before data arrives

Just guessing since I can't see your job layout, but does your tMysqlSCD component rely on a tMysqlConnection component for its connection? If so, you have to ensure that the connection component executes before subsequent components. You can do this with a trigger link (OnSubjobOK) or by attaching the connection component to a tPrejob component.
Moderator

Re: Null pointer error with SCD component before data arrives

Hi,

Could you please post your job setting screenshots on forum? Which will be helpful for us to address your issue.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: Null pointer error with SCD component before data arrives

thanks @cterenzi and @xdshi

The before picture, I had the connections set on Component Ok because I assumed it would validate the connection (never really considered it a subjob)

tMysqlSCDBefore.png

The After Picture

Job runs without null pointer on SCD

tMysqlSCDAfter.png

View solution in original post

Ten Stars

Re: Null pointer error with SCD component before data arrives

Glad your problem was fixed

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog