> currently, it is therefore not easily possible to "delete" a tag
Are you planning to add that at some point?
A manual solution (eg: instructions for the command line) would be fine. Deleting via the web UI is of course the more comfortable solution.
I noticed after integrating some devices that I end up with data in the historian that I don't want or need, because I changed JSON fields or topics etc. It would be nice to be able to get rid of such things.
j
Jermuk
01/29/2025, 10:42 AM
we are planning on doing that, but it will be a big effort with probably low to medium impact.
we would need to delete/rename the data from MQTT, from Kafka, and from TimescaleDB, and proabably do that couple of tiems to ensure it was really deleted (as there could be older messages somewhere that woudl re-create it again)
s
Stephen Bryant
01/29/2025, 1:53 PM
Perhaps it would help to reduce the use case:
- assume that the data is no longer being published to MQTT at the given topic
- assume the "delete" use case only needs to be covered at this point in time
- assume that a manual solution is acceptable, and a documented description of actions is enough for the moment
You then need only to describe how to remove the data from each of these locations, and in which order. Using an addtional common tool would be acceptable, eg: MQTT Explorer can easily delete MQTT topics.
Now you're helping users help themselves quite soon with much less effort, and you can plan the proper solution at a time that better fits your feature prioritisation.
Remember though: nothing lasts longer than a temporary fix 🙂
j
Jermuk
01/29/2025, 3:41 PM
I think it would require something like this:
1. deleting from MQTT is hardly possible (no API for that) and the MQTT explorer only deletes it on your client device as well, so we need to simply wait and retry a couple of times in case of stuck messages
2. deleting from Kafka requires the "same topic experience" @Athavan kanapuli , so then we can delete the kafka topic (and again, retry it a couple of times for stuck messages)
3. then we can delete it from the tag / tag_string table as well
s
Stephen Bryant
01/29/2025, 10:21 PM
I've found that publishing an empty message to an MQTT topic is close enough to a deletion. Of course, this step may not be necessary at all, depending on QoS and retained settings.
I have no clue how to do that with Kafka. A shell command example would be great.
Can I assume its safe to delete an asset if it has no corresponding entries in tag or tag_string? (I didn't look at the DB schema - the link is 404.)
j
Jermuk
01/30/2025, 8:05 AM
Yes, it is safe (assuming you didn’t use the analytics schema, which is currently deprecated anyway and not findable in the documentation anyway)