title: Parsing MySQL Historian Format
body: <p>We are using VOLTTRON MySQL Historian to save meter readings to the MySQL database. The meter readings are saved in “value string” in a format similar to JSON:</p>
  
  <p><code>[{'W_primary': 19003.677734375, 'freq': 60.01973342895508, 'pf': -0.9935459494590759}, {'W_primary': {'units': 'W ', 'tz': 'PT', 'type': 'float'}, 'freq': {'units': 'Hz', 'tz': 'PT', 'type': 'float'}, 'pf': {'units': u'', 'tz': 'PT', 'type': 'float'}}]</code></p>
  
  <p>Our goal is to be able to export this data both for use in VOLTTRON and external to the VOLTTRON environment. Are there python scripts/libraries for parsing this data direct from the MySQL database, outside of VOLTTRON? For instance, one application may be to use a Labview tool to customize the data topics/timeframe to export to csv (e.g. All frequency data from a given day). Because the format is not true JSON, we can't use the JSON Function Reference (<a href="https://dev.mysql.com/doc/refman/5.7/en/json-function-reference.html" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/5.7/en/json-function-reference.html</a>).</p>
  
  <p>Alternatively, is there a way for the Historian to write to the database in a more straightforward column format?</p>
  
  <p>Note: we are using VOLTTRON 2.0. Has this functionality changed in more recent versions?</p>