Skip to main content

Apache beam mysql and postgres io connector in pure python

Project description


This package is still under development but has been used in few projects in production. This has been tested with dataflow Runner and Direct runner

This package aim to provide Apache_beam io connector for MySQL and Postgres database.

This package provides apache beam io connector for postgres db and mysql db. This package wil aim to be pure python implementation for both io connector

FYI: This does not uses any jdbc or odbc connector


1. Python>=2.7 or python>= 3.5
2. Apache beam >= 2.10
3. pymysql[rsa]
4. psycopg2-binary


1. pip install

Current functionality:

1. Read from MySQL database by passing either table name or sql query
2. Read from Postgres database by passing either table name or sql query

Reference Guide:

  1. Java IO connector for the same:

  2. How to write io connector for Apache Beam:

Usage Guide:

from pysql_beam.sql_io.sql import ReadFromSQL

ReadFromSQL(, port=self.options.port,
        username=self.options.username, password=self.options.password,


For mysql:
`python --host localhost --port 3306 --database SECRET_DATABASE --username SECRET_USER --password SECRET_PASSWORD --table YOUR_TABLE --output YOUR_OUTPUT_FLLE`

For postgres:
`python --host localhost --port 5432 --database SECRET_DATABASE --username SECRET_USER --password SECRET_PASSWORD --table YOUR_TABLE --output YOUR_OUTPUT_FLLE`

contribution: You can contribute to this package by raising bugs or sending pull requests

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pysql-beam, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pysql_beam-0.2-py3-none-any.whl (17.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pysql-beam-0.2.tar.gz (13.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page