Skip to main content
Panther Knowledge Base

How to fix "invalid number: NaN/Inf" in schema parsing?

Issue

I have a log schema which uses the CSV or fastmatch parser. When ingesting logs, I get one of the following errors:

parse failed: Field_*: ReadNullFloat64: invalid number *
parse failed: Field_*: ReadNullInt64: strconv.ParseInt: parsing "*": invalid syntax

Resolution

To resolve this issue, change the field type in the schema from float or bigint to string.

Cause

Some text/CSV parsers allow symbolic numbers, like Inf or NaN to validate as numeric values; however, JSON does not support such values, and thus when Panther tries to convert your log to JSON for storage, it causes a classification error. In order to successfully parse these values into Panther, you must change the field type to string, which will accept any value.