Import Cache Records
The Import Cache Records task in Zynk Workflow allows you to upsert data into a caching database.
This functionality supports efficient data access and management, especially for complex or enterprise-level integrations. Below are the configuration settings available for this task.
Data Settings
Cache Name
Required
Specifies the name of the cache to create or update.
Connection Id
Optional
The unique identifier for the connection that generated the data. If left blank, an empty GUID will be used.
XPath
Required
The XPath expression used to iterate through the XML data in the input file.
Key Field
Required
The XPath expression pointing to the element or attribute that will be used as the cache record's key.
Value Field
Optional
Defines the XPath expression pointing to the element or attribute to use as the cache record's value.
- If Value Type is set to XML, this field can be left blank. In such cases, the current XML node (e.g., Customers/Customer) will be stored as the value.
Value Type
Optional
Specifies the format of the cache record value:
- Text: Stores the value from the specified Value Field.
- XML: Stores an XML snippet from the current node or the specified Value Field.
File Settings
Input File
Required
The XML file containing data to be upserted into the caching database.
Zynk Settings
Example
Consider an XML file containing customer data:
<Customers>
<Customer>
<Id>123</Id>
<Name>John Doe</Name>
</Customer>
</Customers>
With the following configuration:
- Cache Name: CustomerCache
- XPath: Customers/Customer
- Key Field: Id
- Value Field: Name
- Value Type: Text
The task will upsert a record into the cache where:
- Key: 123
- Value: John Doe
If Value Type is set to XML and the Value Field is left blank, the entire <Customer>
node will be stored as the value.
See Also
- Caching in Zynk Workflow This article outlines how to review and update your cache tables in the cache manager.
- Importing Complex Records to Salesforce (V2) This task implements caching functionality to perform quicker lookups in Salesforce.
- Caching Functions in XSLT The caching functionality has been added to our XSLT functions library. You can access data in the cache database from your mapping files.