Created
July 14, 2022 08:11
-
-
Save wriglz/65e04bdcfd8c9cef3ea74da8a4bab449 to your computer and use it in GitHub Desktop.
SQL to parse geometry object from GeoJSON feature collection for use in BigQuery
This file contains hidden or 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
| UPDATE | |
| `project.dataset.table` | |
| SET | |
| geom = ST_GEOGFROMGEOJSON( | |
| JSON_QUERY(geo_json,'$.geometry'), make_valid => TRUE) | |
| WHERE | |
| geom IS NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment