{"id":21056921,"url":"https://github.com/fluent-plugins-nursery/fluent-plugin-filter_where","last_synced_at":"2025-05-15T23:33:31.615Z","repository":{"id":56846977,"uuid":"83982221","full_name":"fluent-plugins-nursery/fluent-plugin-filter_where","owner":"fluent-plugins-nursery","description":"Fluentd plugin to filter records with SQL-like WHERE statement","archived":false,"fork":false,"pushed_at":"2017-09-19T08:48:25.000Z","size":49,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T17:15:37.735Z","etag":null,"topics":["fluentd-filter-plugin","fluentd-plugin","v12","v14"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluent-plugins-nursery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-05T15:51:23.000Z","updated_at":"2023-04-04T08:21:30.000Z","dependencies_parsed_at":"2022-09-09T20:12:28.181Z","dependency_job_id":null,"html_url":"https://github.com/fluent-plugins-nursery/fluent-plugin-filter_where","commit_stats":null,"previous_names":["sonots/fluent-plugin-filter_where"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-filter_where","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-filter_where/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-filter_where/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-filter_where/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluent-plugins-nursery","download_url":"https://codeload.github.com/fluent-plugins-nursery/fluent-plugin-filter_where/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442429,"owners_count":22071864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fluentd-filter-plugin","fluentd-plugin","v12","v14"],"created_at":"2024-11-19T16:54:56.929Z","updated_at":"2025-05-15T23:33:26.507Z","avatar_url":"https://github.com/fluent-plugins-nursery.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-filter_where\n\n[![Build Status](https://secure.travis-ci.org/sonots/fluent-plugin-filter_where.png?branch=master)](http://travis-ci.org/sonots/fluent-plugin-filter_where)\n\nFluentd plugin to filter records with SQL-like WHERE statements\n\n## Requirements\n\nSee [.travis.yml](.travis.yml)\n\n`fluent-plugin-filter_where` supports both v0.14 API and v0.12 API in one gem.\n\n## Installation\n\nUse RubyGems:\n\n    gem install fluent-plugin-filter_where\n\n## Configuration\n\n- where\n\n    The SQL-like WHERE statements. See [SQL-like Syntax](#sql-like-syntax) for more details.\n\n### Example\n\n```apache\n\u003cfilter foo.**\u003e\n  @type where\n  where string_key = 'string' OR number_key \u003e= 0.1\n\u003c/filter\u003e\n```\n\n## SQL-like Syntax\n\nExample:\n\n```sql\nwhere (string_key START_WITH 'str' AND number_key \u003e 1.0) OR (\"true_key\" = true AND NOT (string_key REGEXP '^reg'))\n```\n\n## Literals\n\n### Boolean Literal\n\n`true` or `TRUE` or `false` or `FALSE` are considered as a boolean literal\n\n### Number Literal\n\nCharacters matching with a regular expression `-?[0-9]+(\\.[0-9]+)?` is considered as a number literal\n\n### String Literal\n\nCharacters surrounded by `'` such as `'foo'` is considered as a string literal\n\n### Json Literal\n\nNot supported yet\n\n### Identifier Literal\n\nCharacters matching with a regular expression `[a-zA-Z_][a-zA-z0-9_]*` such as `foobar`, and characters surrounded by `\"` such as `\"foo-bar\"`, `\"foo.bar\"`, and `\"foo\\\"bar\"` are considred as an identifier literal, that is, fluentd's record key name.\n\n## Operators\n\n### Boolean Operator\n\n* `=`: Equal operator\n* `!=`, `\u003c\u003e`: Not equal operator\n\n### Number Operator (Long and Double)\n\n* `=`: Equal operator\n* `!=`, `\u003c\u003e`: Not equal operator\n* `\u003e`: Greater than operator\n* `\u003e=`: Greater than or equal operator\n* `\u003c=`: Less than or equal operator\n* `\u003c`: Less than operator\n\n### String Operator\n\n* `=`: Equal operator\n* `!=`, `\u003c\u003e`: Not equal operator\n* `START_WITH`\n* `END_WITH`\n* `INCLUDE`\n* `REGEXP`\n\n### Json Operator\n\nNot supported yet\n\n### Negate Operator\n\n* `NOT xxx`\n\n### NULL Operator\n\n* `IS NULL`\n* `IS NOT NULL`\n\n## ChangeLog\n\nSee [CHANGELOG.md](CHANGELOG.md) for details.\n\n## Development\n\nRun test:\n\n```\n$ bundle exec rake test\n```\n\nRelease:\n\nModify version.rb and CHANGELOG.md, then\n\n```\n$ bundle exec rake release\n```\n\n## Development of SQL-like Syntax\n\nThis plugin uses [rexical](https://github.com/tenderlove/rexical) for lexical scanner generator, and [racc](https://github.com/tenderlove/racc) for parser generator.\n\nIf you modify `parser.rex` or `parser.racc`, you must compile them as:\n\n```\n$ bundle exec rake compile\n```\n\nThe `test` task runs the `compile` task before running.\n\n## Comparisons\n\n* grep filter\n  * grep filter plugin is bundled in fluentd \u003e= 0.12.\n  * I am the maintainor of the plugin, but I now feel where filter plugin is more useful.\n  \n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new [Pull Request](../../pull/new/master)\n\n## Copyright\n\nCopyright (c) 2017 - Naotoshi Seo. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-filter_where","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-filter_where","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-filter_where/lists"}