NREL / buildstockbatch

Other
22 stars 14 forks source link

Issue with columns values in athena table being rearranged #463

Open mpraprost opened 3 months ago

mpraprost commented 3 months ago

Describe the bug I am trying to create some custom plots for a ComStock analysis using comstockpostproc. I want to make plots using the column cambium_grid_region, which to my knowledge has never been done before so we havent hit this error before. In the code we query the data and I want to filter using the cambium_grid_region column, but in doing this I noticed that the last ~10 or so columns in the table being pulled from athena are all out of order and mixed up. Image below. It seems like something may have gotten messed up in parsing that has caused all columns to the right of american_housing_survey_region to be messed up - some have quotation marks, some are completely in the wrong column, etc. I do not know what the root cause of the issue is, but it appears to be buildstockbatch related.

To Reproduce Steps to reproduce the behavior:

  1. Project yaml file that exercises the bug.
  2. changed lines 2708 and 2734 to cambium_grid_region: https://github.com/NREL/ComStock/blob/gto_postproc_custom_plots/postprocessing/comstockpostproc/plotting_mixin.py
  3. contact marley if you have more questions

Try to find a minimum reproducible example by isolating features starting with a small, basic run and adding features one by one until you hit the bug. For example, instead of handing over a configuration with 80 upgrades, custom measures, and complex downselect logic, start with a configuration that works and add those things one at a time in small batches until you hit the problem.

Expected behavior A clear and concise description of what you expected to happen.

Logs

Please copy pertinent sections of log files here (e.g. sampling.out, job.out-*, postprocessing.out, singularity-output.log, etc.)

log file here

Platform (please complete the following information):

Additional context Add any other context about the problem here. Capture