Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! I am relatively new to Talend. I have successfully created a job that pulls filtered data from our AS400 and inserts into a custom Sales Force object in my Sandbox environment. Now I need to create a step that deletes all records in the Sales Force custom object before the insert. I was able to find several posts regarding this topic however none had solutions. So far I have a tSalesforceOutput component with the Output Action = DELETE. Next is a tLogRow component (so I have a list of the record Ids). Then a tSalesforceInput component. I can execute the job without error but no records are deleted in Sales Force.
Any assistance would be greatly appreciated.
cjsigler
Hi,
You must know Salesforce Id for records you want to delete.
So, you need a tSalesforceInput to select these Id, then using tSalesforceOutput (or tSalesforceOutput if lot of records) you can delete the selected records. Just be careful to have Id as the only field in the schema for both components.
Here is the minimal job design for such a case:
tSalesforceInput --> tSalesforceOutput
Can you share your job?
Hi,
You must know Salesforce Id for records you want to delete.
So, you need a tSalesforceInput to select these Id, then using tSalesforceOutput (or tSalesforceOutput if lot of records) you can delete the selected records. Just be careful to have Id as the only field in the schema for both components.
Here is the minimal job design for such a case:
tSalesforceInput --> tSalesforceOutput
Can you share your job?
So it sounds like I have my components backwards. Not sure how to share the job so here is an image.
Like this?
That worked!! I had my components backwards! Thanks so much!!
That's what I was going to tell you.
For best practice allways design your jobs from left to right and top to down.
cjsigler, I'm trying to create a Delete job like yours, but not sure what I'm doing wrong?
My insert query/job works fine which uploads data from MySQL to my custom Salesforce object (see below):
- But how do I combine/add in the Delete option?
- I need to alter my job below to first do the Delete
- Then complete the Insert job