Skip to content

Commit 85f0191

Browse files
Update create-alter.md
1 parent ac672ca commit 85f0191

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ds/ts/create-alter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You create time series using the `TS.CREATE` command. `TS.CREATE` requires one a
1414

1515
The following example creates a time series key for each of five bike shops that will track the total sales for each. Each key has an appropriate region label, `east` or `west`, and also a label indicating that the time series is not compacted. The labels allow you to query bike sales performance over specific periods on a per-shop or per-region basis.
1616

17-
```redis Create time series for each shop
17+
```redis:[run_confirmation=true] Create time series for each shop
1818
TS.CREATE bike_sales_1 DUPLICATE_POLICY SUM LABELS region east compacted no
1919
TS.CREATE bike_sales_2 DUPLICATE_POLICY SUM LABELS region east compacted no
2020
TS.CREATE bike_sales_3 DUPLICATE_POLICY SUM LABELS region west compacted no
@@ -42,14 +42,14 @@ You can use the `TS.ALTER` command to modify time series post-creation. `TS.ALTE
4242

4343
Here are a couple of examples.
4444

45-
```redis Alter labels incorrectly
45+
```redis:[run_confirmation=true] Alter labels incorrectly
4646
TS.ALTER bike_sales_1 LABELS region west // change the region from east to west, but forgetting to include the other label
4747
TS.INFO bike_sales_1 // note how the compacted/no label-value pair was dropped
4848
TS.ALTER bike_sales_1 LABELS region east compacted no // change it back
4949
TS.INFO bike_sales_1
5050
```
5151

52-
```redis Alter the duplicate policy
52+
```redis:[run_confirmation=true] Alter the duplicate policy
5353
TS.MADD bike_sales_1 1000 1 bike_sales_1 1000 2 bike_sales_1 1000 3 // first add some samples; more about this later
5454
TS.GET bike_sales_1 // because DUPLICATE POLICY is set to SUM, the returned value is 6
5555
TS.ALTER bike_sales_1 DUPLICATE_POLICY MIN

0 commit comments

Comments
 (0)