[SalesForce] How to retrieve compound fields like address using Bulk API

Attempting to retrieve address fields (such as BillingAddress on Account) via Bulk API gives an error:

Failed to process query: FUNCTIONALITY_NOT_ENABLED: Selecting compound
data not supported in Bulk Query

Sure enough, the Bulk API docs say:

Bulk API can’t access or query compound address or compound geolocation fields.

Is there really no way to access address and geolocation data via the Bulk API?

Best Answer

There is a clue in this help page on compound fields:

Compound fields can't be included in Bulk queries. Use the individual field components to access or update field values.

It turns out that you can use the component fields like so:

SELECT BillingStreet, BillingCity, 
       BillingState, BillingCountry, BillingPostalCode, 
       BillingLatitude, BillingLongitude
FROM Account
Related Topic