Skip to content

Instantly share code, notes, and snippets.

@regel
Last active February 16, 2019 07:58
Show Gist options
  • Save regel/8c3ca17416975a8505f122747c90e385 to your computer and use it in GitHub Desktop.
Save regel/8c3ca17416975a8505f122747c90e385 to your computer and use it in GitHub Desktop.
TICK-1 section 2
var data = stream
// this from node selects all input data received in the given measurement
|from()
.measurement(from_measurement)
.where(lambda: "model" == model)
// this eval node remembers the model name
|eval(lambda: model)
.as('model')
.keep()
// the next five lines save the data to the target database into a new measurement
var saved = data
|influxDBOut()
.database(out_db)
.retentionPolicy(retention_policy)
.measurement(out_measurement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment