spatial-framework-for-hadoop icon indicating copy to clipboard operation
spatial-framework-for-hadoop copied to clipboard

Can i use as struct variable as a column?

Open hengshan123 opened this issue 8 years ago • 3 comments

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

hengshan123 avatar Jul 05 '17 06:07 hengshan123

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.

randallwhitman avatar Jul 05 '17 15:07 randallwhitman

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.

sshikov avatar Feb 11 '18 14:02 sshikov

Cross-reference #9 , #36

randallwhitman avatar Feb 12 '18 16:02 randallwhitman