Table transformer - split values in different situations

Matias G Labrana April 30, 2024

Good day community,

I would like to know how to split values in table transformer as it shows in the table below:

 

COLUMN A

COLUMN B

Value A

A, B, C

Value B

A/B/C

Value C

A-B-C

Value D

·         A

·         B

·         C

In the 4 cases presented, basically I want this values by separate.

Regards!

1 answer

1 vote
Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2024

Hi @Matias G Labrana ,

We can suggest the following workaround for your case:

Fri 12-1.png

In the internal Table Transformer macro we replace different symbols by the same symbol (for example, by commas as you have them in the first cell):

SELECT *,
REPLACE('COLUMN B', "/", ", ") AS 'COLUMN B'
FROM
(SELECT *,
REPLACE('COLUMN B', "-", ", ") AS 'COLUMN B'
FROM T*)

Fri 12-2.png

Now in the external Table Transformer macro we can split our array:

SEARCH / AS @a EX('COLUMN B'->split(",")) /
RETURN(@a->'COLUMN A' AS 'COLUMN A', _ AS 'COLUMN B') FROM T1

Fri 12-3.png

What concerns the "Value D" row, it seems that here you use bullet points or smth similar. The Table Transformer macro works only with visible separators.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events