Newer Version Available
Async Query Input
- Root XML tag
- <asyncQueryInput>
- JSON example
-
1{ 2 "query": "SELECT firstField__c, secondField__c FROM SourceObject__b", 3 4 "operation": "insert", 5 6 "targetObject": "TargetObject__c", 7 8 "targetFieldMap": {"firstField__c":"firstFieldTarget__c", 9 "secondField__c":"secondFieldTarget__c" 10 }, 11 "targetValueMap": {"$JOB_ID":"BackgroundOperationLookup__c", 12 "Copy fields from source to target":"BackgroundOperationDescription__c" 13 } 14} - Properties
-
Name Type Description Required or Optional Available Version query String Specifies the parameters for the SOQL query you want to execute. The FROM object must be a big object. Required 35.0 operation String Specify whether the query is an insert or upsert. If the record doesn’t exist, an upsert behaves like an insert. Optional 39.0 targetObject String A standard object, custom object, external object, or big object into which to insert the results of the query. Required 35.0 targetFieldMap Map<String, String> Defines how to map the fields in the query result to the fields in the target object. Required 35.0 targetValueMap Map<String, String> Defines how to map static strings to fields in the target object. Any field or alias can be used as the TargetValueMap value in the SELECT clause of a query. You can map the special value, $JOB_ID, to a field in the target object. The target field must be a lookup to the Background Operation standard object. In this case, the ID of the Background Operation object representing the Async SOQL query is inserted. If the target field is a text field, it must be at least 15–18 characters long.
You can also include any field or alias in the SELECT clause of the TargetValueMap. They can be combined together to concatenate a value to be used.
Optional 37.0 targetExternalIdField String The ID of the target sObject. Required for upsert operations. Optional 39.0