Skip to Main Content
Integration


This is an IBM Automation portal for Integration products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.


Status Future consideration
Workspace App Connect
Created by Guest
Created on Jun 27, 2019

Add a string splitter function to ESQL

ESQL does not have an inbuilt string splitting function like Java and whilst it's easy enough to build a static function and add the *.jar to the IIB classpath several sites I've worked at have a blanket ban on using Java.

The signature of the ESQL function I've built looks like.
CREATE PROCEDURE SplitString(
IN CompositeString CHAR, -- Composite string that needs to be split
IN Delimiter CHAR, -- Delimiter to be used when splitting the string
IN ArrayName CHAR, -- Name of the array for the results of the function
IN NewArray BOOLEAN, -- Use TRUE to clear a pre-existing array, FALSE appends new element
IN EnvRef REFERENCE -- Reference to Environment tree
)

I have attached a PDF print of the ESQL implementation I wrote up on Stackoverflow https://stackoverflow.com/questions/56097056/esql-string-splitter-functions-for-splitting-delimited-strings

Idea priority Medium
RFE ID 134222
RFE URL
RFE Product IBM App Connect Enterprise (formerly IBM Integration Bus)
  • Guest
    Reply
    |
    Sep 29, 2020

    Apologies ... having scrolled down further I now see your code from stackoverflow. It looks like you are using the Environment tree to get around the array problem, and were also utilising SUBSTRING with BEFORE as per my suggestion ... Great minds think alike!

  • Guest
    Reply
    |
    Sep 29, 2020

    RFE Review. Thank you for taking the time to raise this enhancement request and apologies it has been in Submitted status for a while. We agree that having a splitting function would aid usability for writing code, so we like the principle of the suggestion. However, one of the inhibitors to an implementation in this space is that ESQL does not have the concept or syntax structure for array data types. We have array operations in terms of assignments into the logical tree, but we have no array variable directly in ESQL to which we could assign the result of the split. It is for this reason that we have (for example) a poor man's substitute of SUBSTRING which can be used with BEFORE. So you could do something like:

    SUBSTRING('Hello World!' BEFORE 'World'); ... which would return 'Hello '.

    I suspect this is the kind of thing you have used in your loop?
    We're updating the status of this RFE to Uncommitted Candidate, but for other readers passing through here, we would appreciate any suggestions for the precise syntax of the function (working within the constraint of not introducing an array data type).

  • Guest
    Reply
    |
    Jun 27, 2019

    Although the specific implementation of functions here might not match an actual implementation in IIB, the ability to split strings on delimiters is widely needed. An efficient, well documented, inbuilt function would make development of any ESQL code that worked with delimited strings much simpler and potentially faster, compared with having to implement splitting functions in ESQL itself.

  • Guest
    Reply
    |
    Jun 27, 2019

    Attachment (Description): Stackoverflow answer for an ESQL implementation of a StringSplitter