I am new to clickhouse and I am exploring it for a possible use case. I need to build a click house table where, say, the last month rows are changing constantly. let's call this "last block". The change frequency of the last block could be as fast every 5 min or once a day. once a new last block is calculated (outside of clickhouse), I would like to be able to replace all the "last block" related rows with the newly calculated last block in one atomic operation.
one way that I am thinking to do this is make the clickhouse partition to match my blocks, then insert my last black into a new table and then somehow replace the original table partition, with the new created partition of the new last block. I am only assuming this would be possible but have no idea how to actually do it with clickhouse yet.
Could the above be done and make sense? if not, what do you recommend to atomically replace a portion of the latest data in a clickhouse table?