Placeholder: Database Section

Hello @Gugi , Inquiry about the usage of placeholders in the database data transformer, I’m exploring the database data transformer and would like to understand how placeholders can be used. Could you provide guidance or examples on using placeholders effectively for dynamic value replacement in queries or transformations because i need for a particular logic in my current project. And see in the image below within the Destination input area, i want to update the object in the customers(object)

Hi @abubakar

The Source field should be filled in with the path to the data in the entity that we want to update to the storage. While the Destination field should be filled in with the path to the property in the storage entity that needs to be updated. Please see the below example.

For example, we have a storage that contains the below storage entity with the identifier 123.

{
  "id": "123"
  "foo": "bar"
}

Then, we have the below entity and we want to update the value of the foo property in the above storage entity with a value of the result.123.foo property of the below entity.

{
  "identifier": "123",
  "result": {
    "123": {
      "foo": "baz"
    },
    "456": {
      "foo": "bar"
    }
  }

We can see that the path to the foo property belongs to an object with the key 123. Let’s say each key of the result property represents the storage entity identifier in the storage. In this case, we should set the Source field dynamically with the help of the &{} placeholder, such as below.

You can do the same way in the Destination field if you want to update a property with a dynamic path inside a storage entity.

I hope our explanation is clear to you. Feel free to let me know if you have any questions.