Rename and delete channels
Rename channels, or delete them and their data.
Rename a channel to give it a clearer name. Delete a channel to remove it and all of its data.
Rename channels
Console
Python
TypeScript
Right-click the channel in the channels toolbar and select Rename.
# One channel
client.channels.rename(tank_pressure.key, "ox_tank_pressure")
# Many channels
client.channels.rename(
[tank_pressure.key, tank_temperature.key],
["ox_tank_pressure", "ox_tank_temperature"],
)// One channel
await client.channels.rename(tankPressure.key, "ox_tank_pressure");
// Many channels
await client.channels.rename(
[tankPressure.key, tankTemperature.key],
["ox_tank_pressure", "ox_tank_temperature"],
);The new name must follow the name rules. A rename does not change the data of the channel.
What a rename changes
Plots, schematics, and tasks refer to channels by key. They continue to work after a rename.
Calculated channels and Arc automations refer to channels by name. After a rename, a
calculated channel that uses the old name shows an error. Edit its expression to use the
new name. A calculated channel keeps its <name>_time index when you rename it, and the
index keeps its old name.
In an Arc editor, Rename symbol on a channel name renames the channel in Synnax. It does not change other Arc automations or calculated channels.
Delete channels
Deleting a channel also deletes all of its data. You cannot undo a delete.
Console
Python
TypeScript
Select one or more channels in the channels toolbar. Right-click the selection, select Delete, and confirm.
# By key
client.channels.delete(tank_pressure.key)
client.channels.delete([tank_pressure.key, tank_temperature.key])
# By name
client.channels.delete("tank_pressure")
client.channels.delete(["tank_pressure", "tank_temperature"])A pattern deletes every channel that it matches.
delete("tank_.*") deletes all channels whose names start with tank_. delete raises
no error when a channel does not exist, so you can call it again.
// By key
await client.channels.delete(tankPressure.key);
await client.channels.delete([tankPressure.key, tankTemperature.key]);
// By name
await client.channels.delete("tank_pressure");
await client.channels.delete(["tank_pressure", "tank_temperature"]);A pattern deletes every channel that it matches.
delete("tank_.*") deletes all channels whose names start with tank_. delete throws
no error when a channel does not exist, so you can call it again.
Before you delete
- Index channels -> Synnax does not delete an index channel while data channels use it. To delete both, delete the data channels first, or delete all of them in one call.
- Open channels -> Synnax does not delete a channel while a writer or a reader has it open. Stop the tasks and scripts that use the channel first.
- References -> Synnax does not check tasks, Arc automations, or calculated channels before a delete. After the delete, they fail or show an error, so update them first.
- Calculated channels -> when you delete a calculated channel, its
<name>_timeindex stays. Delete the index too.
To delete the data in a time range and keep the channel, see delete data.