ImportCumulusFile: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
no edit summary
No edit summary
No edit summary
{{AddOnBanner|name=ImportCumulusFile|type=PHP|author=David A Jamieson|contact='DAJ' via the forum|updated=313 DecemberMarch 20122013|version=12.4a0}}
 
This is a PHP script designed to run on your webserver and import Cumulus log files into a MySQL database on your server.
*a Cumulus Log already uploaded
 
=IMPORTANT NOTE FOR VERSION 2.0=
Version 2.0 changes the SQL table structures from version 1.x. If you are currently using version 1.x and wish to upgrade, then you will have to DROP the existing tables and let the version 2 script recreate them. If this is unacceptable DO NOT UPGRADE, stay with version 1.x
 
The new table formats use a combined date/time field instead of separate, this makes constructing queries much simpler, it is worth making the change.
 
Of course if you do change, then any existing queries you are using will also have to be rewritten - take this into account. It may be possible to create VIEWs of the new tables that mimic the old table format, and for you to use those views with your existing queries, that is an exercise for you!
 
=Installation=
*Download the PHP script ... [http://wiki.sandaysoft.com/files/ImportCumulusFile_v1ImportCumulusFile_v2-4a0.txt (right click, Save as)]
*Save the file and edit it using a text editor -- there are five entries to be edited
:servername, username, password, database and security key
 
= Version Control =
*2.0 - 13 March 2013, Mark Crossley [[http://wiki.sandaysoft.com/files/ImportCumulusFile_v2-0.txt Download]]
 
**Change monthly and realtime tables to use combined date/time columns rather than separate
**Added optional retention time for realtime table. Records older than the specified age will be deleted. retainVal=NNN retainUnit=XXXX
**Added checking to allow running of the script from a command line as well as via http
**Added 'extra' columns to record wind directions as compass points where they are only provided as bearings:
Dayfile: Added the following columns:- HWindGBearSym, DomWindDirSym
Monthly: Added the following columns:- WindbearingSym, CurrWindBearingSym
*1.4a - 3 December 2012, Mark Crossley. Fixes syntax errors in 1.4, adds parameter presence checking. [[http://wiki.sandaysoft.com/files/ImportCumulusFile_v1-4a.txt Download]]
*1.4 - 3 December 2012, Mark Crossley. Added ability to create and log data to a 'realtime' table.

Navigation menu