Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
4

SQLite capabilities

asked 2014-11-22 17:22:35 -0500

Chienman gravatar image

updated 2017-06-07 18:14:51 -0500

Hi-

I've noticed that the EnergyPlus documentation kind of tiptoes around what will and will not be exported to SqLite. The documentation just sort of says something like "there are limited capabilities for specifying SQlite generation."

Does anyone know of a resource that comprehensively explains what are/aren't the available variables and reports in SqlLite, or is there a general rule of thumb? I find myself just doing trial and error to figure out what is possible when Sqlite is enabled as a reporting mechanism

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2014-11-22 18:32:17 -0500

updated 2014-11-22 18:38:57 -0500

One possibility is to use sqlite-manager to view the sqlite file. This is usually the way I view the data and debug my queries, although there are many other resources for viewing and querying SQL files.

In Firefox, go to Tools... SQLite Manager SQLite Manager

Then go to 'Browse & Search' to see all data in each table and/or view. Browse & Search

It is also possible to test SQL queries in SQLite Manager against the database. SQL query

This is a better Trial and Error approach to what data and reports are available in SQLite.

The SQLiteProcedures.hh and SQLiteProcedures.cc in EnergyPlus show explicitly what is output from EnergyPlus to the SQLite file.

edit flag offensive delete link more
3

answered 2014-11-24 22:06:27 -0500

From the Input Output Reference section for Output:Sqlite, "The description for SQLite outputs is described fully in the Output Details document." The Output Details and Examples document has over 20 pages detailing the contents of eqplusout.sql.

edit flag offensive delete link more

Comments

1

Link to the Output Details and Examples documentation (edited to fix dead link).

Jamie Bull gravatar imageJamie Bull ( 2014-11-25 08:54:37 -0500 )edit
2

answered 2014-11-22 18:00:17 -0500

scottb gravatar image

Here is the official SQLite Documentation: InputOutputReference.pdf

If you are looking for specific information that might not be documented, the easiest way is to open a database file up and start searching.

Check out the .schema and .table commands

I use grep to find information I need that isn't documented (Mac/Linux/Cygwin only):

sqlite3 -list DBNAME "SELECT * from TabularDataWithStrings" | grep -i "water"

Very powerful. Be sure to use the 'grep --color=auto' alias to make your searches pop.

I've noticed some bugs in the SQL output of E+ v8.2. Be warned. E+ v8.1 is more reliable in my opinion.

ScottB

edit flag offensive delete link more

Comments

1

Update: The SQL bugs I am alluding to were reportedly fixed in v8.2 update 1

Github link

scottb gravatar imagescottb ( 2014-12-14 20:18:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2014-11-22 17:22:35 -0500

Seen: 312 times

Last updated: Nov 24 '14