I am using a change node to produce a long string where several parts need to be replaced by the value of environment variables. See example here below:
This functionally works perfect but the problem is that
- it is not very convenient to edit / review such long strings as only a small part is visible in the editor.
- moreover the string is actually a multiline string while it is shown as a single line string in the editor which also makes it harder to edit / review.
FYI in my case the multiline string =
from(bucket: "${INFLUXDB_BUCKET}")
|> range(start: -30d, stop: now())
|> filter(fn: (r) => r._measurement == "${INFLUXDB_MEASUREMENT}" and
r._field == "steps" and
r.wearer == "${INFLUXDB_MIBAND_OWNER}")
|> keep(columns: ["_time"])
|> sort(columns: ["_time"], desc: false)
|> last(column: "_time")
Maybe the template node can be used instead but I don't know how I then should specify environment variables in the template.
