Create a new api route that serves as a proxy to hide all SQL details from client side, this PoC will serve as the first step to implement a data mart on the API side by the engineering team.
The new api route only works for the net change widget since it is a simple one that doesn't have dynamic filters.
Original client request:
https://gfw-staging-pr-4810.herokuapp.com/api/data/dataset/umd_adm2_net_tree_cover_change_from_height/v202209/query/?sql=SELECT iso, adm1, adm2, iso, adm1_name, adm2_name, stable, loss, gain, disturb, net, change, gfw_area__ha FROM data WHERE iso = 'MEX' AND adm1 = '9' AND adm2 = '3'
Overview
Create a new api route that serves as a proxy to hide all SQL details from client side, this PoC will serve as the first step to implement a data mart on the API side by the engineering team.
The new api route only works for the net change widget since it is a simple one that doesn't have dynamic filters.
Original client request:
New client request:
Demo
Notes
If applicable: ancilary topics, caveats, alternative strategies that didn't work out, etc.
Testing