NYCPlanning / db-developments

🏠 🏘️ πŸ—οΈ Developments Database
https://nycplanning.github.io/db-developments
8 stars 2 forks source link

One-off create historic QAQC - DON'T MERGE #523

Closed SashaWeinstein closed 2 years ago

SashaWeinstein commented 2 years ago

❌ No merge ❌ This PR has code to create the historic QAQC table that we will append rows to in future production and testing runs of devDB. The approach is similar to the pluto QAQC, where files are pulled down from main and uploaded with a new row appended.

After this PR is approved I will upload the .sql and .csv file to DO. I opened issue #522 to ask a question on how we should write to DO, think this is a question for @AmandaDoyle.

Then I will open another PR that will be merged that has code to pull down the table from DO and add a single row for the current version.

The .sql logic in qaqc_historic.sql I wrote is very repetitive, I couldn't figure out how to set the filepath to the csv or the table name from a variable so I copy/pasted 3 times. 😒 The code I wrote to sum each column and insert to qaqc_historic will be the basis of the query that gets merged in on the next PR

Note that 21Q2 is empty, I kept it in because it is a published version and I thought we may want to explicitly store that there is no data for this version but maybe that's silly

SashaWeinstein commented 2 years ago

Making it a draft blocks it from being merged πŸ§