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

Error Loading Json into the table #156

Closed TayyabMir56 closed 6 years ago

TayyabMir56 commented 6 years ago

Hi. I'm following your tutorial "Aggregation Sample for Hive" Using the LOAD DATA INPATH Command, Following is my ouput image To be noted: numRows = 0

When I query this table it shows junk value Query: SELECT * FROM counties LIMIT 100; Output:

image

This did not happen when I followed the tutorial with the previous version of JAR files a few months back.

Please inform me what am I doing wrong here, although I'm just copy pasting the queries.

Regards Tayyab

climbage commented 6 years ago

What you're seeing is the binary representation of BoundaryShape. You need to use ST_AsText to convert to a human readable format.

create temporary function ST_AsText as 'com.esri.hadoop.hive.ST_AsText';
select st_astext(BoundaryShape) from counties;
TayyabMir56 commented 6 years ago

My bad. Many Thanks for the quick response.