LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  LAE Error Code: brain.node.JRegex.cpp.147

    Employee
    Posted 08-19-2014 11:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: lae_errors

    This post has been created for discussion of error code brain.node.JRegex.cpp.147.

    Please reply to this thread with any description of error conditions, diagnostic information, and recommended resolutions.


  • 2.  RE: LAE Error Code: brain.node.JRegex.cpp.147

    Employee
    Posted 05-22-2017 11:53

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: whm011

    Hi - I am trying to run a split node based on whether a column contains a certain phrase, but I keep getting the following message:

    WARN: Error while executing pattern: -10.
    Line: 10; BrainScript: InternalFilterCondition = regexIsMatchI(REMARKS,"just a trial") or
    Operator: 'regexIsMatchI'
    Error Code: brain.node.JRegex.cpp.147

    ERROR: Node execution terminated while processing data by error:
    Error while executing pattern: -10.
    Error Code: lae.node.executionTerminated

    Any help would be appreciated!


  • 3.  RE: LAE Error Code: brain.node.JRegex.cpp.147

    Employee
    Posted 05-22-2017 11:59

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gmullin

    You can use strFind (case must match) or strFindI (which doesn't care about upper or lower case). These function will return the location of the string you're looking for within REMARKS. If it does not exist it returns a -1.

    REMARKS.strFind("just a trial") > -1

    True would mean the field REMARKS contained string "just a trial".


  • 4.  RE: LAE Error Code: brain.node.JRegex.cpp.147

    Employee
    Posted 05-23-2017 06:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: whm011

    Great, thank you very much for the quick response!


  • 5.  RE: LAE Error Code: brain.node.JRegex.cpp.147

    Employee
    Posted 07-14-2017 07:30

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    The regex I commonly use for this situation is
    regexSubstitute("[\x80-\xff]","_")
    Is your source data unicode or string?

    Here is the way I commonly go about dealing with this situation, but the ChangeMetadata node has some features we may have to tweak:

    node:Change_Metadata
    bretype:lal1::Change Metadata
    editor:sortkey=5968d3ce0c0c7b63
    input:@516511412c32051f/=Misc_Fixes.40fd2c7420761db6
    input:@5162dc5f486743e5/=Filter_3.40fd2c7420761db6
    output:@51778acf012c236e/=
    output:@5163cf7b3f3e218f/=
    prop:NewNameField=NewField
    prop:NewTypeField=NewType
    prop:OldNameField=OldField
    prop:PassThroughUnchanged=true
    editor:XY=750,340
    end:Change_Metadata
    
    node:Filter_3
    bretype:core::Filter
    editor:sortkey=5968d3120d202cfc
    input:@40fd2c74167f1ca2/=Get_Metadata.40fd2c7420761db6
    output:@40fd2c7420761db6/=
    prop:Script=<<EOX
    
    emit FieldName as OldField
    emit FieldName as NewField
    emit "string" as NewType
    where FieldType=="unicode"
    EOX
    editor:XY=690,410
    end:Filter_3
    
    node:Get_Metadata
    bretype:lal1::Get Metadata
    editor:sortkey=5968d302625f4cf8
    input:@40fd2c74167f1ca2/=Misc_Fixes.40fd2c7420761db6
    output:@40fd2c7420761db6/=
    editor:XY=600,410
    end:Get_Metadata
    
    node:Misc_Fixes
    bretype:core::Filter
    editor:Label=Misc Fixes
    editor:sortkey=5968d1fa6ee63a47
    input:@40fd2c74167f1ca2/=Source_Data.40fe6c55598828e5
    output:@40fd2c7420761db6/=
    prop:Script=<<EOX
    emit Createddate = CREATEDDATE.str()
    emit DESCRIPTION = Description.regexSubstitute("[^\x1F-\x7F]+"," ").unicode("UTF-8").str()
    emit ID = Id
    emit LASTMODIFIEDDATE = LASTMODIFIEDDATE.str()
    emit 0 as REASON_FOR_CALL_C
    emit 0 as RECORDTYPE_NAME_C
    emit 0 as RESCHEDULE_SRO_FORMULA_C
    emit 0 as SEND_SLA_NOTIFICATION_C
    emit timestamp() as ETL_CREATED_TIMESTAMP
    emit timestamp() as ETL_UPDATE_TIMESTAMP
    default emit *   #will write out all other fields
    EOX
    editor:XY=540,340
    end:Misc_Fixes