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

Revision history [back]

click to hide/show revision 1
initial version

Open of the SQLite database you created and type:

.tables

Note the following tables:

  • ReportMeterData
  • ReportMeterDataDictionary
  • ReportVariableData
  • ReportVariableDataDictionary

These hold your Meter and Variable csv data. You need the index from the Dictionary tables to query the data.

For example, I'll query the MeterDictionary to see what's in there:

select * from ReportMeterDataDictionary;
8|Sum|Facility:Electricity|Zone||Electricity:Facility|Hourly||J ...

I intentionally trimmed the results. 8 is the dictionary index for the Electricity:Facility meter

To select the data for Variable/Meter in need use:

select VariableValue from ReportMeterData WHERE ReportMeterDataDictionaryIndex=8;

Which returns the Facility Electricity meter. Update your index to what you are looking for. Make sure the variable is added to your output in your IDF. Variable queries are done exactly the same just using the ReportVariableData tables.

Note this is raw SQL commands as you requested. The specifics will change if you are doing this in a programming language.