Customer Portal

Reformat Mapping

Comments 6

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hi,

    Could you please rephrase your question and use an example containing some error? From the provided example and description, I am not sure what exactly you are trying to do.

    You could also use XMLExtract and avoid any parsing in Reformat this way.

    Thanks,
  • Avatar
    sridhar
    0
    Comment actions Permalink
    Sure I will.

    I have Error Log file generated by the system and which is source in txt format.Sample content of the file data is show below

    2014-03-31 04:25:16,274 [TP-Processor33] [2CEC4D065611321FE087ECD0C766808F.jvm2] [] DEBUG httpclient.wire.header - << "Server: Apache-Coyote/1.1[\r][\n]"
    2014-03-31 04:25:16,274 [TP-Processor33] [2CEC4D065611321FE087ECD0C766808F.jvm2] [] DEBUG httpclient.wire.header - << "X-HP-CAM-COLOR: V=1;ServerAddr=L+dXR13ZQ5/BHQN6DaCjUg==;GUID=1|KccQLvo21nBHcCB5lpH908p5gJjoLX0orvihFXyTAW9dKpla8iaaxTSzFZxZHFU3YF6R-H-tZ0P4r4LeePj6_A..|L1JBQlNBUEkyQlVTZXJ2aWNlL3NlcnZpY2VzL0JTQVBJQlVTZXJ2aWNl[\r][\n]"
    2014-03-31 04:25:16,274 [TP-Processor33] [2CEC4D065611321FE087ECD0C766808F.jvm2] [] DEBUG httpclient.wire.header - << "Content-Type: application/soap+xml; action="urn:retrievePermissionsResponse";charset=UTF-8[\r][\n]"
    2014-03-31 04:25:16,274 [TP-Processor33] [2CEC4D065611321FE087ECD0C766808F.jvm2] [] DEBUG httpclient.wire.header - << "Transfer-Encoding: chunked[\r][\n]"
    2014-03-31 04:25:16,274 [TP-Processor33] [2CEC4D065611321FE087ECD0C766808F.jvm2] [] DEBUG httpclient.wire.header - << "Date: Mon, 31 Mar 2014 04:25:15 GMT[\r][\n]"
    2014-03-31 04:25:16,274 [TP-Processor33] [2CEC4D065611321FE087ECD0C766808F.jvm2] [] DEBUG httpclient.wire.header - << "[\r][\n]"


    so from I have used UnviersalDataRedear to load the file with delimiter as Space which gives me Date,TP Processor,Code,Type & Msg as columns.

    Now I want to see if a "error" word exists in Msg column then Count No of Errors in Day.So that I can report no of errors in day and if I want msg too.

    So any suggestions how would be my be my graph.If you can give me in detail that would better as I am new to CloverETL

    My apologize for not using technical words.

    Thanks
    Sri
  • Avatar
    sridhar
    0
    Comment actions Permalink
    Sure I will.

    I have system log file need to identify error's which is txt format and sample data is shown below

    2014-03-31 04:08:17,044 [TP-Processor28] [53A8D42682134E3017F3C1E70C5AF3CD.jvm2] [] DEBUG alertLog - Starting the process of com.gxs.bmo.ftf.portlet.TransmissionSummaryPortlet
    2014-03-31 04:08:17,044 [TP-Processor28] [53A8D42682134E3017F3C1E70C5AF3CD.jvm2] [] DEBUG com.gxs.bmo.ftf.portlet.FTFBasePortlet - Locale: en_CA
    2014-03-31 04:08:17,053 [TP-Processor28] [53A8D42682134E3017F3C1E70C5AF3CD.jvm2] [] DEBUG com.gxs.bmo.ftf.portlet.FTFBasePortlet - Ticket generated: d1mHDy0CtN1xRn42mZ1qn6XvMDuWYOr5
    2014-03-31 04:08:17,054 [TP-Processor28] [53A8D42682134E3017F3C1E70C5AF3CD.jvm2] [] DEBUG com.gxs.bmo.ftf.portlet.FTFBasePortlet - Check Login

    by using Space delimiter i have loaded the data into Universal Data Reader.So it has Date,Processor,JVMCode,Braces,Type,Msg.

    Now I want to search if "error" word exists in Msg column then count no of errors per day.

    what would like my graph look like?

    Please let me know if it is not still clear.

    Thanks
    Sridhar
  • Avatar
    imriskal
    0
    Comment actions Permalink
    Thank you, I think I understand now.

    You can use for example indexOf(string arg, string substring);

    If the string contains the substring, a non-negative index number is returned. -1 is returned otherwise.

    FYI, CloverETL Server is able to detect errors in much smarter ways. For example with Graph Event Listeners or in ExecuteGraph component.

    Regards,
  • Avatar
    sridhar
    0
    Comment actions Permalink
    Thanks Lubos.

    Sorry to ask again. I tired indexOf(string $in.0.Msg2, string error) but gives me error Variable 'indexOf' is not declared. I have looked at the examples how to use Indexof but was not able succeed. If you don't mind can you elaborate how to use the function.

    I really appreciate your help.

    Thanks
    Sridhar
  • Avatar
    admin
    0
    Comment actions Permalink
    Hi Sridhar,

    Correct usage should be:
    indexOf($in.0.Msg2, "error")


    You can learn about CTL2 here: http://doc.cloveretl.com/documentation/ ... /ctl2.html

    I hope this helps.

Please sign in to leave a comment.