Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider sqlite option for energy_supply database #142

Open
tomalrussell opened this issue Jul 9, 2019 · 1 comment
Open

Consider sqlite option for energy_supply database #142

tomalrussell opened this issue Jul 9, 2019 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@tomalrussell
Copy link
Member

Documenting sqlite option for energy supply database/integration.

Reasons to consider switching:

  • should be just a connection string change for the ES model (see docs below)
  • simpler deployment/installation - no postgres server + ODBC install needed
  • route to running parallel models - creating more sqlite databases requires no special permissions

Work involved:

  • update wrapper to use sqlite - should be relatively contained, DB-API is very close to psycopg2
  • update nismod installation script
  • other workflow/visualisations already built against postgres?

from https://www.msi-jp.com/xpress/learning/square/07-moselodbc.pdf

2.4 The SQLite interface

SQLite databases can be accessed via the ODBC interface. SQLite is included in the mmodbc module on all platforms that are supported by Xpress. The ODBC driver mmsqlite to access SQLite equally forms part of the distribution, no ODBC setup and no additional installations are required when using this driver. The full connection string to employ in this case has the form 'DRIVER=mmsqlite;READONLY=false;DB=mydatabase.sqlite' (notice that instead of referring to a DSN definition we directly use the built-in ODBC driver). However, it is sufficient to simply state the database filename (and path) if it has one of the extensions sqlite, sqlite3, db, or db3—Mosel will automatically generate the complete connection string.

@tomalrussell tomalrussell added enhancement New feature or request wontfix This will not be worked on labels Jul 9, 2019
@tomalrussell
Copy link
Member Author

An alternative approach - possibly similar level of effort, possibly lighter/faster overall - would be to load and run the model using the mosel python interface: https://www.msi-jp.com/xpress/learning/square/01-python-interface.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant