Skip to content

carleton-smart-grid/SQLite-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1.	
Install SQLite3. Use command: "sudo apt-get install sqlite3"

2.
Run SQLite3 with setup command using: "sqlite3 mydatabase.db < setup.txt"
Note that setup.txt creates a tables for usages called "usages".
Running with setup also drops any table called usages, ensuring a clean start.
The usages table is setup as:

date | time | house_ id | usage 
-------------------------------
     |      |           |

5.
Run command: "python3 csv_to_xml.py".

4.	
In a new terminal, run command: "python3 xml_to_db.py mydatabase.db house.xml 60".
(Note that the last argument is the frequency that the program checks the XML file for changes in seconds)
	

About

Populate a SQLite database using values stored in an XML file generated periodically from a CSV file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages