Closed benjaffe closed 1 year ago
Hey @benjaffe sorry for that, my personal config file and the template got out of sync try dbtype = postgresql
with the 'l' at the end.
Yay, it's working! One confusing bit at first was that it doesn't output if it succeeds. And on subsequent runs, it just logs "sleep_sessions table has been dropped.". But it's working!
Thanks for the quick reply! Now I have more motivation for finally learn SQL after over a decade of avoiding it. O_O
Yeah @benjaffe I had a decision to make (assuming the script runs daily) - whether to just add the new day to the previous data... or b) throw out all data, and reimport it all - and chose option B. So yes when you run the script it does actually delete the rows in the table, then inserts it all again. Its debatably inefficient but at this data size doesn't matter
Oh definitely @sam-roberts , that's completely reasonable. My only point is that it logs an expected thing that sounds scary, but doesn't give any feedback on success. I'd expect a "import complete" or something, to get the warm fuzzy feelings (and to verify that it did something the first time it's run). But dropping the table is definitely the move at this point in the project 😄
I'm running into an issue getting this set up. I ran through the steps in the Readme, but am getting stuck when running the script.
I added
dbtype = postgres
to the config, and ran it again, and it got further (maybedbtype
should be added to the sample config in the repo?Here's the error I'm stuck on now.
When I run
pip install -r requirements.txt
, I get "Requirement already satisfied" a bunch of times, so I think I have all the deps installed. I also tried to manually add the dep,pip install psycopg2
, but I get the same error.I'm on MacOS, and although I've done a lot of JS/TS development in my day, I've never actually played much with Python. Any ideas about what might be wrong?