Go Back
Build a recipe with multiple instances of the same connector
Publisher
:
Run In Lingk
Description
This recipe shows how build a recipe with multiple instances of the same connector
Browse the knowledge base
Twitter
E-Mail
# _____ _ _____ __ # | __ \ (_) |_ _| / _| # | |__) |___ ___ _ _ __ ___ | | _ __ | |_ ___ # | _ // _ \/ __| | '_ \ / _ \ | | | '_ \| _/ _ \ # | | \ \ __/ (__| | |_) | __/ _| |_| | | | || (_) | # |_| \_\___|\___|_| .__/ \___| |_____|_| |_|_| \___/ # | | # |_| # Project Name - Build a recipe with multiple instances of the same connector # Recipe URL - https://app.lingk.io/a/10932/tf/18717 # Description - This recipe shows how build a recipe with multiple instances of the same connector # Systems - # Connectors - Salesforce # Data Flows - Single Direction # Connection Type - API # Add Recipe notes / Change log information here! # _____ _ # / ____| | | # | | ___ _ __ _ __ ___ ___| |_ ___ _ __ ___ # | | / _ \| '_ \| '_ \ / _ \/ __| __/ _ \| '__/ __| # | |___| (_) | | | | | | | __/ (__| || (_) | | \__ \ # \_____\___/|_| |_|_| |_|\___|\___|\__\___/|_| |___/ # # CONNECTORS specify what data will be pulled into the in-memory database during processing connectors: # Configure Salesforce connector in your Environment before running this recipe # Salesforce Setup - https://help.lingk.io/en/articles/339-salesforce-connector-reference #### Start - Salesforce Reader #### # SF Instance A Reader - name: InstanceAContactReader type: salesforceReader connectionKey: {{env.AconnectionKey}} properties: useBearerToken: true query: | SELECT Id, FirstName, LastName FROM Contact WHERE Id = '{{env.Aid}}' schema: fields: - name: 'FirstName' type: 'string' - name: 'Id' type: 'string' - name: 'LastName' type: 'string' # SF Instance B Reader - name: InstanceBContactReader type: salesforceReader connectionKey: {{env.BconnectionKey}} properties: useBearerToken: true query: | SELECT Id, FirstName, LastName FROM Contact WHERE Id = '{{env.Bid}}' schema: fields: - name: 'FirstName' type: 'string' - name: 'Id' type: 'string' - name: 'LastName' type: 'string' #### End - Salesforce Reader #### #### Start - Salesforce Writer #### # SF Promise CM Contact Writer - name: CSFcontactWriter type: salesforceBulkWriter connectionKey: {{env.connectionKey2}} properties: useBearerToken: true isSandbox: false sfObject: Contact # batchSize: 50 # default 10000 #### End - Salesforce Writer #### # _____ _ _ _ # / ____| | | | | | # | (___ | |_ __ _| |_ ___ _ __ ___ ___ _ __ | |_ ___ # \___ \| __/ _` | __/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| # ____) | || (_| | || __/ | | | | | __/ | | | |_\__ \ # |_____/ \__\__,_|\__\___|_| |_| |_|\___|_| |_|\__|___/ # STATEMENTS specify how the data should be processed while in memory statements: #******************************************************************** D I S C L A I M E R *********************************************************************************************** # * # Note that in an effort to keep recipes optimized for DPH (Data Processing Hours), print statements should be commented out after development has concluded for a recipe. * # For more information on DPH optimization, please visit the following help article - https://help.lingk.io/en/articles/212-minimizing-data-processing-hours-on-the-lingk-platform * # * #******************************************************************** D I S C L A I M E R *********************************************************************************************** # Pulls data from SF Instance A - statement: | (AOutput) => SELECT FirstName as TestField__c, LastName FROM InstanceAContactReader #- statement: print AOutput # The SLEEP basically stops the execution for the amount in seconds defined right after the function - statement: SLEEP 10 # Pulls data from SF Instance B - statement: | (BOutput) => SELECT FirstName as TestField__c, LastName FROM InstanceBContactReader #- statement: print BOutput # Insert data into a different instance through the SFWriter connector - statement: (results, errors) => insert AOutput INTO CSFcontactWriter - statement: (results, errors) => insert BOutput INTO CSFcontactWriter # Add more statements to convert, join, aggregrate, transform, and integrate your data
PeopleSoft to Salesforce: External SchooAccount
Custom Output via Imports