heroku / salesforce-bulk

Python interface to the Salesforce.com Bulk API
MIT License
207 stars 154 forks source link

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

Open Patiladi778 opened 4 months ago

Patiladi778 commented 4 months ago

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.