private void assignTemplateArrayAttributePositions(String[] splitTemplateArray,
                                                       StreamDefinition streamDefinition) {
        this.positionArray = new int[splitTemplateArray.length / 2];
        int positionCount = 0;
        for (int i = 0; i < splitTemplateArray.length; i++) {
            if (i % 2 != 0) {
                try {
                    positionArray[positionCount++] = Integer.parseInt(splitTemplateArray[i]);
                } catch (NumberFormatException e) {
                    throw new SiddhiAppCreationException(String.format("Invalid mapping configuration provided in " +
                            "%s. Mapping parameter should be surrounded only with '{{' and '}}'.", streamDefinition));
                }
            }
        }
    }
Template builder used by {@link SinkMapper} to generate custom payload.
modules/siddhi-core/src/main/java/io/siddhi/core/util/transport/TemplateBuilder.java