Back to Redis

TS.DELETERULE

content/commands/ts.deleterule.md

latest1.9 KB
Original Source

{{< note >}} This command's behavior varies in clustered Redis environments. See the [multi-key operations]({{< relref "/develop/using-commands/multi-key-operations" >}}) page for more information. {{< /note >}}

Delete a compaction rule

Required arguments

<details open><summary><code>sourceKey</code></summary>

is key name for the source time series.

</details> <details open><summary><code>destKey</code></summary>

is key name for destination (compacted) time series.

</details>

<note><b>Note:</b> This command does not delete the compacted series.</note>

Redis Software and Redis Cloud compatibility

| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Flexible & Annual</span> <span title="Supported">✅ Free & Fixed</nobr></span> | |

Return information

{{< multitabs id="ts-deleterule-return-info" tab1="RESP2" tab2="RESP3" >}}

One of the following:

  • [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): OK when the compaction rule is deleted successfully.
  • [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, or when such rule does not exist.

-tab-sep-

One of the following:

  • [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): OK when the compaction rule is deleted successfully.
  • [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, or when such rule does not exist.

{{< /multitabs >}}

See also

[TS.CREATERULE]({{< relref "commands/ts.createrule/" >}})

[RedisTimeSeries]({{< relref "/develop/data-types/timeseries/" >}})