Apache Beam I/O connector designed for accessing MySQL databases.
Project description
Beam - MySQL Connector
Beam - MySQL Connector is an io connector of Apache Beam to access MySQL databases.
Installation
pip install beam-mysql-connector
Getting Started
- Read From MySQL
from beam_mysql.connector import splitters
from beam_mysql.connector.io import ReadFromMySQL
read_from_mysql = ReadFromMySQL(
query="SELECT * FROM test_db.tests;",
host="localhost",
database="test_db",
user="test",
password="test",
port=3306,
splitter=splitters.NoSplitter() # you can select how to split query for performance
)
- Write To MySQL
from beam_mysql.connector.io import WriteToMySQL
write_to_mysql = WriteToMySQL(
host="localhost",
database="test_db",
table="tests",
user="test",
password="test",
port=3306,
batch_size=1000,
)
License
MIT License. Please refer to the LICENSE.txt, for further details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file beam_mysql_connector-1.8.6.tar.gz
.
File metadata
- Download URL: beam_mysql_connector-1.8.6.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21f0ad08e561883822e6f68e5b85b16786392fa4289451465484f72c1f03d9d5 |
|
MD5 | bb94a33ba4b700a8ce5c0b262d5efa5c |
|
BLAKE2b-256 | c27883c065d6ec06218bdc03084a36f0a294e9ee3fdccf5fb0dcca50c1878e77 |