Questions tagged [extended-sql]

IBM Integration Bus (IIB) specifies Extended Structured Query Language (ESQL) as a programming language used to define and manipulate data within a message flow.

Extended Structured Query Language (ESQL) is used by IBM Integration Bus to define and manipulate data within a message flow.

156 questions
10
votes
6 answers

Is it good programming to have a return type of Exception?

I ran into an odd situation during a use case on a project: ESQL is calling a java method, sending it a String input parameter which the method will unmarshal, apply some logic, and then store useful info from the unmarshalled object. So, the method…
JWiley
  • 3,129
  • 8
  • 41
  • 66
5
votes
1 answer

Dynamic JSON key/value pairs generation in ESQL

How to transform JSON response retrieved from external system to meaningful data (key/value pairs) in ESQL? Retrieved JSON: { "data": [ { "name": "application.info.header", "value": "headerValue" }, …
Muhammad Faizan Uddin
  • 1,339
  • 12
  • 29
5
votes
2 answers

How to select distinct in esql?

I have a subflow in esql (IBM Websphere Message Broker) where I need to achieve something similar to select distinct functionality. Some background: I have a table in an Oracle database group_errcode_ref. This table is pretty much a fixed…
bbedward
  • 6,368
  • 7
  • 36
  • 59
5
votes
1 answer

What is the XQuery equivalent of the ESQL COALESCE function?

I'm trying convert WMB 7 mapping nodes to IIB 9 nodes. The auto-convert process turns some ESQL functions to XQuery functions. Specifically, it turns the ESQL function COALESCE (var0, var1) (which returns the first non-null value, as in if var0 =…
5
votes
3 answers

CURRENT_TIME format in esql

What is the default format of the function CURRENT_TIME in esql and how do we change it as per our requirements(24 hr or 12 hr formats)
Lee
  • 101
  • 1
  • 2
  • 6
3
votes
1 answer

ESQL String Splitter Functions For Splitting Delimited Strings

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. So what does an efficient…
TJA
  • 2,969
  • 2
  • 25
  • 32
3
votes
2 answers

JSON array creation in esql

I am new to IIB and I am struggling to create below JSON data in Extended SQL. Kindly suggest me. { "name" : "John Doe", "age" : -1, "known" : false, "address" : { "street" : null, "city" : "unknown" }, "belongings" : ["this",…
Raghu
  • 31
  • 1
  • 1
  • 5
3
votes
2 answers

Get Multiple Outputs From Single Input Message

I want to get multiple output from a single XML input message. mailbox 38ghjk 39ghjk This is how my XML looks it contains more DocID. My requirement is I want…
Amrit
  • 137
  • 2
  • 2
  • 13
3
votes
1 answer

IIB/ESQL: How to test if UUID is valid, if not generate one

I have a message flow in IBM Integration Bus. I have some input that specifies a UUID, I want to test if that UUID is valid and if it is not I'd like to generate one. Downstream if I call something like UUIDASCHAR I get a BIP2582 exception for…
bbedward
  • 6,368
  • 7
  • 36
  • 59
3
votes
1 answer

How to create xml in esql

I am trying to create an xml of the below format 5678 I got a clue from DECLARE sp1 NAMESPACE 'http://www.ibm.com/space1'; /* Namespace declaration to associate prefix 'space1' with the namespace…
Abx
  • 2,852
  • 4
  • 30
  • 50
3
votes
1 answer

ESQL - Does anyone know of a tool which can provide static code analysis for ESQL?

I am writing a large application and was wanting to conduct static code analysis on my code, however I am struggling to find a tool which can do this for ESQL. I have used SonarQube before with Java, but there is no ESQL or SQL plugin, just PL/SQL…
2
votes
2 answers

How to set Xpath based on a specific condition in esql

I am using IBM App Connect 11 .I need to pass xpath as a string to an esql method.The Xpath corresponds to a specific element "text", so I need to pass the condition where keyIdentifier='TIN' as well.I tried like this : SET xpathStr =…
2
votes
1 answer

Walk trough xmlnsc tree and remove namespaces in ESQL

EDIT: By removing xmlns I tried to solve a problem when Mapping Node wouldn't parse Input Message with fields that contain namespace. Input Body is set manually - not from XSD. When namespaces are removed from file manually everything works. But…
TwistedOwl
  • 1,195
  • 1
  • 17
  • 30
2
votes
2 answers

ESQL for splitting a string into mulitple values

Following Input xml field needs to be substringed for 6 characters and each 6 characters should be splitted and saved in the option field of output. Input:…
ranaa
  • 57
  • 1
  • 5
  • 14
2
votes
1 answer

Why conditioning in IIB Mapping Node invalidates the response XML?

I've been using an If condition in IIB Mapping node on request's boolean attribute Flag that maps to messageA attribute in response. Assignment is done in case Flag evaluates as true. There is another For Each which performs deep copy of a list and…
Muhammad Faizan Uddin
  • 1,339
  • 12
  • 29
1
2 3
10 11