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

Difficult to query End Uses By Subcategory tables in SQLite #7481

Closed
shorowit opened this issue Aug 29, 2019 · 1 comment · Fixed by #7584
Closed

Difficult to query End Uses By Subcategory tables in SQLite #7481

shorowit opened this issue Aug 29, 2019 · 1 comment · Fixed by #7584
Assignees

Comments

@shorowit
Copy link
Contributor

It's extremely difficult to query data from the End Uses By Subcategory tables using the SQLite file. This is because you can only query based on RowName (first value in row) and ColumnName; however RowName can be blank for many rows in these tables.

For example, imagine trying to obtain the fridge electricity use from the TabularDataWithStrings SQLite table for results like these:

  Subcategory Electricity [GJ] Natural Gas [GJ] Additional Fuel [GJ] District Cooling [GJ] District Heating [GJ] Water [m3]
Heating General 0.00 26.03 0.00 0.00 0.00 0.00
Cooling General 2.29 0.00 0.00 0.00 0.00 0.00
Interior Equipment misc plug loads 8.84 0.00 0.00 0.00 0.00 0.00
  fridge 2.34 0.00 0.00 0.00 0.00 0.00
Water Systems clothes washer 0.00 0.00 0.00 0.00 0.00 5.22
  General 4.88 8.95 0.00 0.00 0.00 0.00
  Other 1.33 0.00 0.00 0.00 0.00 0.00

It essentially can't be done. Thus, you have to resort to querying results from the TabularData table in the SQLite file, which is far harder to deal with.

One possible solution is to combine the first two columns in the table. So you end up with RowName values that are, e.g., "Heating: General", "Cooling: General", "Interior Equipment: misc plug loads", "Interior Equipment: fridge", etc.

Another possible solution is to add a "SubRowName" field to the TabularDataWithStrings table. For most tables the value would be NULL, but the End Uses By Subcategory tables could take advantage of it.

@jmarrec
Copy link
Contributor

jmarrec commented Oct 28, 2019

Same can be said for the Demand End Use Components Summary - End Uses By Subcategory

Adding the checklist since missing from OP:

Details

Some additional details for this issue (if relevant):

  • EnergyPlus 9.2.0

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added: 5ZoneAirCooled.idf + adding Output:SQLite, SimpleAndTabular;
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants