Saturday 20 August 2016

Input:

       In the below text wherever FLOWCELL is there, it should be replaced into "*" ie) for each FLOWCELL -> the output should be, ********.note that it should be dynamically.


resourceTypevalue | resourceTypeIdImager_3
lx-obc-02 |BASECALLER
resourceTypevalue | resourceTypeId
GS90780-FS3 | FLOWCELL
Nest_20 | NEST
Imager_1 |IMAGER
lx-obc-01 |BASECALLER
GS86184-FS3 | FLOWCELL
Nest_7 |NEST
Imager_3 |IMAGER
lx-obc-02 |BASECALLER
resourceTypevalue | resourceTypeId
GS90780-FS3 | FLOWCELL
Nest_20 | NEST
Imager_1 |IMAGER
lx-obc-01 |BASECALLER
GS86184-FS3 | FLOWCELL
Nest_7 |NEST
Imager_3 |IMAGER
lx-obc-02 |BASECALLER
resourceTypevalue | resourceTypeId
GS90780-FS3 | FLOWCELL

               
               
                The tHash  components used to store the data temporarily in cache memory like tBuffer components. But the tHash components are faster than tBuffer components. 





                The field separator given here is "pipe separator". 




               First the context variable is given as "s" with string datatype and also a default value "FLOWCELL" is typed. Then, another context variable named "star" is given with a string datatype and no value is provided. This empty space enables to store the * asterisk values one by one. 
                context.s.length() checks the length of given string value. Here, in this example, length of the FLOWCELL is 8. Therefore, 8 numbers of * asterisk symbols will be generated. 









THANK YOU. 

No comments:

Post a Comment