A Fluent filter plugin to convert postgres sql to sql's fingerprint.
This fluent plugin is inspired by fluent-plugin-sql_fingerprint.
Use fluent-plugin-sql_fingerprint if you want to get sql fingerprint for mysql sql.
And this fluent plugin depends on pg_query gem to normalize postgres sql.
- Fluentd ~> 1.14
- libpq to build the pg_query gem
gem install fluent-plugin-pgsql_fingerprint
<filter tag.dummy.*>
type pgsql_fingerprint
</filter>
A record like this.
{
"sql": "SELECT * FROM demo WHERE record = 'AAA';"
}
This fluent plugin filter the record, like this.
(Add added_key
attribute with normalized sql.)
{
"sql": "SELECT * FROM demo WHERE record = 'AAA';"
"fingerprint": "SELECT * FROM demo WHERE record = ?;"
}
See LICENSE.