[GIS] Load .shp file in Hive(Hadoop)

hadoophiveshapefile

I need to load .shp files in Hive more precisely in HortonWorks sandbox through Beeswax, can anyone provide example of Hive commands or steps for Beeswax ?

Best Answer

You should be able to export the shape file as a GeoJSON file from QGIS.

  • With the shapefile added to your map, right click on it in the legend/TOC and click on 'Save As...' in the pop-up menu.
  • Select GeoJSON as the output format

Keep in mind that while it is valid JSON, the GeoJSON output this way may not be in the exact format you are expecting. OGR (which is what QGIS is using to export the data) will put all features into a single feature collection, which may show up as a single record depending on how you are parsing it.