Skip to main content

MySQL I/O Connector of Apache Beam

Project description

Beam - MySQL Connector

PyPI version PyPI - Python Version Codacy Badge License: MIT

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 from splitters
)
  • 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-connector-1.8.3.tar.gz (8.6 kB view details)

Uploaded Source

File details

Details for the file beam-mysql-connector-1.8.3.tar.gz.

File metadata

  • Download URL: beam-mysql-connector-1.8.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for beam-mysql-connector-1.8.3.tar.gz
Algorithm Hash digest
SHA256 a0984178126131056224e5a47fd07def5d0a42358052b63424a3412d3175dcfc
MD5 f40a0bba9fec92fda234a1b3084a3621
BLAKE2b-256 8c3a4189c64b5a186f0742f3368163e3506a2279154becc42b39cb35a136a1d4

See more details on using hashes here.

Supported by

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