Hi,
I'm trying to use Table Transformer to link two tables from different systems...
One table is from JIRA.
The other is a service ticket system - each service ticket may have one or more JIRAs linked to it - these links are not visible in JIRA.
From JIRA I've got the JIRA ID, like 'PROJ-12345' (T1.'Key')
From the service ticket system I've got one field with a list '##PROJ-123456##PROJ-65432##PROJ-98465' (where # is a non-visible character) (T2.'JIRA')
So I want to write something like...
SELECT * FROM T2 LEFT JOIN T1 ON T2.'JIRA' contains T1.'Key'
I tried using this examplar as a model:
https://docs.stiltsoft.com/tfac/cloud/custom-transformation-use-cases-with-advanced-sql-queries-42241587.html#CustomTransformationusecaseswithadvancedSQLqueries-Mergingtablesbypartialmatch
'Out of the box' it only makes a link on the last JIRA in the T2.'JIRA' string (probably the extra characters getting in the way?)
So I tried wrapping T2 in a table transformer so I could 'pre-process' out the non visible characters. The easiest way I found was to use:
MATCH_REGEXP(T1.'JIRA',"[0-9]{1,6}","g") -- T2 is T1 in this context 
This gives me a comma separated list, albeit without the 'PROJ-' bit. But no matter I amended the examplar:
<span>SELECT</span> <span>*</span>
<span>FROM</span> T2 <span>LEFT</span> <span>JOIN</span> T1 <span>ON</span>
T2<span>.</span><span>'JIRA'</span><span>-</span><span>></span>split<span>(</span><span>","</span><span>)</span><span>-</span><span>></span>indexOf<span>(</span><span>REPLACE</span><span>(</span>T1<span>.</span><span>'Key'</span><span>,</span> <span>"PROJ-"</span><span>,</span> <span>""</span><span>)</span><span>)</span><span>></span><span>-</span><span>1</span>
But I get an error:
TypeError: (y[0] || {}).split is not a function
Presumably something to do with my 'pre-processing'? Any one found a way to do this?