{"record":{"id":"047db17436a4e65f","repo":"fluent/fluentd","slug":"unknown-value-conversion-for-key-field-name","errorCode":null,"errorMessage":"unknown value conversion for key:'#{field_name}', type:'#{type}'","messagePattern":"unknown value conversion for key:'#(.+?)', type:'#(.+?)'","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/parser.rb","lineNumber":236,"sourceCode":"\n        return time, record\n      end\n\n      def string_like_null(value, null_empty_string = @null_empty_string, null_value_regexp = @null_value_pattern)\n        null_empty_string && value.empty? || null_value_regexp && string_safe_encoding(value){|s| null_value_regexp.match?(s) }\n      end\n\n      TRUTHY_VALUES = ['true', 'yes', '1']\n\n      def build_type_converters(types)\n        return nil unless types\n\n        converters = {}\n\n        types.each_pair do |field_name, type_definition|\n          type, option = type_definition.split(\":\", 2)\n          unless AVAILABLE_PARSER_VALUE_TYPES.include?(type)\n            raise Fluent::ConfigError, \"unknown value conversion for key:'#{field_name}', type:'#{type}'\"\n          end\n\n          conv = case type\n                 when 'string' then ->(v){ v.to_s }\n                 when 'integer' then ->(v){ v.to_i rescue v.to_s.to_i }\n                 when 'float' then ->(v){ v.to_f rescue v.to_s.to_f }\n                 when 'bool' then ->(v){ TRUTHY_VALUES.include?(v.to_s.downcase) }\n                 when 'time'\n                   # comma-separated: time:[timezone:]time_format\n                   # time_format is unixtime/float/string-time-format\n                   timep = if option\n                             time_type = 'string' # estimate\n                             timezone, time_format = option.split(':', 2)\n                             unless Fluent::Timezone.validate(timezone)\n                               timezone, time_format = nil, option\n                             end\n                             if Fluent::TimeMixin::TIME_TYPES.include?(time_format)\n                               time_type, time_format = time_format, nil # unixtime/float","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/parser.rb#L218-L254","documentation":"Parser#build_type_converters (lib/fluent/plugin/parser.rb:236) validates the types config of any parser plugin and raises Fluent::ConfigError for an unknown type name. Valid types are exactly 'string', 'integer', 'float', 'bool', 'time', 'array' (AVAILABLE_PARSER_VALUE_TYPES, parser.rb:98); the part before the first ':' is the type, everything after is its option. This fails during configure, before any data is processed.","triggerScenarios":"Config such as <parse> @type json types user_id:integer,enabled:boolean </parse> ('boolean' invalid, must be 'bool'); types created_at:datetime or ts:date; a typo like interger; leaving a stray value without a type (types field1:), which splits to type '' and also fails.","commonSituations":"Porting configs from other tools that use 'boolean'/'datetime'/'long' type names; JSON parser users typing string type names from schemas (Avro/Protobuf style); forgetting that complex types go through 'array'/'time' with options rather than distinct names; trailing commas or empty entries in the types map.","solutions":["Correct the type name to one of string, integer, float, bool, time, array.","For timestamps use the 'time' type with an option: types ts:'time:%Y-%m-%dT%H:%M:%S%z' or time_type/time_format in the parse block.","Validate the config before deploy with fluentd --dry-run -c /etc/fluent/fluent.conf.","Check for empty entries: every key in types must be 'name:type[:option]'."],"exampleFix":"# before\n<parse>\n  @type json\n  types user_id:integer, enabled:boolean, created_at:datetime\n</parse>\n# after\n<parse>\n  @type json\n  types user_id:integer, enabled:bool, created_at:time\n  time_format %Y-%m-%dT%H:%M:%S%z\n</parse>","handlingStrategy":"validation","validationCode":"# config lint before deploy\nrequire 'yaml'\nVALID = %w[string integer float bool time array]\ndef lint_types(types_string)\n  types_string.split(',').each do |pair|\n    k, t = pair.split(':', 2)\n    abort \"invalid types entry: #{pair}\" unless k && VALID.include?(t)\n  end\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the valid list visible: string, integer, float, bool, time, array.","Run fluentd --dry-run -c <conf> in CI for every config change.","Write 'boolean' as 'bool' and date/timestamps as 'time' with a format option.","Generate types lines from a template that only emits known names."],"tags":["fluentd","parser-plugin","config-error","type-conversion"],"backgroundTag":"invalid-config-value","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}