Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

3 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages