require 'flydata/parser_provider' require 'flydata/fluent-plugins/mysql/ddl_query_handler' module Mysql class TruncateTableQueryHandler < TableDdlQueryHandler PATTERN = /^TRUNCATE/i def initialize(context) super end def pattern PATTERN end def process(record) emit_record(:truncate_table, record) do |opt| { table_name: record['table_name'], query: record["query"] } end end end end