https://linen.dev logo
#connector-development
Title
# connector-development
l

Luis Gomez

04/05/2022, 1:32 PM
Hi team! I am using the Salesforce source connector to sync accounts, contacts and users. These objects have fields that reference other objects by containing their IDs. Although we know which object to lookup for standard fields, there are also custom fields where we wouldn’t know what kind of object they reference. I am willing to update the connector, but I’d like to ask this first: is it okay to add a config parameter to include field metadata in the records? (we can get that metadata easily from Salesforce).
o

Octavia Squidington III

04/05/2022, 3:21 PM
loading...
s

Sherif Nada

04/05/2022, 10:07 PM
@Luis Gomez can you share an example of this? this sounds like a useful feature to have yes
l

Luis Gomez

04/05/2022, 10:15 PM
Yeah, for example, we want to be able to show the Account properties we import to our users. However, some of those properties are custom fields, like
Workflow Specialist
in the following picture. We ultimately want users to see the workflow specialist name rather than its ID. Workflow specialist is a custom field that belongs to the Account definition of that Salesforce instance. If we could include the field metadata in the records, we could generically determine what Salesforce Objects those ID reference.
If we called the
GET /Account/describe
endpoint of that salesforce instance, you’d see something like this:
Copy code
{
    "actionOverrides": [...],
    "childRelationships": [...],
    "fields": [
       ...,
       {
            "custom": true,
            "label": "Workflow Specialist",
            "name": "Workflow_Specialist__c",
            "referenceTo": ["User"],
            "type": "reference",
            ...
        },
       ...
    ],
    ...
    "label": "Account",
    "labelPlural": "Accounts",
    "name": "Account",
    "recordTypeInfos": [...],
    "supportedScopes": [...],
    "urls": {...}
}
So my question is if it’s okay to add the
fields
property to the Salesforce record if a new param is provided in the Salesforce source config. It would not break backwards compatibility.
@Sherif Nada ^^
I’ve submitted this PR: https://github.com/airbytehq/airbyte/pull/11747. It shows what I’m trying to do.
3 Views