-
Notifications
You must be signed in to change notification settings - Fork 662
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
Adds Bulk API notes. #717
base: master
Are you sure you want to change the base?
Adds Bulk API notes. #717
Conversation
docs/user_guide/bulk_api_notes.rst
Outdated
Exception Code "InvalidBatch" with message "Records not processed" | ||
================================================================== | ||
|
||
When processing your Bulk API request, one of the first chings Salesforce does is to check the schema of your payload. If the schema is not correct, you will get an error message with the exception code "InvalidBatch" and the message "Records not processed". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelling: "chings"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overally, VERY needed addition to the documentation!! Please approve this PR.
docs/user_guide/bulk_api_notes.rst
Outdated
|
||
my_dataframe['Account__r'] = my_dataframe['Account__r'].apply(lambda x: {'AccountNumber': x}) | ||
|
||
This will convert the `Account__r` column to a dictionary with the external id field that you are using to look up the Account object. This is because of the way relationships work in Salesforce. If you are somewhat familiar with how the platform's database works, you will notice that for the row that is going to be inserted the column that references the lookup object is transformed to an object, in a similar way that in Apex you use the relationship field to access the fields of the related object. This works for standard objects as well, where instead of *ContactId* you would use just *Contact*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finding this sentence just a bit unclear. Unsure how to suggest an improvement but for someone unexperienced in Apex its hard to envision what being 'transformed to an object' means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some changes to this PR so that the spelling is fixed and this part is a little better explained.
I thought of adding these Bulk API notes to help anyone who might be struggling a bit with the
sf.bulk.
methods of the library. In this text I write about a common error ("InvalidBatch") and how to check the data before sending it over to Salesforce, and also add some tips on preparing the data's date/time columns and relationship fields.