Unexpected character ('s' (code 115))

Options
hisyam
hisyam Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 16

I imported the audit log files under

/run/audit

and tried to filter out rows using the filter recipe where the condition is:

logger == dku.audit.generic and no sampling method.

but the job failed and gave me an error which says

Unexpected character ('s' (code 115)): was expecting a colon to separate field name and value at [Source: (com.google.common.io.CountingInputStream); line: 88625, column: 335]

Can anyone help me on this?


Operating system used: Linux

Tagged:

Best Answer

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 293 Dataiker
    Answer ✓
    Options

    Hi @hisyam
    ,

    This appears to be specific to JSON parsing. Please try changing the settings on your source dataset (Settings > Format / Preview) and change the Type from "JSON" to "One record per line". (Make sure to click RELOAD SCHEMA FROM DETECTED DATA if prompted to):

    Screenshot 2023-07-19 at 5.55.00 PM.png

    Create the filter recipe and add the filter dku.audit.generic.

    Next create a Prepare Recipe of that dataset and first add a step to use the Unnest object Processor to flatten the JSON.

    Screenshot 2023-07-19 at 5.58.49 PM.png

    Please let me know if you have any questions.

    Thanks!

    Jordan

Answers

  • hisyam
    hisyam Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 16
    Options

    Thank you, Jordan!

    Well the only question I have is why did the filter recipe failed? The JSON parsing worked fine to produce the dataset. And I'm only checking for matching rows in the logger column which is a string type. Which intuitively, should have worked.

  • JordanB
    JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 293 Dataiker
    Options

    Hi @hisyam
    ,

    This error typically occurs when one of your audit files is broken. In order to fix it, you would have to manually review it. You can use the "jq" tool to identify the faulty record.
    Please note that we strongly recommend that you do not use run/audit files for automated processing, but rather use the DSS event server (ref: https://doc.dataiku.com/dss/latest/operations/audit-trail/eventserver.html)
    Thanks!
    Jordan
Setup Info
    Tags
      Help me…