Skip to content

Instantly share code, notes, and snippets.

@JoaoCarabetta
Created February 4, 2019 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaoCarabetta/0f643603e9869005d30fe76003878dc3 to your computer and use it in GitHub Desktop.
Save JoaoCarabetta/0f643603e9869005d30fe76003878dc3 to your computer and use it in GitHub Desktop.
Waze linestring to geojson in Athena
SELECT
'{"type":"LineString", "coordinates":' ||
'[' || array_join(transform(line, loc -> '[' || CAST(loc.x AS VARCHAR) || ',' || CAST(loc.y AS VARCHAR) || ']'), ',') || ']}'
FROM test.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment