A custom SQL Server Connector for ETL processes with Pandas
Project description
SQL Data Connector Project
Project này cung cấp module Python mạnh mẽ (dbConnector) để tương tác với Microsoft SQL Server, tối ưu hóa cho các tác vụ Data Engineering như: ETL, Insert dữ liệu lớn, và Đồng bộ hóa (Upsert) dữ liệu từ Pandas DataFrame.
Tính năng nổi bật
- Tự động hóa cao: Tự động tạo bảng, phát hiện kiểu dữ liệu, và thêm cột mới nếu DataFrame thay đổi.
- Hiệu năng cao: Sử dụng
fast_executemany=Truecủa SQLAlchemy/pyodbc để tăng tốc độ Insert. - An toàn dữ liệu: Hỗ trợ Transaction (Commit/Rollback) để đảm bảo tính toàn vẹn dữ liệu.
- Sync thông minh: Hàm
check_and_update_tablegiúp so sánh và chỉ update những dòng thay đổi, insert những dòng mới. - Tiện ích: Hỗ trợ làm sạch dữ liệu số (ví dụ: convert "1.5M" thành 1,500,000).
Yêu cầu cài đặt
- Hệ điều hành: Windows, Linux, hoặc MacOS.
- Driver: Cần cài đặt ODBC Driver 17 for SQL Server.
- Python Libraries:
pip install -r requirements.txt
Cấu trúc Project
src/dbConnector.py: Module chính chứa classdbJob.config/db_config.yaml: File cấu hình database (cần tự tạo dựa trên mẫu).notebooks/demo_usage.ipynb: Ví dụ cách sử dụng.
Hướng dẫn sử dụng nhanh
1. Cấu hình kết nối
Tạo file config/db_config.yaml:
db_info:
server: "localhost"
database: "MyDatabase"
username: "sa"
password: "mypassword"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlserverconnector-0.1.0.tar.gz.
File metadata
- Download URL: sqlserverconnector-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba50cda36e549fca79f6cc49ccedfb6cad722b8dff6d59fed04d64d665fc5d2
|
|
| MD5 |
5714b3eed44353e5b09d70f7b42aed57
|
|
| BLAKE2b-256 |
cb4037c6202dc19d09c2b029d1fb796078e1a24be2315d870ae240e8d8e0b80d
|
File details
Details for the file sqlserverconnector-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sqlserverconnector-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6adec4dfb9fd2e60560f01e922bb5a8be80722f26d4337b0a46c3cf2a3e90a47
|
|
| MD5 |
12aad3c724a1798c1936891cffa4a4bd
|
|
| BLAKE2b-256 |
b48172f1e23ca1c34538530136e7172278864e853934c0ac0f1e3df11910300b
|