Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
sql
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

SQL to Databox

Answer to the question: How to move data from SQL server to Databox with help from Databox Python SDK?

License

MySQL → Databox streaming Example

Create new empty databox_example database with stocks table.

mysql -u root -vv < sql/mysql_recreate_database.sql

Start mysql_streamer.py script that will "observe" stocks table for new records and stream them into Databox.

./mysql_streamer.py databox_example -u root -t <databox push_token>

Open new command-prompt and insert few historical stock quotes with stocks_downloader.py.

./stocks_downloader.py YHOO -g m -x sql | mysql -u root -vv databox_example;

Simple output from mysql_streamer.py

...
Nothing to do. Sleeping,...
Streaming from 454
Inserted new records from 454,...
Nothing to do. Sleeping,...
Streaming from 460
Inserted new records from 460,...
Nothing to do. Sleeping,...
Nothing to do. Sleeping,...
Nothing to do. Sleeping,...
...

Development

mkvirtualenv databox-python-sql
pip install --upgrade -v -r requirements.txt

Author

About

SQL to Databox with Databox Python SDK

Resources

License

Releases

No releases published

Packages

No packages published

Languages