Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to extract the Picklist 'title' from the following url format
https://someapi.com:443/odata/v2/Picklist('ContractType')/picklistOptions
I've tried using the following which all work in regex online tests
"[^\\/\']+(?=\'[^\']+$)"
to extract 'ContractType' from the above url.
But this doesn't work in the component.
I tried tExtractRegexFields and tJavaRow using java.util.regex.Pattern etc..
None of the components worked, however, tMap expression did i.e.
regexUtilitiesCompleted.regexData("[^\\/\']+(?=\'[^\']+$)",row1.uri)
Not sure why the other components aren't working properly for regex, I'm running Talend v6.1 Date Services.
But tMap expression utilities works as it should!
Hi,
Could you please provide some sample input records so that I will get more idea about it?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
try this
"Picklist\\((.*?)\\)"
Thanks for this Abhishek, but this doesn't work either, the component just sends the row output without regex processing, to tLogRow
| #1. tLogRow_1 |
+-----+--------------------------------------------------------------------------------------+
| key | value |
+-----+--------------------------------------------------------------------------------------+
| uri | https://someapi.com:443/odata/v2/Picklist('ContractType')/picklistOptions |
+-----+--------------------------------------------------------------------------------------+
.------------------------------------------------------------------------------------------------.
| #2. tLogRow_1 |
+-----+------------------------------------------------------------------------------------------+
| key | value |
+-----+------------------------------------------------------------------------------------------+
| uri | https://someapi.com:443/odata/v2/Picklist('ftecontracthours')/picklistOptions |
+-----+------------------------------------------------------------------------------------------+
.----------------------------------------------------------------------------------------------------.
| #3. tLogRow_1 |
+-----+----------------------------------------------------------------------------------------------+
| key | value |
+-----+----------------------------------------------------------------------------------------------+
| uri | https://someapi.com:443/odata/v2/Picklist('GlobalAssignmentType')/picklistOptions |
+-----+----------------------------------------------------------------------------------------------+
.--------------------------------------------------------------------------------------------.
| #4. tLogRow_1 |
+-----+--------------------------------------------------------------------------------------+
| key | value |
+-----+--------------------------------------------------------------------------------------+
| uri | https://someapi.com:443/odata/v2/Picklist('ToolsofTrade')/picklistOptions |
+-----+--------------------------------------------------------------------------------------+
Cheers.
I tried tExtractRegexFields and tJavaRow using java.util.regex.Pattern etc..
None of the components worked, however, tMap expression did i.e.
regexUtilitiesCompleted.regexData("[^\\/\']+(?=\'[^\']+$)",row1.uri)
Not sure why the other components aren't working properly for regex, I'm running Talend v6.1 Date Services.
But tMap expression utilities works as it should!