influxdata / nifi-influxdb-bundle

InfluxDB Processors For Apache NiFi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is is possible to use flowfile attribure as influxdb tags, fileds?

gogangipark opened this issue · comments

when creating the lineprotocol record of influxdb, i would like to use Use attribute of the flowfile
However, if you use the attribute of flowfile at making lineprotocol, cant not find the variable.

Is it possible to use the attribute of flowfile as a variable of lineprotocol?

Hi @gogangipark,

Currently the PutInfluxDatabaseRecord only evaluates tags and fields over Apache NiFi Record.

You could update your record by the UpdateRecord processor.

To add a tag field to your record use following configuration:

tag_from_attribute

Is it OK for you?

Thank you for your reply.
I did implement it successfully as your advice.

Hi,
Pardon me to write things in a closed issue. I need to write the data as line protocol to Kafka brokers. Therefore I make heavy use of InfluxLineProtocolRecordSetWriter. I need to dynamically change the tags and fields in the writer, but I cannot do that for tags and fields.

I noticed that I can easily change the measurement with a field in the data. Is it possible to make both tags and fields to read from either attributes or fields in the data like the measurement field?

Thanks for your replies.