Are there plans to let the Salesforce source plugin return more than just the object type and Id?
For example, if I whitelist Contact, will it return FirstName, LastName, Email, etc.?
Maybe I’m missing something or this is just a newbie question.
Are there plans to let the Salesforce source plugin return more than just the object type and Id?
For example, if I whitelist Contact, will it return FirstName, LastName, Email, etc.?
Maybe I’m missing something or this is just a newbie question.
Hi @unbiased-coyote,
We also save the raw JSON response for the object under _cq_raw
. Can you see if that has the information you need?
Hi @erez, great, thanks for the direction. I see the values.
@erez, it is strange though; in the Account object, the Name field isn’t in the JSON. Salesforce Account Object Documentation
What type of accounts are you seeing this for? Looks like that for person type accounts this is a concatenation of FirstName
, MiddleName
, LastName
, and Suffix
, so that could be the reason.
I saw that, but these are not person type accounts.
On another note, I got all this working on my Mac, but now I’m doing it all in a dev container. My Dockerfile brings down the CLI, and when I run the Salesforce to Postgres sync, I get this:
Output: Loading spec(s) from sfdc-postgres.yml
Error: failed to start plugin .cq/plugins/source/cloudquery/salesforce/v4.6.5/plugin: fork/exec .cq/plugins/source/cloudquery/salesforce/v4.6.5/plugin: exec format error
I am running an M3 Mac. I think I’m on it; I’m mounting the same directory from my Mac, so the wrong plugins are there. I’ll put some logic to wipe the plugins directory on start.
Hi @unbiased-coyote, sorry for the late follow-up.
Regarding the Docker error, it looks like you resolved it, but see a relevant guide here: Docker Offline Guide.
For the missing Name
field in the account, can you share under what conditions you’re seeing it blank? That is, what is the account type that’s missing the Name, and does that account have FirstName
, MiddleName
, LastName
, Suffix
values?
Hi @erez,
I’m used to a Business Account, which just has a Name field, which is the name of the Account (e.g., Discord, Inc.).
In the CloudQuery JSON, there actually isn’t a Name field for Account objects. I write other Python CLIs that retrieve Accounts and have the Name field.
It appears Person Account is not as common, and I would have to enable it in my Salesforce instance.
I ended up writing a CLI to take the object records in that JSON and create separate tables like accounts, contacts, opportunities.
That’s cool @unbiased-coyote! Let me open a bug report about the missing name in the business account.
For the tool you wrote, you might be interested in our new transformation support. With that support, you should be able to write a transformer plugin that plugs in between the Salesforce source and the Postgres destination to unwrap the JSON data.
See more in Introducing Transformer Plugins and Basic Transformer Plugin.
I opened a bug for the .Name
issue here: Issue #19164.
oh cool @erez I’ll check it out - thanks for steering me to that.