cobolbaby 5dc61658f8
fix: correct the way to catch the exception (#1727)
* fix: modify the etl script dependency

* fix: Correct the way to catch the exception

* fix: Compatible with the following kafka cluster when the Kafka Topic message Key cannot be empty

* fix: Adjust the kafka message key; Improve the comment of field

* fix: Avro schema required for key

Co-authored-by: Cobolbaby <Zhang.Xing-Long@inventec.com>
2020-07-10 07:56:19 -07:00
..
2020-06-25 16:32:22 -07:00

SQL-Based Metadata Ingestion

This directory contains example ETL scripts that use SQLAlchemy to ingest basic metadata from a wide range of commonly used SQL-based data systems, including MySQL, PostgreSQL, Oracle, MS SQL, Redshift, BigQuery, Snowflake, etc.

Requirements

You'll need to install both the common requirements (common.txt) and the system-specific driver for the script (e.g. mysql_etl.txt for mysql_etl.py). Some drivers also require additional dependencies to be installed so please check the driver's official project page for more details.

Example

Here's an example on how to ingest metadata from MySQL.

Install requirements

pip install --user -r common.txt -r mysql_etl.txt

Modify these variables in mysql_etl.py to match your environment

URL       # Connection URL in the form of mysql+pymysql://username:password@hostname:port
OPTIONS   # Additional conenction options for the driver

Run the ETL script

python mysql_etl.py