Esri / spatial-framework-for-hadoop

The Spatial Framework for Hadoop allows developers and data scientists to use the Hadoop data processing system for spatial data analysis.
Apache License 2.0
363 stars 160 forks source link

Can i use as struct variable as a column? #126

Open hengshan123 opened 7 years ago

hengshan123 commented 7 years ago

When i use com.esri.hadoop.hive.serde.GeoJsonSerDe as serde method. i find i can't create a table use struct column.

randallwhitman commented 7 years ago

Currently the {Esri,Geo}JsonSerDe supports only primitive field types. The Spatial-framework-for-Hadoop is open-source and contributions are welcome. The code change would start with BaseJsonSerDe.initialize and BaseJsonSerDe.generateJsonFromValue and BaseJsonSerDe.setRowFieldFromParser.

sshikov commented 6 years ago

Per my understanding I can't also create a column from primitive field, not contained within "properties' object (for GeoJson). This is too inconvenient for typical OpenStreetMap GeoJson, where osm_id and osm_type (just for example) are both top level properties, at the same level as 'geometry'.

I.e., for sample geojson like this:

{ "osm_id": 123 , "type": "Feature" , "geometry": ... , "properties": { "name": "..." } }

I can create Hive columns from "properties" only, not from osm_id.

randallwhitman commented 6 years ago

Cross-reference #9 , #36