No release in over a year
It works as record splitter in filter stage.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.4.19
~> 13.0.6
~> 3.6.1

Runtime

>= 0.14.10, < 2
 Project Readme

fluent-plugin-filter-split

Fluentd filter plugin to split specified field.

Compared to existing plugins:

Thus, about above plugins, there are limitation of type of field or missing feature to control keep/remove other fields.

Installation

RubyGems

$ gem install fluent-plugin-filter-split

Bundler

Add following line to your Gemfile:

gem "fluent-plugin-filter-split"

And then execute:

$ bundle

Configuration

parameter type description default
split_key string (required) Specify a target key to split
keep_other_key bool (optional) Specify a flag whether other key must be kept or not false
keep_keys array (optional) Specify keys to be kept in filtered record []
remove_keys array (optional) Specify keys to be removed in filtered record []

Example

<filter test>
  @type filter_split
  split_key target_field
  keep_other_key true
</filter>

If following record is passed:

{'foo:'bar', 'target_field':[ {'k1':'v1'}, {'k2':'v2'} ] }

Then, you got:

{'foo:'bar', 'k1':'v1'}
{'foo:'bar', 'k2':'v2'}

If following record is passed:

{'foo:'bar', 'target_field':[ 'v1', 'v2' ] }

Then, you got:

{'foo:'bar', 'target_field':'v1'}
{'foo:'bar', 'target_field':'v2'}

Copyright

  • Copyright(c) 2023- Kentaro Hayashi
  • License
    • Apache License, Version 2.0