Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to catch error while inserting data to salesforce using salesforce bulk lib. #118

Open
Patiladi778 opened this issue Jul 31, 2024 · 0 comments

Comments

@Patiladi778
Copy link

Patiladi778 commented Jul 31, 2024

Hi all, I am Inserting a data into salesforce workbench using salesforce bulk lib.
MY code -
job = bulk.create_insert_job("Account", contentType='CSV',concurrency='Parallel')

csv_iter = CsvDictsAdapter(iter(list_of_dicts))
try:
batch = bulk.post_batch(job, csv_iter)
bulk.wait_for_batch(job, batch)
bulk.close_job(job)
except Exception as e:
print('error while inserting to salesforce ',e)

I have a data type miss match between source and target location, but I am unable to log the error.
Suppose the batch has 100 correct and 10 wrong records will the lib insert 100 records or will not insert any data.

@sr @kennyp @voidlock @jmalonzo Could you please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant