https://github.com/esakik/beam-mysql-connector
An Apache Beam I/O connector for seamless integration with MySQL database 🔗 https://beam.apache.org/documentation/io/connectors/#other-io-connectors-for-apache-beam
https://github.com/esakik/beam-mysql-connector
apache-beam mysql pypi python
Last synced: 5 months ago
JSON representation
An Apache Beam I/O connector for seamless integration with MySQL database 🔗 https://beam.apache.org/documentation/io/connectors/#other-io-connectors-for-apache-beam
- Host: GitHub
- URL: https://github.com/esakik/beam-mysql-connector
- Owner: esakik
- License: mit
- Created: 2019-12-25T02:44:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T10:08:52.000Z (almost 2 years ago)
- Last Synced: 2026-01-03T03:55:26.284Z (6 months ago)
- Topics: apache-beam, mysql, pypi, python
- Language: Python
- Homepage: https://pypi.org/project/beam-mysql-connector
- Size: 188 KB
- Stars: 21
- Watchers: 1
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Beam - MySQL Connector
[](https://badge.fury.io/py/beam-mysql-connector)

[](https://opensource.org/licenses/MIT)
Beam - MySQL Connector is an io connector of [Apache Beam](https://beam.apache.org/) to access MySQL databases.
## Installation
```bash
pip install beam-mysql-connector
```
## Getting Started
- Read From MySQL
```Python
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
```Python
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](https://github.com/esaki01/beam-mysql-connector/blob/master/LICENSE.txt), for further details.