Created
March 10, 2021 00:22
-
-
Save chapmanjacobd/9bce131d3375b3d209ec11e10574360b to your computer and use it in GitHub Desktop.
BigQuery GeoJSON Export Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT boundary_id, TO_JSON_STRING((SELECT AS STRUCT | |
'Feature' as type, | |
b.id as id, | |
st_asgeojson(geom) as geometry, | |
(SELECT AS STRUCT my_geo_json_property as value) as properties | |
)) | |
from aggregate.stats s | |
join reference.boundaries b on b.id = s.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment