The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table transformer - split values in different situations

Matias G Labrana
Contributor
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Stiltsoft support
Atlassian Partner
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.

TAGS
AUG Leaders

Atlassian Community Events