Import package - Salesforce to SQL - Upsert

  • 54Views
  • Last Post 30 June 2021
0
votes
Jessie Traynor posted this 18 June 2021

Hello, I'm trying to create an import package from SalesForce to SQL.

 

It needs to be an UPSERT operation.

 

I've created a task for this, writing back to Salesforce the PrimaryKey created on SQL when a new record is inserted.

 

It's a regular numeric field on Salesforce.

 

The first run is ok, however, every time I try a second run, the data gets duplicated in SQL.

 

Can you guys help me?

 

 

 

Thank you

Attached Files

Order By: Standard | Newest | Votes
0
votes
Sabina Bashuk posted this 22 June 2021

Hello Jessie,

Thank you for contacting Skyvia Support!

Could you please provide us with the link to your package, so that we could check?

0
votes
Jessie Traynor posted this 22 June 2021

https://app.skyvia.com/#/62497/packages/130628

 

0
votes
Sabina Bashuk posted this 22 June 2021

Jessie, we have created a similar package on our end to test, and there was no records' duplication.

When Skyvia runs an Upsert operation, it shows all the processed records.   For example if there are 3 records in Salesforce, ans the SQL table is empty, then for an Upsert package during the first run the log will show 3 records.   For the second run the log will show 3 records as well, but they will not be inserted, just updated.   Maybe this situation confused you after the second run?

0
votes
Jessie Traynor posted this 22 June 2021

No...

The number of records on the table were doubled.

Could you share how you build that similar package?

 

thx

 

0
votes
Sabina Bashuk posted this 23 June 2021

Hi Jessie,

Do you mean the records we duplicated?

0
votes
Jessie Traynor posted this 30 June 2021

Yes

 

They were duplicated.

However, after some stuggle we were able to fix it ourselves.

The problem was when creating the lookup for id field.

 

Thank you very much 

Close