airflow-sqlcmd-operator
Custom Airflow BashOperator for the Microsoft sqlcmd.
This package utilizes the sqlcmd to run Microsoft SQLServer scripts on Linux like you would use them on SSMS for example.
The sqlcmd supports SQLServer scripts with commands like GO, USE [db_name], etc, and multiple statements.
Requirements
You must have sqlcmd already installed and (currently) on following location: "/opt/mssql-tools/bin/sqlcmd".
Installing on Ubuntu with apt:
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list
# install required packages for pyodbc
apt-get update
ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev mssql-tools && apt-get clean
Usage
On a dag, you can call it like this:
from airflow_sqlcmd_operator import SqlcmdOperator
sqlcmd = SqlcmdOperator("MyDB", "/scripts/folder/mydag", "do_stuff.sql", dag=dag)
Metadata
Release files for airflow-sqlcmd-operator 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airflow_sqlcmd_operator-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for airflow_sqlcmd_operator-0.5.1-py3-none-any.whl |
Release files / airflow_sqlcmd_operator-0.5.1-py3-none-any.whl
| Download URL | airflow_sqlcmd_operator-0.5.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ac011631535cbf3e39d3a0f132687e9e30fd7eef36aae5d332541816c442f5b
|
|
BLAKE2b-256 checksum How to use checksums |
b3a5a4e31051bde7d22973a1ab740d23a81fa2d8b4f51440a01a7c35432f86c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.8.10
|
Security for airflow-sqlcmd-operator 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.