Boomi - Retrieve from Cache

By in ,
975
Boomi - Retrieve from Cache

How to Retrieve Data from Cache:

Once data is added to the cache there are different ways to retrieve data from it.

Retrieve from cache Shape:

Using this shape you can either retrieve all the documents from Cache or fetch some specific documents,

To fetch everything from Cache select “All Documents” in the Retrieve option. If the Cache is empty, you can either fail the documents with the error or stop the document execution

Retrieve from Cache Shape

If you want to fetch a specific set of data, specify the index that you used while adding Data to Cache:

Retrieve Data from Cache

For example: In your process, you add your inventory Quantity and Price of items in the Cache as below with Item Type as Cache index:

Item Type Quantity Price
T-shirt 100 40
Jeans 58 54
Bag 100 20

If you Retrieve all documents from Cache, you will receive three documents one with a  T-shirt, Jeans, and Bag.

If you fetch data using Cache index and pass the T-shirt to the index Key you would receive just one document with Item Type: T-shirt, Quantity: 100, Price: 40

When you are adding Flat files or Database Data that have multiple rows of Data to Cache make sure you split the documents and then add them.

Document Cache Lookup:

You can perform document cache lookup within a map or a set property shape. Functional of document cache lookup is similar to fetching data from Retrieve from Cache shape using an index, the difference is that from the Retrieve from Cache Shape you get the entire document, and from Document cache lookup you could fetch specific fields from the document.

In order to do a document cache lookup within a map and click on add functions > select lookup > Document Cache lookup:

Document Cache Lookup

Once you have added the lookup you will need to give an input which would be the Cache index and for output, you can select multiple fields from the profile that was configured in the Add o Cache shape.

Document Cache lookup in Map

References:

  • Boomi’s Document Cache overview can be found here

 

Cover Photo by Liam Briese on Unsplash