GithubHelp home page GithubHelp logo

Comments (3)

salomoneb avatar salomoneb commented on August 23, 2024

Per discussion with Neal, assigning this to myself.

from housing-insights.

salomoneb avatar salomoneb commented on August 23, 2024

@prisalex and I worked on this today. We sketched out the blueprint for the full HISql object and wrote some preliminary code for the DataSql subclass. I committed our work to my forked repo in an add-datawriter branch. We had a few questions about how we'll be reading from and updating information in the database, but I'll put those through when they're more organized.

I'm going to try to work on the DataSql object some more tomorrow, but may not be able to pick it up again until Saturday.

from housing-insights.

NealHumphrey avatar NealHumphrey commented on August 23, 2024

@salomoneb and @prisalex - great! Reminder, I'm out of town for the week starting this afternoon (ski trip with my dad). I'll have my computer and will try to stay on top of Git and Slack messages, but will be slower to respond.

On reading and updating, not sure what your questions were, but here's what I had in mind:

  • python/housinginsights/tools/dbtools.py has functions to get SQLAlchemy engine and connections. Feel free to move these into object oriented structure, though might be more flexible to leave them where they are and have the HISql object call them.
  • Make sure to include a 'db_choice' parameter for HISql with default of 'housinginsights_local' or somesuch; the dbtools.py has ways to choose between local and remote.
  • Obviously, we want to use meta.json for the appropriate field names and variable types to create the table if it doesn't exist yet.
  • ManifestSql writes one row at a time. Create the table if it doesn't exist yet.
  • DataSql uses COPY FROM to append the whole file to the bottom of the table.

As always, adapt as needed.

from housing-insights.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.