bdit_data-sources
                                
                                 bdit_data-sources copied to clipboard
                                
                                    bdit_data-sources copied to clipboard
                            
                            
                            
                        Automate end of year maintenance
We have partitioned tables that are monthly/annually. We need to create new ones for the new year and update triggers etc. Procedure in #251, hopefully as much as possible can be made into a DAG.
- [x] Here traffic analytics
- [x] Bluetooth
- [x] Miovision
- [x] Holidays table
- [x] WYS table
Super pleased to have discovered how to use xcom to get a return value from a function and use it in a Slack message for updating the HERE TRIGGER function. Did realize after all that that I could instead use the loops in Python to recreate the long logic chain each year for every year and month from next year to 2012.
Also ran into this baffling bug https://stackoverflow.com/questions/70538612/tables-created-via-function-not-recognized-when-trying-to-update-trigger-functio
Well got the opportunity to do just that with Bluetooth. Python is ready just need to add the 2 tasks to the DAG.
Bluetooth works. Did have to grant CREATE permissions on the bluetooth schema to bt_bot but I don't suuuuper see why that would be an issue.
Holidays ✅
Might want to revisit the holidays package since it's reporting that New Year's Day is observed 2021-12-31...
WYS ✅
There should prooooobably be more documentation about these changes somewhere.