pip install apache-airflow-backport-providers-microsoft-mssql
Backport provider package apache-airflow-backport-providers-microsoft-mssql for Apache Airflow
Source code for airflow.operators.mssqloperator # -.- coding: utf-8 -.- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Class MsSqlOperator (BaseOperator): ' Executes sql code in a specific Microsoft SQL database This operator may use one of two hooks, depending on the ``conntype`` of the connection. If conntype is ``'odbc'``, then:py:class:`airflow.providers.odbc.hooks.odbc.OdbcHook` is used. Otherwise,:py:class:`airflow.providers.microsoft.mssql.hooks.mssql.MsSqlHook` is used.:param sql: the sql. The mssqlconnid parameter refers to a connection entry in your airflow database, not the actual connection URI. You have a few options for adding a connection: UI: under Admin - Connections. Airflow.operators.s3filetransformoperator ¶. This module is deprecated. Please use airflow.providers.amazon.aws.operators.s3filetransform. Airflow queues are like any other queues and use a messaging system – like RabbitMQ, ActiveMQ. Airflow scheduler sends tasks as messages to the queues and hence acts as a publisher. Airflow workers are configured to listen for events (i.e tasks) coming on particular queues and execute those tasks.
Project description
Release: 2020.11.23
Table of contents
- Provider class summary
- Operators
- Hooks
- Releases
Backport package
This is a backport providers package for microsoft.mssql
provider. All classes for this provider packageare in airflow.providers.microsoft.mssql
python package.
Only Python 3.6+ is supported for this backport package.
While Airflow 1.10.* continues to support Python 2.7+ - you need to upgrade python to 3.6+ if youwant to use this backport package.
Installation
You can install this package on top of an existing airflow 1.10.* installation viapip install apache-airflow-backport-providers-microsoft-mssql
PIP requirements
PIP package | Version required |
---|---|
pymssql | ~=2.1,>=2.1.5 |
Cross provider package dependencies
Those are dependencies that might be needed in order to use all the features of the package.You need to install the specified backport providers package in order to use them.
You can install such cross-provider dependencies when installing from PyPI. For example:
Dependent package | Extra |
---|---|
apache-airflow-backport-providers-odbc | odbc |
In Airflow 2.0, all operators, transfers, hooks, sensors, secrets for the microsoft.mssql
providerare in the airflow.providers.microsoft.mssql
package. You can read more about the naming conventions usedin Naming conventions for provider packages
Operators
Moved operators
Airflow 2.0 operators: airflow.providers.microsoft.mssql package | Airflow 1.10.* previous location (usually airflow.contrib ) |
---|---|
operators.mssql.MsSqlOperator | operators.mssql_operator.MsSqlOperator |
Hooks
Moved hooks
Airflow 2.0 hooks: airflow.providers.microsoft.mssql package | Airflow 1.10.* previous location (usually airflow.contrib ) |
---|---|
hooks.mssql.MsSqlHook | hooks.mssql_hook.MsSqlHook |
Releases
Release 2020.11.23
Commit | Committed | Subject |
---|---|---|
19b7e4565 | 2020-11-18 | Enable Markdownlint rule MD003/heading-style/header-style (#12427) |
ae7cb4a1e | 2020-11-17 | Update wrong commit hash in backport provider changes (#12390) |
6889a333c | 2020-11-15 | Improvements for operators and hooks ref docs (#12366) |
7825e8f59 | 2020-11-13 | Docs installation improvements (#12304) |
85a18e13d | 2020-11-09 | Point at pypi project pages for cross-dependency of provider packages (#12212) |
59eb5de78 | 2020-11-09 | Update provider READMEs for up-coming 1.0.0beta1 releases (#12206) |
b2a28d159 | 2020-11-09 | Moves provider packages scripts to dev (#12082) |
4e8f9cc8d | 2020-11-03 | Enable Black - Python Auto Formmatter (#9550) |
5a439e84e | 2020-10-26 | Prepare providers release 0.0.2a1 (#11855) |
Release 2020.10.29
Commit | Committed | Subject |
---|---|---|
b680bbc0b | 2020-10-24 | Generated backport providers readmes/setup for 2020.10.29 |
349b0811c | 2020-10-20 | Add D200 pydocstyle check (#11688) |
765d29ecc | 2020-10-15 | Pymssql is maintained again (#11537) |
16e712971 | 2020-10-13 | Added support for provider packages for Airflow 2.0 (#11487) |
1845cd11b | 2020-10-11 | Strict type check for google ads and cloud hooks (#11390) |
d2754ef76 | 2020-10-09 | Strict type check for Microsoft (#11359) |
0a0e1af80 | 2020-10-03 | Fix Broken Markdown links in Providers README TOC (#11249) |
Release 2020.10.5
Commit | Committed | Subject |
---|---|---|
ca4238eb4 | 2020-10-02 | Fixed month in backport packages to October (#11242) |
5220e4c38 | 2020-10-02 | Prepare Backport release 2020.09.07 (#11238) |
fdd9b6f65 | 2020-08-25 | Enable Black on Providers Packages (#10543) |
3696c34c2 | 2020-08-24 | Fix typo in the word 'release' (#10528) |
ee7ca128a | 2020-08-22 | Fix broken Markdown refernces in Providers README (#10483) |
cdec30125 | 2020-08-07 | Add correct signature to all operators and sensors (#10205) |
aeea71274 | 2020-08-02 | Remove args parameter from provider operator constructors (#10097) |
d0e7db402 | 2020-06-19 | Fixed release number for fresh release (#9408) |
Release 2020.6.24
Commit | Committed | Subject |
---|---|---|
12af6a080 | 2020-06-19 | Final cleanup for 2020.6.23rc1 release preparation (#9404) |
c7e5bce57 | 2020-06-19 | Prepare backport release candidate for 2020.6.23rc1 (#9370) |
f6bd817a3 | 2020-06-16 | Introduce 'transfers' packages (#9320) |
0b0e4f7a4 | 2020-05-26 | Preparing for RC3 release of backports (#9026) |
00642a46d | 2020-05-26 | Fixed name of 20 remaining wrongly named operators. (#8994) |
1d36b0303 | 2020-05-23 | Fix references in docs (#8984) |
375d1ca22 | 2020-05-19 | Release candidate 2 for backport packages 2020.05.20 (#8898) |
12c5e5d8a | 2020-05-17 | Prepare release candidate for backport packages (#8891) |
f3521fb0e | 2020-05-16 | Regenerate readme files for backport package release (#8886) |
92585ca4c | 2020-05-15 | Added automated release notes generation for backport operators (#8807) |
4bde99f13 | 2020-03-23 | Make airflow/providers pylint compatible (#7802) |
4d03e33c1 | 2020-02-22 | [AIRFLOW-6817] remove imports from airflow/__init__.py , replaced implicit imports with explicit imports, added entry to UPDATING.MD - squashed/rebased (#7456) |
97a429f9d | 2020-02-02 | [AIRFLOW-6714] Remove magic comments about UTF-8 (#7338) |
059eda05f | 2020-01-21 | [AIRFLOW-6610] Move software classes to providers package (#7231) |
Release historyRelease notifications | RSS feed
2020.11.23
2020.11.23rc1 pre-release
2020.10.29 yanked
Installation
You can install this package on top of an existing airflow 1.10.* installation viapip install apache-airflow-backport-providers-microsoft-mssql
PIP requirements
PIP package | Version required |
---|---|
pymssql | ~=2.1,>=2.1.5 |
Cross provider package dependencies
Those are dependencies that might be needed in order to use all the features of the package.You need to install the specified backport providers package in order to use them.
You can install such cross-provider dependencies when installing from PyPI. For example:
Dependent package | Extra |
---|---|
apache-airflow-backport-providers-odbc | odbc |
In Airflow 2.0, all operators, transfers, hooks, sensors, secrets for the microsoft.mssql
providerare in the airflow.providers.microsoft.mssql
package. You can read more about the naming conventions usedin Naming conventions for provider packages
Operators
Moved operators
Airflow 2.0 operators: airflow.providers.microsoft.mssql package | Airflow 1.10.* previous location (usually airflow.contrib ) |
---|---|
operators.mssql.MsSqlOperator | operators.mssql_operator.MsSqlOperator |
Hooks
Moved hooks
Airflow 2.0 hooks: airflow.providers.microsoft.mssql package | Airflow 1.10.* previous location (usually airflow.contrib ) |
---|---|
hooks.mssql.MsSqlHook | hooks.mssql_hook.MsSqlHook |
Releases
Release 2020.11.23
Commit | Committed | Subject |
---|---|---|
19b7e4565 | 2020-11-18 | Enable Markdownlint rule MD003/heading-style/header-style (#12427) |
ae7cb4a1e | 2020-11-17 | Update wrong commit hash in backport provider changes (#12390) |
6889a333c | 2020-11-15 | Improvements for operators and hooks ref docs (#12366) |
7825e8f59 | 2020-11-13 | Docs installation improvements (#12304) |
85a18e13d | 2020-11-09 | Point at pypi project pages for cross-dependency of provider packages (#12212) |
59eb5de78 | 2020-11-09 | Update provider READMEs for up-coming 1.0.0beta1 releases (#12206) |
b2a28d159 | 2020-11-09 | Moves provider packages scripts to dev (#12082) |
4e8f9cc8d | 2020-11-03 | Enable Black - Python Auto Formmatter (#9550) |
5a439e84e | 2020-10-26 | Prepare providers release 0.0.2a1 (#11855) |
Release 2020.10.29
Commit | Committed | Subject |
---|---|---|
b680bbc0b | 2020-10-24 | Generated backport providers readmes/setup for 2020.10.29 |
349b0811c | 2020-10-20 | Add D200 pydocstyle check (#11688) |
765d29ecc | 2020-10-15 | Pymssql is maintained again (#11537) |
16e712971 | 2020-10-13 | Added support for provider packages for Airflow 2.0 (#11487) |
1845cd11b | 2020-10-11 | Strict type check for google ads and cloud hooks (#11390) |
d2754ef76 | 2020-10-09 | Strict type check for Microsoft (#11359) |
0a0e1af80 | 2020-10-03 | Fix Broken Markdown links in Providers README TOC (#11249) |
Release 2020.10.5
Commit | Committed | Subject |
---|---|---|
ca4238eb4 | 2020-10-02 | Fixed month in backport packages to October (#11242) |
5220e4c38 | 2020-10-02 | Prepare Backport release 2020.09.07 (#11238) |
fdd9b6f65 | 2020-08-25 | Enable Black on Providers Packages (#10543) |
3696c34c2 | 2020-08-24 | Fix typo in the word 'release' (#10528) |
ee7ca128a | 2020-08-22 | Fix broken Markdown refernces in Providers README (#10483) |
cdec30125 | 2020-08-07 | Add correct signature to all operators and sensors (#10205) |
aeea71274 | 2020-08-02 | Remove args parameter from provider operator constructors (#10097) |
d0e7db402 | 2020-06-19 | Fixed release number for fresh release (#9408) |
Release 2020.6.24
Commit | Committed | Subject |
---|---|---|
12af6a080 | 2020-06-19 | Final cleanup for 2020.6.23rc1 release preparation (#9404) |
c7e5bce57 | 2020-06-19 | Prepare backport release candidate for 2020.6.23rc1 (#9370) |
f6bd817a3 | 2020-06-16 | Introduce 'transfers' packages (#9320) |
0b0e4f7a4 | 2020-05-26 | Preparing for RC3 release of backports (#9026) |
00642a46d | 2020-05-26 | Fixed name of 20 remaining wrongly named operators. (#8994) |
1d36b0303 | 2020-05-23 | Fix references in docs (#8984) |
375d1ca22 | 2020-05-19 | Release candidate 2 for backport packages 2020.05.20 (#8898) |
12c5e5d8a | 2020-05-17 | Prepare release candidate for backport packages (#8891) |
f3521fb0e | 2020-05-16 | Regenerate readme files for backport package release (#8886) |
92585ca4c | 2020-05-15 | Added automated release notes generation for backport operators (#8807) |
4bde99f13 | 2020-03-23 | Make airflow/providers pylint compatible (#7802) |
4d03e33c1 | 2020-02-22 | [AIRFLOW-6817] remove imports from airflow/__init__.py , replaced implicit imports with explicit imports, added entry to UPDATING.MD - squashed/rebased (#7456) |
97a429f9d | 2020-02-02 | [AIRFLOW-6714] Remove magic comments about UTF-8 (#7338) |
059eda05f | 2020-01-21 | [AIRFLOW-6610] Move software classes to providers package (#7231) |
Release historyRelease notifications | RSS feed
2020.11.23
2020.11.23rc1 pre-release
2020.10.29 yanked
2020.10.29rc1 pre-release
2020.10.5
2020.10.5rc1 pre-release
2020.6.24
2020.6.24rc1 pre-release
2020.5.20rc3 pre-release
2020.5.20rc2 pre-release
2020.5.20rc1 pre-release
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size apache_airflow_backport_providers_microsoft_mssql-2020.11.23-py3-none-any.whl (15.4 kB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size apache-airflow-backport-providers-microsoft-mssql-2020.11.23.tar.gz (16.9 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for apache_airflow_backport_providers_microsoft_mssql-2020.11.23-py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | e142a288c413f330f393570a52633e63c56294345cfde4ba6ffdcaf41833e6e9 |
MD5 | 03d4f36412d076ee97e3db9a8b04f7ba |
BLAKE2-256 | 4ace79492f7de4c90ab7c543805e203d55342042e0584a1f64d734ed36b5f61d |
Hashes for apache-airflow-backport-providers-microsoft-mssql-2020.11.23.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | fe29c02b5220b592d895e40a87c645a533a42289298f726901cef0a08d04fa85 |
MD5 | 182628221e4f04c6852e332c2ad90c67 |
BLAKE2-256 | bbbd4d131c8ad6ef6ef3a9d7d66623d0a7d4d60cc7380da0c62c3103a9d143aa |
Bases: airflow.models.BaseOperator
Executes sql code in a specific Microsoft SQL database
This operator may use one of two hooks, depending on the conn_type
of the connection.
If conn_type is 'odbc'
, then OdbcHook
is used. Otherwise, MsSqlHook
is used.
Airflow Mssql Connection
sql (str or string pointing to a template file with .sqlextension. (templated)) -- the sql code to be executed
mssql_conn_id (str) -- reference to a specific mssql database
parameters (dict or iterable) -- (optional) the parameters to render the SQL query with.
autocommit (bool) -- if True, each command is automatically committed.(default value: False)
database (str) -- name of database which overwrite defined one in connection
Airflow Mssql Operator
template_fields
= ['sql'][source]¶
template_ext
= ['.sql'][source]¶
ui_color
= #ededed[source]¶
get_hook
(self)[source]¶Will retrieve hook as determined by get_hook()
if one is defined, andMsSqlHook
otherwise.
For example, if the connection conn_type
is 'odbc'
, OdbcHook
will be used.
execute
(self, context:dict)[source]¶