I have defined table structure as defined below,
CREATE TABLE sensor_data (
asset_id text,
event_time timestamp,
sensor_type int,
temperature int,
humidity int,
voltage int,
co2_percent int
PRIMARY KEY(asset_id ,event_time)
) WITH CLUSTERING ORDER BY (event_time ASC)
this table captures data coming from a sensor and depending on type of sensor -- column sensor_type, some columns will have a value some others will not. Example temperature only applies to temperature sensor, humidity sensor applies to humidity sensor etc.
Now as I work with more and more sensor my intention is I will simply add additional columns using alter table command. Is this a correct strategy to follow or are there better ways to design this table for future use?