Skip to main content

Apache Beam I/O connector designed for accessing MySQL databases.

Project description

Beam - MySQL Connector

PyPI version PyPI - Python Version License: MIT

Beam - MySQL Connector is an io connector of Apache Beam to access MySQL databases.

Installation

pip install beam-mysql-connector2

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

beam_mysql_connector2-1.9.0.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file beam_mysql_connector2-1.9.0.tar.gz.

File metadata

  • Download URL: beam_mysql_connector2-1.9.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for beam_mysql_connector2-1.9.0.tar.gz
Algorithm Hash digest
SHA256 2e27461f07ac448c72eee87f00a25cfc0fbaa9aeca3450bf1a15a726f1f1e634
MD5 23296004b4ab52b547f97a49ed880241
BLAKE2b-256 9009e513d69d5efb92758daa7c4753da72fe9a6304210643a8f9782997ac6feb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page