Search code examples
geotoolsgeomesa

How to modify existing feature schema in geomesa-accumulo


I have feature "f" under a catalog(table) "c" which holds my temporal and spatial data along with some attributes(like speed and name). I am using java for inserting records in this feature type and everything is working fine.

My question is what if in future I need to store more attributes along with this existing (just like we add columns in RDBMs to store more details)?

How to integrate such changes along with existing simple feature type schema?


Solution

  • You can add attributes on the the end of your sft when new attributes become available. However, this will cause null to be returned for those fields on any already ingested records. In addition any newly added fields will not be indexed so you would need to use something like the add-attribute-index command from the command line tools if that is desired.

    Addtionaly, if your data is being ingested in json format you can store the record as a json blob and query arbitrary values in the json blob using JsonPath syntax. Of course this won't be indexed as well but it can be useful in some situation where you have highly variant data. This is a newer feature at this time so your mileage may vary when using it.