Skip to content

Commit 97617d2

Browse files
authored
Merge pull request #116 from CESNET/clickhouse-ignore-opts-templates
Clickhouse - ignore records using options templates
2 parents c184697 + 29b8e3c commit 97617d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

extra_plugins/output/clickhouse/src/plugin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ void Plugin::extract_values(ipx_msg_ipfix_t *msg, RecParser &parser, Block &bloc
144144
int
145145
Plugin::process_record(ipx_msg_ipfix_t *msg, fds_drec &rec, Block &block)
146146
{
147+
if (rec.tmplt->type == FDS_TYPE_TEMPLATE_OPTS) {
148+
// skip the data record if the template used is a options template
149+
// currently we only want data records using "normal" templates
150+
// this is to prevent empty records in the database and might be improved upon in the future
151+
return 0;
152+
}
153+
147154
int ret = 0;
148155
RecParser &parser = m_rec_parsers->get_parser(rec.tmplt);
149156
parser.parse_record(rec);

0 commit comments

Comments
 (0)