Task: Implement Edge Function in Supabase
Features: Create a Supabase Edge Function trigger to aggregate livestock data by province, year, and type whenever new entries are added to the livestock table. Results will populate/update the province_livestock table automatically. A typical entry into the livestock table id: 1 asid: 1101 year: 2024 type: goat livestock: 23. Now when this is entered into the livestock table you will deconstruct the asid to find the province id (first two letters of the asid) and then aggregate all the values of that province for each livestock for each year and add it as a new year under the province_livestock table
Task: Implement Edge Function in Supabase
Features: Create a Supabase Edge Function trigger to aggregate livestock data by province, year, and type whenever new entries are added to the livestock table. Results will populate/update the province_livestock table automatically. A typical entry into the livestock table
id: 1 asid: 1101 year: 2024 type: goat livestock: 23. Now when this is entered into the livestock table you will deconstruct the asid to find the province id (first two letters of the asid) and then aggregate all the values of that province for each livestock for each year and add it as a new year under theprovince_livestocktable