Six Stars

Salesforce Upload Process

Hello there,

 

I am tying to build a job which loads data into salesforce regularly - the job is divided into three parts:

 

- Import of CSV into Database

- Matching of data in Salesforce

- UPSERT

 

I am able to complete the first job, however running into random problems in the second job. Surprisingly the component works sometimes but most of the times struck and ultimately i have to kill the job (screen shot attached).

 

The second problem on the same job is it process more records but only report very less in the Error and Success files after UPSERTING. 

 

please help

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars TRF
Twelve Stars

Re: Salesforce Upload Process

It seems you have a dead lock on oracle side. Try to open a connection at the beginning of the job, then reuse this connection in the tOracleXxxx components. This way all operations will be realized within the same session. I suggest you to try this as in any case it is a best practice to reuse connection when possible.

TRF
9 REPLIES
Six Stars

Re: Salesforce Upload Process

Attachments

Twelve Stars TRF
Twelve Stars

Re: Salesforce Upload Process

Hi,

 

Try to connect subjobs using "OnSubjob OK" link  between both tXxxxxInput components.

However, maybe a problem due to your network connection (a microcut and your job will wait for the response which will never arrive).


TRF
Six Stars

Re: Salesforce Upload Process

Hey,

 

thanks for your reply, really appreciate you time.

 

I just wanted to say that this sound familier because job runs fine sometimes. for example i ran the job today and it worked fine but stuck again.

 

If i remove oracleoutput and connect it to tlogrow then it shows the expected result. (even if i run the job 10 times) can you please tell me the way i can find out if problem is related to network?

 

Ankur

Twelve Stars TRF
Twelve Stars

Re: Salesforce Upload Process

Maybe a deadlock problem on Oracle side.

Can you 1st change the design as suggested previously?


TRF
Six Stars

Re: Salesforce Upload Process

Hey,

 

Can you please tell me how to do that, i am pretty new to talend. this will be massive help.

 

A

Twelve Stars TRF
Twelve Stars

Re: Salesforce Upload Process

Delete the "On Component OK" on tOracleOutput component.

Right click on 1st tOracleInput component then Trigger, click on the "On Subjob OK"  and drag the link to then 2nd tOracleInput.


TRF
Six Stars

Re: Salesforce Upload Process

Hey,

 

I have tried that but no luck, the job stuck at first part when updating the database. 

 

I am trying to update the SFID in the database table as you can see the job, it updates one row and stuck there. The database field is not the primary key but i am making it a key in the job. The reason it is not a primary key because it has nulls and i want to update only row which has values. Any thoughts on this?

 

A

 

 

Twelve Stars TRF
Twelve Stars

Re: Salesforce Upload Process

It seems you have a dead lock on oracle side. Try to open a connection at the beginning of the job, then reuse this connection in the tOracleXxxx components. This way all operations will be realized within the same session. I suggest you to try this as in any case it is a best practice to reuse connection when possible.

TRF
Six Stars

Re: Salesforce Upload Process

Hey,

 

thanks for drawing me to the right direction, it was indeed a dead lock in the database side. I clicked commit on the oracle side and problem was resolved. Now i am following your instructions to avoid the same situation.

 

thanks again

 

A