There are no methods for changing a tag value. The values themselves are
used as part of the series index, so allowing for this is a very complex
and expensive operation, and one that's unlikely to be a 1.x feature.

> Is there a way to utilise 'INTO' for this operation?

INTO clauses change the destination measurement, and AS aliases can be used
to change the field keys, but there are no methods to change tag keys or
values. They can be preserved as tags or not, but they cannot be altered or
created.

However, you can use Kapacitor and a UDF to perform this task. Think of it
like a custom CQ that alters the names of objects as they pass through:
http://docs.influxdata.com/kapacitor/v1.0/examples/continuous_queries/.

Alternately, use the influx_inspect (
https://docs.influxdata.com/influxdb/v1.0/tools/influx_inspect/#influx-inspect-export)
tool
to dump the raw line protocol from the TSM files, edit the line protocol as
appropriate, and re-insert it.

On Mon, Sep 19, 2016 at 6:48 PM, William Cork <willfc...@gmail.com> wrote:

> Is there a current method to alter the values of a tag?
>
> Currently, I query the measurement, store the data locally, drop the
> series, push the data back with a new tag value. This is an extremely
> expensive operation when there are millions of data points. Is there a more
> efficient way of doing this?
>
> Example:
>
> > SELECT * FROM test
> name: test
> ----------
> time pv value
> 1474328511474971500 changeme 2
>
> > INSERT test,pv=changed value=2 1474328511474971500
> > DROP SERIES FROM test WHERE pv='changeme'
> > SELECT * FROM test
> name: test
> ----------
> time pv value
> 1474328511474971500 changed 2
>
>
> Is there a way to utilise 'INTO' for this operation?
>
> > SELECT value INTO "test,pv=changedbyinsert" FROM test WHERE pv='changeme'
>
> From the API docs, this creates a new measurement called
> 'test,pv=changedbyinsert'. Is it possible to SELECT ... INTO the same
> measurement but a different SERIES? Then, I can simply drop the old series.
> No large network traffic.
>
> This is not a feature request, nor is it critical to a project I'm working
> on. I'm just curious.
>
> However, this would be extremely useful for the case of individuals poorly
> inserting into the database. That data will still be important, but the
> tags may be messed up.
>
> Thanks,
> - Will
>
> --
> Remember to include the InfluxDB version number with all issue reports
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/c9c30e0f-d653-4015-af04-7c33a4f22007%40googlegroups.com
> <https://groups.google.com/d/msgid/influxdb/c9c30e0f-d653-4015-af04-7c33a4f22007%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sean Beckett
Director of Support and Professional Services
InfluxDB

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CALGqCvNkrTwhiUDG_%3DGOfiTx%3D940nKL%3DsZbTMc29YTVZ1khakA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to