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.  JSON Data node error

    Employee
    Posted 08-28-2014 00:43

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

    Originally posted by: gauravdb

    Hi Guys,

    This is the first time I am using JSON Data node and I am not very sure how to use it properly(try reading the help page, still my problem not solved)

    When I run my data I am having this error

    2014-08-27 19:40:46.740; ERROR: Input length = 1
    id: 0 chain: 0 group: 0
    javaDetail: com.lavastorm.brain.io.data.brd.printers.BrdFieldP rinter.print(BrdFieldPrinter.java@69)

    2014-08-27 19:40:46.746; ERROR: brain.nodes.ldr.errorWhileProcessingOutputTokens
    id: 59586 chain: 59585 group: 0
    javaDetail: com.lavastorm.brain.nodes.ldr.StructuredDataNode.l ogAndWriteError(StructuredDataNode.java@1815)
    dataDetail:
    Data(out) row: 2036


    Anyone have any idea what this means please.

    Thanks
    GK


  • 2.  RE: JSON Data node error

    Employee
    Posted 08-28-2014 01:00

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

    Originally posted by: gauravdb

    **Some for Information**

    I just figured out that the error pin was reaching the threshold value(Set to 1), which was the main reason for the failure. So I changed it to 10. The problem is still not solved though.

    The error pin shows this


    brain.nodes.ldr.errorWhileProcessingOutputTokens brain.nodes.ldr.errorWhileProcessingOutputTokens 1018


    Any Idea ??

    Thanks
    GK


  • 3.  RE: JSON Data node error

    Employee
    Posted 08-28-2014 02:37

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

    Originally posted by: Tim Meagher

    Hey,

    What version of LAL are you using?
    It looks like the JSON data being parsed cannot be mapped to the character set of the output field to which it is being written.

    There are two parameters which would affect this behavior: Charset and CharacterDataOutputFieldType.

    In general the node tries to be smart about picking the defaults for these values (as documented in the parameters' help) - however, if you are processing data from a file, it can't always pick the most appropriate value - particularly for the Charset.

    If the data you are processing is coming from a file, you may need to set the Charset parameter correctly to specify the character set of the JSON data file used.

    If you can post a sample of the configured node and the data it is trying to parse, this would assist in identifying the problem.
    If the data is sensitive and you can't post here or provide a "cleansed" version, then perhaps this is something you can take up with your Lavastorm Support representative.

    Regards,
    Tim.


  • 4.  RE: JSON Data node error

    Employee
    Posted 10-25-2016 03:20

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

    Originally posted by: Narenso

    I'm facing similar issue and i'm not sure how the Json node is working. I'm having few Json fields in a sql database table and i want to use substring for few Json fields.
    Please help on this by providing any samples. That would be very helpful.
    There's no much details on forum on converting Json fields in Lavastorm
    Thanks in advance.


  • 5.  RE: JSON Data node error

    Employee
    Posted 10-27-2016 14:11

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

    Originally posted by: awilliams1024

    Here is a simple example of using the JSON node to extract data from a field. Paste the code into the BRE canvas.

    Regards,
    Adrian


    node:Extract_Data_and_Remove_Common_Prefixes
    bretype:lal1::JSON Data
    editor:Label=Extract Data and Remove Common Prefixes
    editor:sortkey=581268677d006acc_2
    input:581268677db2488e/=JSON_Employees_Data.40fe6c55598828e5
    editor:bend=0=290|110
    editor:bend=0=290|220
    output:@51781d234c465db7/=
    output:@522743291aa237ba/=
    output:@522743281dab2bc6/=
    prop:JsonData=JSONData
    prop:JsonDataParamType=Data Field
    prop:RemoveCommonPrefixes=true
    editor:XY=350,220
    editor:Doc=This node extends the above node to show how common prefix elements can be removed from the output field names
    end:Extract_Data_and_Remove_Common_Prefixes
    
    node:JSON_Employees_Data
    bretype:core::Static Data
    editor:Label=JSON Employees Data
    editor:sortkey=5812682a49f41d5e
    output:@40fe6c55598828e5/=
    prop:StaticData=<<EOX
    JSONData:string
    "{""employees"":[
      {""firstName"":""John"", ""lastName"":""Doe""},
      {""firstName"":""Anna"", ""lastName"":""Smith""},
      {""firstName"":""Peter"", ""lastName"":""Jones""}
    ]}"
    EOX
    editor:XY=220,110
    end:JSON_Employees_Data
    
    node:Extract_Data_from_Input_Field
    bretype:lal1::JSON Data
    editor:Label=Extract Data from Input Field
    editor:sortkey=581268677d006acc
    input:581268677db2488e/=JSON_Employees_Data.40fe6c55598828e5
    output:@51781d234c465db7/=
    output:@522743291aa237ba/=
    output:@522743281dab2bc6/=
    prop:JsonData=JSONData
    prop:JsonDataParamType=Data Field
    editor:XY=350,110
    editor:Doc=This node extracts the JSON data from the specified input field
    end:Extract_Data_from_Input_Field