More than one tneo4jrow in subjob

Five Stars

More than one tneo4jrow in subjob

 

Hi!

I have a problem when I want to use two tneo4jRow in the same subjob. When I try to run this job, it gives me an error saying that "nbRelationshipDeleted_tNeo4jRow_2 cannot be resolved to a variable". So, my question is: Is it possible to do this?. I am using Talend for Big data 7 and Neo4j 3.2.x driver.

 

The reason I want to use two tneo4jRow is because I want to create different type of nodes (category, nominee, ceremony, etc...) in my graph database. The JSON file I receive is a list of nominees of each category of the Oscars award.

 

 

Screen Shot 2019-07-22 at 12.27.00.pngMy subjob with two tneo4jrow

 

Screen Shot 2019-07-22 at 12.35.00.pngThe error I get when I run my project

 

 

Screen Shot 2019-07-22 at 12.35.00.pngThe error I get when I try to run the project

 


Accepted Solutions
Community Manager

Re: More than one tneo4jrow in subjob

Actually, I have a better solution. Take a look at the screenshot below. This layout will work....

 

Screenshot 2019-07-25 at 11.03.52.png

View solution in original post

Community Manager

Re: More than one tneo4jrow in subjob

I am not certain whether you will be able to see this since I raised it and I am internal to Talend. Take a look here: https://jira.talendforge.org/browse/TDI-42748

Hopefully you will be able to follow that to see when it is resolved

 

Thanks for raising this issue

 

View solution in original post


All Replies
Community Manager

Re: More than one tneo4jrow in subjob

These are compilation errors. Can you click on the "code" tab (bottom left of the design window) and when it opens look for red rectangles on the right of the window. Click on each of the red rectangles (if more than one) and take a screenshot of the code that is shown. This will show us the errors. This looks like the components are not configured correctly. We should be able to identify what is wrong from the generated code.

Five Stars

Re: More than one tneo4jrow in subjob

This is the error in the code. If I change the order of the links, I get the same errors but with tneo4jrow_1.

Screen Shot 2019-07-22 at 14.49.42.pngError

 

Community Manager

Re: More than one tneo4jrow in subjob

I'm making a few assumptions here, but I take it that there is no issue with tNeo4jRow_1? Can you show us a screenshot of the tNeo4jRow_2 configuration? 

 

Having two of the same component should not cause an issue. It is highly likely that this is simply a component config issue. 

Five Stars

Re: More than one tneo4jrow in subjob

These are my configuration of tneo4jRow_1 and tneo4jRow_2. The query is just for testing, it is not important.

If I change the order of the links, I will have problems with tneo4jRow_1 like I described above.

Screen Shot 2019-07-22 at 19.54.25.png

 

Screen Shot 2019-07-22 at 19.54.34.png

 

Community Manager

Re: More than one tneo4jrow in subjob

You should have some code in your job's code that looks like this for both tNeo4jRow_1 and 2

 

long counter_tNeo4jRow_2 = 0;
long nbNodeInserted_tNeo4jRow_2 = 0;
long nbRelationshipInserted_tNeo4jRow_2 = 0;
long nbPropertiesUpdated_tNeo4jRow_2 = 0;
long nbNodeDeleted_tNeo4jRow_2 = 0;
long nbRelationshipDeleted_tNeo4jRow_2 = 0;

Your screenshot of your code makes it look like your variables are not being initialised.

The reason I asked to see your component config is to check that everything looked ok there. You can often get Java errors due to missing quotes and silly things like that. Your components look like they are configured OK. 

Sometimes (rarely these days) a job can become corrupt and you get weird issues like this. Have you tried recreating a new job?

Five Stars

Re: More than one tneo4jrow in subjob

I have declared those variables. The code is generated automatically. I didn't modified it.

Is it possible to do what I want to do with the tneo4jRow? if so, is there any talend + neo4j tutorial?

 

Screen Shot 2019-07-23 at 10.04.54.png

 

Community Manager

Re: More than one tneo4jrow in subjob

Unfortunately it is really difficult to identify an issue like this without actually having access to the job. What you are seeing are compilation issues. This *could* be a bug you have found, but I cannot identify this without having access to the job. Would it be possible for you to export your job into a zip file and post it here so that I can take a look on my Studio?

Five Stars

Re: More than one tneo4jrow in subjob

I really think that is it a bug. If so, How can I do what I want to do? Is there another way to do it in Talend?

I attach my project so you can try it in your Studio.

Community Manager

Re: More than one tneo4jrow in subjob

Thanks @matias. I had to download a new Studio to test this, so it took some time. I believe you may have found a bug. I have raised this. However this doesn't solve your problem.

 

I'm afraid that the only way I can think to potentially solve this is to use Child Jobs. Create a job which simply uses the tNeo4jRow component to do what you are doing with each of your tNeo4jRow components. Then use that Child Job (using a tRunJob component) to run that code in isolation. Essentially your job layout would be two tRunJob components after your tMap. Your tRunJob components would trigger jobs which simply run your tNeo4jRow components.

 

I know this is a pain, but it appears that something weird occurs with the code generated when using more than 1 tNeo4jRow components. This has been raised as a bug.

Community Manager

Re: More than one tneo4jrow in subjob

Actually, I have a better solution. Take a look at the screenshot below. This layout will work....

 

Screenshot 2019-07-25 at 11.03.52.png

View solution in original post

Five Stars

Re: More than one tneo4jrow in subjob

I tried this solution you suggest and "solved" my problem. About the bug I found, How can I know It is resolved?

Thank you very much for your help.

Community Manager

Re: More than one tneo4jrow in subjob

I am not certain whether you will be able to see this since I raised it and I am internal to Talend. Take a look here: https://jira.talendforge.org/browse/TDI-42748

Hopefully you will be able to follow that to see when it is resolved

 

Thanks for raising this issue

 

View solution in original post

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now