How to delete an automatically generated SAP HANA Cloud Platform IoT Message Management Service message table
Inspired by Björn Goerke’s executive keynote at TechEd Barcelona this year and the subsequent excellent hands-on workshop DEV164: Send Your Sensor Data to SAP HANA Cloud Platform with IoT Services, I started replicating the scenario with the little brother of the TI SensorTag that SAP have been using, which has fewer sensors but is therefore a little cheaper and in my opinion also has a nicer form factor.
However, with each new message type, the Message Management Service created a new table once a respective message was received, that unfortunately did not get deleted with the deletion of the message type itself. Eventually I lost oversight and started looking at the wrong table, wondering why no new massages arrived, because some tables had already been scrolled off the screen:
I updated my Message Management Service Cockpit to the latest version (2.5.0) but could still not find an obvious way to delete a message table from the cockpit. Next I checked help.sap.com, but besides information on how to customize the creation of message tables, I did not find information how to delete any orphan message tables there either.
Therefore I checked the persistence of the Message Management Services and sure enough, the message tables get stored in a HANA database revision 97.03:
So I connect Eclipse Luna with the SAP HANA Cloud Platform Tools installed to my SAP HANA Cloud Platform trial account:
Please ensure the correct Landscape host for your account:
Select the schema of the Message Management Services:
There your find your IoT message tables, ready to be deleted if not needed any longer:
Of course this kind of access offers many more options than just deleting no longer needed tables, like building views and analysing the content, but for my purpose at hand, i.e. house keeping the Message Management Services Cockpit, deleting them was sufficient:
I am sure SAP will add functionality for housekeeping the message tables in further releases of the SAP HANA Cloud Platform IoT Message Management Service Cockpit, but currently, either SQL statements or the method that I describe above, are the only ways to delete or truncate message tables, that I am aware of.