updated duplicate points doc to address PR feedback
parent
3392be6050
commit
63a8e4e764
|
@ -24,9 +24,9 @@ Measurement Tag set Timestamp
|
||||||
```
|
```
|
||||||
|
|
||||||
## How InfluxDB handles duplicate points
|
## How InfluxDB handles duplicate points
|
||||||
If a new point has the same measurement name, tag set, and timestamp as an
|
For points that have the same measurement name, tag set, and timestamp,
|
||||||
existing point, InfluxDB creates a union of the old and new field sets.
|
InfluxDB creates a union of the old and new field sets.
|
||||||
For any matching field keys, InfluxDB uses the field value of the new data point.
|
For any matching field keys, InfluxDB uses the field value of the new point.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
@ -52,17 +52,15 @@ Table: keys: [_measurement, host, region]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Preserve duplicate points
|
## Preserve duplicate points
|
||||||
In some cases, you may want to preserve both old and new values.
|
To preserve both old and new field keys in duplicate points, use one of the following strategies:
|
||||||
There are two strategies for preserving duplicate field keys in data points that share a measurement, tag set, and timestamp:
|
|
||||||
|
|
||||||
- [Add an arbitrary tag](#add-an-arbitrary-tag)
|
- [Add an arbitrary tag](#add-an-arbitrary-tag)
|
||||||
- [Increment the timestamp](#increment-the-timestamp)
|
- [Increment the timestamp](#increment-the-timestamp)
|
||||||
|
|
||||||
### Add an arbitrary tag
|
### Add an arbitrary tag
|
||||||
Introduce an arbitrary tag to duplicate points to enforce the uniqueness of each point.
|
Add an arbitrary tag with unique values so InfluxDB reads the duplicate points as unique.
|
||||||
Because the tag sets are different, InfluxDB treats them as unique points.
|
|
||||||
|
|
||||||
The following example introduces an arbitrary `uniq` tag to each data point:
|
For example, add a uniq tag to each data point:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Old point
|
# Old point
|
||||||
|
|
Loading…
Reference in New Issue