It is based on the MeltanoLabs/target-sqlite implementation, with sqlalchemy backend.
This is a Singer target that reads JSON-formatted data following the Singer spec and loads them to MYSQL.
- Create and activate a virtualenv
pip install -e '.[dev]'
config.json
{
"database": "test_target_mysql",
"host": "127.0.0.1",
"user": "test_target_mysql",
"password": "CHANGE_ME"
"batch_size": "How many records are loaded to MySQL at a time? Default=50",
"timestamp_column": "Name of the column used for recording the timestamp when Data are loaded to MySQL. Default=__loaded_at"
}create database test_target_mysql default charset utf8mb4 ;
grant all on test_target_mysql.* to `test_target_mysql`@`127.0.0.1` identified by "CHANGE_ME" ;If you want to quickly test that your setup is properly configured, you can:
pytest -vv tests/ --config config.json
This includes a set of simple tests to check that the connection to MySQL is properly set and that all the required MySQL operations work as expected.
During the tests we create a test tables, populate them with simple data, assert that both the schema and the data loaded are as expected and in the end we destroy them.
see: https://github.com/MeltanoLabs/target-sqlite#user-content-implementation-notes