Using the Lookup External Record Function

Reza Farpour
Reza Farpour
  • Updated

Syncari offers a multitude of functions that can be used to build your data pipelines.

Function

Lookup External Record

Availability

  • Entity Pipeline ✅️
  • Field Pipeline ✅️

Purpose

The Lookup External Record function allows you to run a lookup, similar to our Lookup Syncari Record function, but allows you to look directly to an external system instead of the Syncari data set. This is especially useful when you have a large data set that will be used very infrequently in Syncari and isn't necessarily part of your unified data model.

Noteworthy Facts

  • Lookup External Record currently supports the MySQL, Oracle, PostgreSQL, Redshift, Salesforce, and Snowflake synapses
  • This is not a replacement for Lookup Syncari Record
  • Lookup External Record is going to be much slower than Lookup Syncari Record

Usage

  1. Display Label: Enter the name you want to give this function on the canvas.
  2. Description: Enter a few words to remember what this functions purpose is in your pipeline.
  3. Synapse: Select the Synapse you want this function to look to.
  4. Search Condition: Enter the SQL/SOQL query you want the function to run against the external system. If you need to specify a variable in the WHERE clause use a ? to designate a variable value and set the tokens in the Positional Params setting below. For example: SELECT field FROM table WHERE field_x = '?'
  5. Positional Params: A comma separated ordered list of tokens that will replace the '?' in your Search Condition.

See the Salesforce Query Language documentation for more details on the syntax.

Results Tokens

In order to work with the results of the Lookup External Record function, you'll need to use the following token:

{{Records from <node name>}}

To reference fields from the external record found, use the following format:

{{Records from <node name>[<result index>].values.<field api name>}}

Here is how this token would look like for Account entity in Salesforce:

  • Suppose the Lookup External Record function was named as SFDC Lookup.
  • The value to be retrieved resides in the first row of data set returned.
  • The value to be retrieved is the value corresponding to the field Name in account which has API name as name.
  • Then the token would be: {{Records from SFDC Lookup[0].values.name}}
  • Index starts from 0. So the first row index is 0, second row index is 1 and so on.

What's Next

Share this

Was this article helpful?

1 out of 1 found this helpful