1
votes

I’m using the python salesforce_bulk library to extract data from Salesforce.

from salesforce_bulk import SalesforceBulk

If I attempt to read all fields of some tables an error is returned INVALID_FIELD. Using the CONTACT table as an example I first perform a describe on the object to return all fields, then use that field list to query Salesforce. This returns an error giving me a list of invalid fields.

The query will work once those fields are removed. I’m sure my account has access to those fields because I can extract them using the synchronous (non bulk) query-all API. This uses the requests library.

I know compound fields are not supported by the bulk API so those have all been removed.

List of invalid fields from the CONTACT table:

Column              Salesforce Data-type
EmailBouncedDate    DateTime
IsEmailBounced      Bool
PhotoUrl            V_WString
Jigsaw              V_WString
JigsawContactId     V_WString
IndividualId        V_WString
ActivityMetricId    V_WString
Preferred_Name__c   V_WString

Any advice would be greatly appreciated. Thank you

1

1 Answers

1
votes

Maybe bulk API respects the org security & config bit more. I wouldn't count on SF not locking down the other API in future. (I know it's stupid but are you sure you're connecting to same SF org? with same API version? We're on v 50.0 now).

You could check what's really accessible to your user by querying FieldPermissions.

From what I remember (go to sf help for confirmation)

  • EmailBouncedDate, IsEmailBounced - they appear in the org only if in Setup->Deliverability you activated bounce management
  • PhotoUrl - do you have Chatter enabled? Or it might be something with Social connectors like LinkedIn, Facebook
  • Jigsaw - that's a very old name for Data.com feature that seems to have been crippled during Europe's GDPR s***storm. I think they're working on better version but no ETA
  • IndividualId - looks like your org doesn't have Individuals enabled. It's another GDPR-ish thing, lookup from Contact (or Lead) to helper object where you can capture marketing consents etc better
  • ActivityMetricId - don't recognise that one
  • Preferred_Name__c - that's your custom field. You said you checked permissions, you sure this one is readable to your profile?