Convert STRING to FLOAT through FluentD using csv plugin

I need help with converting a string field to float either by modifying td-agent.conf file or by scripted field but seem to be failing miserably.

For the scripted fields, you could do something like?

if (doc['stringnumber'].empty) { 
    return "0" 
} else { 
    return Double.parseDouble(doc['stringnumber'].value); 

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.