THIS IS A BETA CUSTOM SQL-MR STATEMENT AND IT IS NOT SUPPORTED BY TERADATA ENGINEERING, CUSTOMER SUPPORT, OR THE FIELD.
CrowMiles was written while analyzing shopping habits of people and identifying why they continue to ignore retail shops near their home location, and understanding if their is a loyality aspect with the retail chain despite people moving out of a certain area.
CrowMiles is the simplest of MR functions which calculates the distance between two longitude and latitude points.
Select * From CrowMiles( on source_table_name
longstart(<start point longitude>)
longend(<end point longitude>)
latstart(<start point latitude>)
latend(<end point latitude>)
Longitude of first point.
Latitude of first point
Longitude of second point
Latitude of second point
For each input row, CrowMiles will return all input columns in addition to:
The distance between the two longitude and latitude points.
NumberFormatException -> The Longitude and Latitude points should be varchar columns containing numeric data.