Airflow Mssql

broken image


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.

Run

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 packageVersion 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 packageExtra
apache-airflow-backport-providers-odbcodbc
Airflow

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 packageAirflow 1.10.* previous location (usually airflow.contrib)
operators.mssql.MsSqlOperatoroperators.mssql_operator.MsSqlOperator

Hooks

Moved hooks

Airflow 2.0 hooks: airflow.providers.microsoft.mssql packageAirflow 1.10.* previous location (usually airflow.contrib)
hooks.mssql.MsSqlHookhooks.mssql_hook.MsSqlHook

Releases

Release 2020.11.23

CommitCommittedSubject
19b7e45652020-11-18Enable Markdownlint rule MD003/heading-style/header-style (#12427)
ae7cb4a1e2020-11-17Update wrong commit hash in backport provider changes (#12390)
6889a333c2020-11-15Improvements for operators and hooks ref docs (#12366)
7825e8f592020-11-13Docs installation improvements (#12304)
85a18e13d2020-11-09Point at pypi project pages for cross-dependency of provider packages (#12212)
59eb5de782020-11-09Update provider READMEs for up-coming 1.0.0beta1 releases (#12206)
b2a28d1592020-11-09Moves provider packages scripts to dev (#12082)
4e8f9cc8d2020-11-03Enable Black - Python Auto Formmatter (#9550)
5a439e84e2020-10-26Prepare providers release 0.0.2a1 (#11855)

Release 2020.10.29

CommitCommittedSubject
b680bbc0b2020-10-24Generated backport providers readmes/setup for 2020.10.29
349b0811c2020-10-20Add D200 pydocstyle check (#11688)
765d29ecc2020-10-15Pymssql is maintained again (#11537)
16e7129712020-10-13Added support for provider packages for Airflow 2.0 (#11487)
1845cd11b2020-10-11Strict type check for google ads and cloud hooks (#11390)
d2754ef762020-10-09Strict type check for Microsoft (#11359)
0a0e1af802020-10-03Fix Broken Markdown links in Providers README TOC (#11249)

Release 2020.10.5

CommitCommittedSubject
ca4238eb42020-10-02Fixed month in backport packages to October (#11242)
5220e4c382020-10-02Prepare Backport release 2020.09.07 (#11238)
fdd9b6f652020-08-25Enable Black on Providers Packages (#10543)
3696c34c22020-08-24Fix typo in the word 'release' (#10528)
ee7ca128a2020-08-22Fix broken Markdown refernces in Providers README (#10483)
cdec301252020-08-07Add correct signature to all operators and sensors (#10205)
aeea712742020-08-02Remove args parameter from provider operator constructors (#10097)
d0e7db4022020-06-19Fixed release number for fresh release (#9408)

Release 2020.6.24

CommitCommittedSubject
12af6a0802020-06-19Final cleanup for 2020.6.23rc1 release preparation (#9404)
c7e5bce572020-06-19Prepare backport release candidate for 2020.6.23rc1 (#9370)
f6bd817a32020-06-16Introduce 'transfers' packages (#9320)
0b0e4f7a42020-05-26Preparing for RC3 release of backports (#9026)
00642a46d2020-05-26Fixed name of 20 remaining wrongly named operators. (#8994)
1d36b03032020-05-23Fix references in docs (#8984)
375d1ca222020-05-19Release candidate 2 for backport packages 2020.05.20 (#8898)
12c5e5d8a2020-05-17Prepare release candidate for backport packages (#8891)
f3521fb0e2020-05-16Regenerate readme files for backport package release (#8886)
92585ca4c2020-05-15Added automated release notes generation for backport operators (#8807)
4bde99f132020-03-23Make airflow/providers pylint compatible (#7802)
4d03e33c12020-02-22[AIRFLOW-6817] remove imports from airflow/__init__.py, replaced implicit imports with explicit imports, added entry to UPDATING.MD - squashed/rebased (#7456)
97a429f9d2020-02-02[AIRFLOW-6714] Remove magic comments about UTF-8 (#7338)
059eda05f2020-01-21[AIRFLOW-6610] Move software classes to providers package (#7231)

Release historyRelease notifications | RSS feed

2020.11.23

Airflow mssql hook

2020.11.23rc1 pre-release

2020.10.29 yanked

Airflow mssql example
Mssql

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 packageVersion 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 packageExtra
apache-airflow-backport-providers-odbcodbc

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 packageAirflow 1.10.* previous location (usually airflow.contrib)
operators.mssql.MsSqlOperatoroperators.mssql_operator.MsSqlOperator

Hooks

Moved hooks

Airflow 2.0 hooks: airflow.providers.microsoft.mssql packageAirflow 1.10.* previous location (usually airflow.contrib)
hooks.mssql.MsSqlHookhooks.mssql_hook.MsSqlHook

Releases

Release 2020.11.23

CommitCommittedSubject
19b7e45652020-11-18Enable Markdownlint rule MD003/heading-style/header-style (#12427)
ae7cb4a1e2020-11-17Update wrong commit hash in backport provider changes (#12390)
6889a333c2020-11-15Improvements for operators and hooks ref docs (#12366)
7825e8f592020-11-13Docs installation improvements (#12304)
85a18e13d2020-11-09Point at pypi project pages for cross-dependency of provider packages (#12212)
59eb5de782020-11-09Update provider READMEs for up-coming 1.0.0beta1 releases (#12206)
b2a28d1592020-11-09Moves provider packages scripts to dev (#12082)
4e8f9cc8d2020-11-03Enable Black - Python Auto Formmatter (#9550)
5a439e84e2020-10-26Prepare providers release 0.0.2a1 (#11855)

Release 2020.10.29

CommitCommittedSubject
b680bbc0b2020-10-24Generated backport providers readmes/setup for 2020.10.29
349b0811c2020-10-20Add D200 pydocstyle check (#11688)
765d29ecc2020-10-15Pymssql is maintained again (#11537)
16e7129712020-10-13Added support for provider packages for Airflow 2.0 (#11487)
1845cd11b2020-10-11Strict type check for google ads and cloud hooks (#11390)
d2754ef762020-10-09Strict type check for Microsoft (#11359)
0a0e1af802020-10-03Fix Broken Markdown links in Providers README TOC (#11249)

Release 2020.10.5

CommitCommittedSubject
ca4238eb42020-10-02Fixed month in backport packages to October (#11242)
5220e4c382020-10-02Prepare Backport release 2020.09.07 (#11238)
fdd9b6f652020-08-25Enable Black on Providers Packages (#10543)
3696c34c22020-08-24Fix typo in the word 'release' (#10528)
ee7ca128a2020-08-22Fix broken Markdown refernces in Providers README (#10483)
cdec301252020-08-07Add correct signature to all operators and sensors (#10205)
aeea712742020-08-02Remove args parameter from provider operator constructors (#10097)
d0e7db4022020-06-19Fixed release number for fresh release (#9408)

Release 2020.6.24

CommitCommittedSubject
12af6a0802020-06-19Final cleanup for 2020.6.23rc1 release preparation (#9404)
c7e5bce572020-06-19Prepare backport release candidate for 2020.6.23rc1 (#9370)
f6bd817a32020-06-16Introduce 'transfers' packages (#9320)
0b0e4f7a42020-05-26Preparing for RC3 release of backports (#9026)
00642a46d2020-05-26Fixed name of 20 remaining wrongly named operators. (#8994)
1d36b03032020-05-23Fix references in docs (#8984)
375d1ca222020-05-19Release candidate 2 for backport packages 2020.05.20 (#8898)
12c5e5d8a2020-05-17Prepare release candidate for backport packages (#8891)
f3521fb0e2020-05-16Regenerate readme files for backport package release (#8886)
92585ca4c2020-05-15Added automated release notes generation for backport operators (#8807)
4bde99f132020-03-23Make airflow/providers pylint compatible (#7802)
4d03e33c12020-02-22[AIRFLOW-6817] remove imports from airflow/__init__.py, replaced implicit imports with explicit imports, added entry to UPDATING.MD - squashed/rebased (#7456)
97a429f9d2020-02-02[AIRFLOW-6714] Remove magic comments about UTF-8 (#7338)
059eda05f2020-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.

Files for apache-airflow-backport-providers-microsoft-mssql, version 2020.11.23
Filename, sizeFile typePython versionUpload dateHashes
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 dateHashes
Filename, size apache-airflow-backport-providers-microsoft-mssql-2020.11.23.tar.gz (16.9 kB) File type Source Python version None Upload dateHashes
Close

Hashes for apache_airflow_backport_providers_microsoft_mssql-2020.11.23-py3-none-any.whl

Hashes for apache_airflow_backport_providers_microsoft_mssql-2020.11.23-py3-none-any.whl
AlgorithmHash digest
SHA256e142a288c413f330f393570a52633e63c56294345cfde4ba6ffdcaf41833e6e9
MD503d4f36412d076ee97e3db9a8b04f7ba
BLAKE2-2564ace79492f7de4c90ab7c543805e203d55342042e0584a1f64d734ed36b5f61d
Close

Hashes for apache-airflow-backport-providers-microsoft-mssql-2020.11.23.tar.gz

Hashes for apache-airflow-backport-providers-microsoft-mssql-2020.11.23.tar.gz
AlgorithmHash digest
SHA256fe29c02b5220b592d895e40a87c645a533a42289298f726901cef0a08d04fa85
MD5182628221e4f04c6852e332c2ad90c67
BLAKE2-256bbbd4d131c8ad6ef6ef3a9d7d66623d0a7d4d60cc7380da0c62c3103a9d143aa

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 OdbcHookis used. Otherwise, MsSqlHook is used.

Parameters

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]




broken image