influxdata / influxdata/kapacitor
Copying a subset to a new measurement
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Hello, I want to copy all non-zero entries to a new measurement. My tick looks like this:
```tick
batch
|query('select * from "asdf"."autogen"."linedata" where value != 0').every(1d).period(1d)
|influxDBOut().database('asdf').measurement('newlinedata')
```
Unfortunately the tags are not preserved. How can I do that? I want to copy all the tags without specifying them explicitly.
The reason behind this is, that I want to remove all zero values. Therefore the next step would be to remove the original series and then copy the data back. If you have a better solution, please tell me.
Thanks!
Contributor guide
Research direction
Start by reproducing the shown tick task with a query that filters out zero values and writes to a new measurement. Read the query and influxDBOut behavior, then determine whether tags can be retained without being listed explicitly; done means the copied non-zero entries preserve all original tags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100