1

I am using mapping load with MapSubString but it doesnt work for searching the sentence start and ends with text. For example : All below cases will be mapped with Network fault.

  • Network Element fault
  • Network Radio equipment fault
  • Network had some unknown fault

So the search must be something like Network*fault I cannot make it with wildmatch because i have around 280 keywords to be searched.

Thanks in advance

Keywords:
Mapping load Upper(Keyword) as Keyword, '$' &Todo& '~' as Todo
FROM [$(ROOTPATH)\Config\projects\$(vPROJECTNAME)\Ticket_Defect_Keyword.xlsx]
(ooxml, embedded labels, table is Sheet1);

load ticket_id, TextBetween(MapSubString('Keywords', Upper(Remark&'-'&Failure_Detail)), '$', '~') as Keyword_Data
FROM F_TICKET
Ves
  • 21
  • 2

1 Answers1

2

You mapping load is including '$' and '~':

'$' &Todo& '~'

but TextBetween will not include them. It will just select text between them, excluding '$' and '~'.

So for sure you need to remove '$' and '~' from mapping load:

Keywords:
Mapping load 
    Upper(Keyword) as Keyword, 
    Todo
FROM 
    [$(ROOTPATH)\Config\projects\$(vPROJECTNAME)\Ticket_Defect_Keyword.xlsx]
    (ooxml, embedded labels, table is Sheet1);

load 
    ticket_id, 
    TextBetween(
        MapSubString('Keywords', Upper(Remark&'-'&Failure_Detail))
    , '$', '~') as Keyword_Data
FROM 
    F_TICKET
Hubert Dudek
  • 1,666
  • 1
  • 13
  • 21
  • if i dont use '$' &Todo& '~' for the mapping, the result of todo is adding the rest of the string after match. Text :This is a Network failure occurred after planned work. Result of to do is : Network failure occurred after planned work instead of Network Failure – Ves Nov 13 '19 at 13:46
  • so actually $ and ~ i am using to effect "To Do" not the search – Ves Nov 13 '19 at 14:30
  • so alternatively you need to add it before and after TextBetween – Hubert Dudek Nov 13 '19 at 16:29