apache-airflow-providers-teradata 2.2.0rc1__py3-none-any.whl → 2.3.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apache-airflow-providers-teradata might be problematic. Click here for more details.
- airflow/providers/teradata/LICENSE +4 -4
- airflow/providers/teradata/__init__.py +1 -1
- airflow/providers/teradata/get_provider_info.py +2 -2
- airflow/providers/teradata/operators/teradata.py +1 -1
- airflow/providers/teradata/transfers/azure_blob_to_teradata.py +32 -14
- airflow/providers/teradata/transfers/s3_to_teradata.py +20 -8
- {apache_airflow_providers_teradata-2.2.0rc1.dist-info → apache_airflow_providers_teradata-2.3.0rc1.dist-info}/METADATA +6 -6
- apache_airflow_providers_teradata-2.3.0rc1.dist-info/RECORD +15 -0
- apache_airflow_providers_teradata-2.2.0rc1.dist-info/RECORD +0 -15
- {apache_airflow_providers_teradata-2.2.0rc1.dist-info → apache_airflow_providers_teradata-2.3.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_teradata-2.2.0rc1.dist-info → apache_airflow_providers_teradata-2.3.0rc1.dist-info}/entry_points.txt +0 -0
|
@@ -215,7 +215,7 @@ Third party Apache 2.0 licenses
|
|
|
215
215
|
|
|
216
216
|
The following components are provided under the Apache 2.0 License.
|
|
217
217
|
See project link for details. The text of each license is also included
|
|
218
|
-
at licenses/LICENSE-[project].txt.
|
|
218
|
+
at 3rd-party-licenses/LICENSE-[project].txt.
|
|
219
219
|
|
|
220
220
|
(ALv2 License) hue v4.3.0 (https://github.com/cloudera/hue/)
|
|
221
221
|
(ALv2 License) jqclock v2.3.0 (https://github.com/JohnRDOrazio/jQuery-Clock-Plugin)
|
|
@@ -227,7 +227,7 @@ MIT licenses
|
|
|
227
227
|
========================================================================
|
|
228
228
|
|
|
229
229
|
The following components are provided under the MIT License. See project link for details.
|
|
230
|
-
The text of each license is also included at licenses/LICENSE-[project].txt.
|
|
230
|
+
The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
|
|
231
231
|
|
|
232
232
|
(MIT License) jquery v3.5.1 (https://jquery.org/license/)
|
|
233
233
|
(MIT License) dagre-d3 v0.6.4 (https://github.com/cpettitt/dagre-d3)
|
|
@@ -243,11 +243,11 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
|
|
|
243
243
|
BSD 3-Clause licenses
|
|
244
244
|
========================================================================
|
|
245
245
|
The following components are provided under the BSD 3-Clause license. See project links for details.
|
|
246
|
-
The text of each license is also included at licenses/LICENSE-[project].txt.
|
|
246
|
+
The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
|
|
247
247
|
|
|
248
248
|
(BSD 3 License) d3 v5.16.0 (https://d3js.org)
|
|
249
249
|
(BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
|
|
250
250
|
(BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
|
|
251
251
|
|
|
252
252
|
========================================================================
|
|
253
|
-
See licenses/LICENSES-ui.txt for packages used in `/airflow/www`
|
|
253
|
+
See 3rd-party-licenses/LICENSES-ui.txt for packages used in `/airflow/www`
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "2.
|
|
32
|
+
__version__ = "2.3.0"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.7.0"
|
|
@@ -28,8 +28,8 @@ def get_provider_info():
|
|
|
28
28
|
"name": "Teradata",
|
|
29
29
|
"description": "`Teradata <https://www.teradata.com/>`__\n",
|
|
30
30
|
"state": "ready",
|
|
31
|
-
"source-date-epoch":
|
|
32
|
-
"versions": ["2.2.0", "2.1.1", "2.1.0", "2.0.0"],
|
|
31
|
+
"source-date-epoch": 1719054575,
|
|
32
|
+
"versions": ["2.3.0", "2.2.0", "2.1.1", "2.1.0", "2.0.0"],
|
|
33
33
|
"dependencies": [
|
|
34
34
|
"apache-airflow>=2.7.0",
|
|
35
35
|
"apache-airflow-providers-common-sql>=1.3.1",
|
|
@@ -31,7 +31,7 @@ class TeradataOperator(SQLExecuteQueryOperator):
|
|
|
31
31
|
"""
|
|
32
32
|
General Teradata Operator to execute queries on Teradata Database.
|
|
33
33
|
|
|
34
|
-
Executes sql statements in the Teradata SQL Database using
|
|
34
|
+
Executes sql statements in the Teradata SQL Database using Teradata Python SQL Driver
|
|
35
35
|
|
|
36
36
|
.. seealso::
|
|
37
37
|
For more information on how to use this operator, take a look at the guide:
|
|
@@ -48,10 +48,17 @@ class AzureBlobStorageToTeradataOperator(BaseOperator):
|
|
|
48
48
|
The URI format is `/az/YOUR-STORAGE-ACCOUNT.blob.core.windows.net/YOUR-CONTAINER/YOUR-BLOB-LOCATION`.
|
|
49
49
|
Refer to
|
|
50
50
|
https://docs.teradata.com/search/documents?query=native+object+store&sort=last_update&virtual-field=title_only&content-lang=en-US
|
|
51
|
+
:param public_bucket: Specifies whether the provided blob container is public. If the blob container is public,
|
|
52
|
+
it means that anyone can access the objects within it via a URL without requiring authentication.
|
|
53
|
+
If the bucket is private and authentication is not provided, the operator will throw an exception.
|
|
51
54
|
:param azure_conn_id: The Airflow WASB connection used for azure blob credentials.
|
|
52
55
|
:param teradata_table: The name of the teradata table to which the data is transferred.(templated)
|
|
53
56
|
:param teradata_conn_id: The connection ID used to connect to Teradata
|
|
54
57
|
:ref:`Teradata connection <howto/connection:Teradata>`
|
|
58
|
+
:param teradata_authorization_name: The name of Teradata Authorization Database Object,
|
|
59
|
+
is used to control who can access an Azure Blob object store.
|
|
60
|
+
Refer to
|
|
61
|
+
https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-Native-Object-Store-Getting-Started-Guide-17.20/Setting-Up-Access/Controlling-Foreign-Table-Access-with-an-AUTHORIZATION-Object
|
|
55
62
|
|
|
56
63
|
Note that ``blob_source_key`` and ``teradata_table`` are
|
|
57
64
|
templated, so you can use variables in them if you wish.
|
|
@@ -64,37 +71,48 @@ class AzureBlobStorageToTeradataOperator(BaseOperator):
|
|
|
64
71
|
self,
|
|
65
72
|
*,
|
|
66
73
|
blob_source_key: str,
|
|
74
|
+
public_bucket: bool = False,
|
|
67
75
|
azure_conn_id: str = "azure_default",
|
|
68
76
|
teradata_table: str,
|
|
69
77
|
teradata_conn_id: str = "teradata_default",
|
|
78
|
+
teradata_authorization_name: str = "",
|
|
70
79
|
**kwargs,
|
|
71
80
|
) -> None:
|
|
72
81
|
super().__init__(**kwargs)
|
|
73
82
|
self.blob_source_key = blob_source_key
|
|
83
|
+
self.public_bucket = public_bucket
|
|
74
84
|
self.azure_conn_id = azure_conn_id
|
|
75
85
|
self.teradata_table = teradata_table
|
|
76
86
|
self.teradata_conn_id = teradata_conn_id
|
|
87
|
+
self.teradata_authorization_name = teradata_authorization_name
|
|
77
88
|
|
|
78
89
|
def execute(self, context: Context) -> None:
|
|
79
90
|
self.log.info(
|
|
80
91
|
"transferring data from %s to teradata table %s...", self.blob_source_key, self.teradata_table
|
|
81
92
|
)
|
|
82
|
-
azure_hook = WasbHook(wasb_conn_id=self.azure_conn_id)
|
|
83
|
-
conn = azure_hook.get_connection(self.azure_conn_id)
|
|
84
|
-
# Obtaining the Azure client ID and Azure secret in order to access a specified Blob container
|
|
85
|
-
access_id = conn.login if conn.login is not None else ""
|
|
86
|
-
access_secret = conn.password if conn.password is not None else ""
|
|
87
93
|
teradata_hook = TeradataHook(teradata_conn_id=self.teradata_conn_id)
|
|
94
|
+
credentials_part = "ACCESS_ID= '' ACCESS_KEY= ''"
|
|
95
|
+
if not self.public_bucket:
|
|
96
|
+
# Accessing data directly from the Azure Blob Storage and creating permanent table inside the
|
|
97
|
+
# database
|
|
98
|
+
if self.teradata_authorization_name:
|
|
99
|
+
credentials_part = f"AUTHORIZATION={self.teradata_authorization_name}"
|
|
100
|
+
else:
|
|
101
|
+
# Obtaining the Azure client ID and Azure secret in order to access a specified Blob container
|
|
102
|
+
azure_hook = WasbHook(wasb_conn_id=self.azure_conn_id)
|
|
103
|
+
conn = azure_hook.get_connection(self.azure_conn_id)
|
|
104
|
+
access_id = conn.login
|
|
105
|
+
access_secret = conn.password
|
|
106
|
+
credentials_part = f"ACCESS_ID= '{access_id}' ACCESS_KEY= '{access_secret}'"
|
|
88
107
|
sql = dedent(f"""
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
""").rstrip()
|
|
108
|
+
CREATE MULTISET TABLE {self.teradata_table} AS
|
|
109
|
+
(
|
|
110
|
+
SELECT * FROM (
|
|
111
|
+
LOCATION = '{self.blob_source_key}'
|
|
112
|
+
{credentials_part}
|
|
113
|
+
) AS d
|
|
114
|
+
) WITH DATA
|
|
115
|
+
""").rstrip()
|
|
98
116
|
try:
|
|
99
117
|
teradata_hook.run(sql, True)
|
|
100
118
|
except Exception as ex:
|
|
@@ -53,6 +53,10 @@ class S3ToTeradataOperator(BaseOperator):
|
|
|
53
53
|
:param aws_conn_id: The Airflow AWS connection used for AWS credentials.
|
|
54
54
|
:param teradata_conn_id: The connection ID used to connect to Teradata
|
|
55
55
|
:ref:`Teradata connection <howto/connection:Teradata>`.
|
|
56
|
+
:param teradata_authorization_name: The name of Teradata Authorization Database Object,
|
|
57
|
+
is used to control who can access an S3 object store.
|
|
58
|
+
Refer to
|
|
59
|
+
https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-Native-Object-Store-Getting-Started-Guide-17.20/Setting-Up-Access/Controlling-Foreign-Table-Access-with-an-AUTHORIZATION-Object
|
|
56
60
|
|
|
57
61
|
Note that ``s3_source_key`` and ``teradata_table`` are
|
|
58
62
|
templated, so you can use variables in them if you wish.
|
|
@@ -69,6 +73,7 @@ class S3ToTeradataOperator(BaseOperator):
|
|
|
69
73
|
teradata_table: str,
|
|
70
74
|
aws_conn_id: str = "aws_default",
|
|
71
75
|
teradata_conn_id: str = "teradata_default",
|
|
76
|
+
teradata_authorization_name: str = "",
|
|
72
77
|
**kwargs,
|
|
73
78
|
) -> None:
|
|
74
79
|
super().__init__(**kwargs)
|
|
@@ -77,6 +82,7 @@ class S3ToTeradataOperator(BaseOperator):
|
|
|
77
82
|
self.teradata_table = teradata_table
|
|
78
83
|
self.aws_conn_id = aws_conn_id
|
|
79
84
|
self.teradata_conn_id = teradata_conn_id
|
|
85
|
+
self.teradata_authorization_name = teradata_authorization_name
|
|
80
86
|
|
|
81
87
|
def execute(self, context: Context) -> None:
|
|
82
88
|
self.log.info(
|
|
@@ -84,20 +90,26 @@ class S3ToTeradataOperator(BaseOperator):
|
|
|
84
90
|
)
|
|
85
91
|
|
|
86
92
|
s3_hook = S3Hook(aws_conn_id=self.aws_conn_id)
|
|
87
|
-
access_key = ""
|
|
88
|
-
access_secret = ""
|
|
89
|
-
if not self.public_bucket:
|
|
90
|
-
credentials = s3_hook.get_credentials()
|
|
91
|
-
access_key = credentials.access_key
|
|
92
|
-
access_secret = credentials.secret_key
|
|
93
93
|
teradata_hook = TeradataHook(teradata_conn_id=self.teradata_conn_id)
|
|
94
|
+
credentials_part = "ACCESS_ID= '' ACCESS_KEY= ''"
|
|
95
|
+
if not self.public_bucket:
|
|
96
|
+
# Accessing data directly from the S3 bucket and creating permanent table inside the database
|
|
97
|
+
if self.teradata_authorization_name:
|
|
98
|
+
credentials_part = f"AUTHORIZATION={self.teradata_authorization_name}"
|
|
99
|
+
else:
|
|
100
|
+
credentials = s3_hook.get_credentials()
|
|
101
|
+
access_key = credentials.access_key
|
|
102
|
+
access_secret = credentials.secret_key
|
|
103
|
+
credentials_part = f"ACCESS_ID= '{access_key}' ACCESS_KEY= '{access_secret}'"
|
|
104
|
+
token = credentials.token
|
|
105
|
+
if token:
|
|
106
|
+
credentials_part = credentials_part + f" SESSION_TOKEN = '{token}'"
|
|
94
107
|
sql = dedent(f"""
|
|
95
108
|
CREATE MULTISET TABLE {self.teradata_table} AS
|
|
96
109
|
(
|
|
97
110
|
SELECT * FROM (
|
|
98
111
|
LOCATION = '{self.s3_source_key}'
|
|
99
|
-
|
|
100
|
-
ACCESS_KEY= '{access_secret}'
|
|
112
|
+
{credentials_part}
|
|
101
113
|
) AS d
|
|
102
114
|
) WITH DATA
|
|
103
115
|
""").rstrip()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-teradata
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-teradata for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,teradata,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -29,8 +29,8 @@ Requires-Dist: apache-airflow-providers-amazon ; extra == "amazon"
|
|
|
29
29
|
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
|
|
30
30
|
Requires-Dist: apache-airflow-providers-microsoft-azure ; extra == "microsoft.azure"
|
|
31
31
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
32
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.
|
|
33
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.
|
|
32
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.3.0/changelog.html
|
|
33
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.3.0
|
|
34
34
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
35
35
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
36
36
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
@@ -83,7 +83,7 @@ Provides-Extra: microsoft.azure
|
|
|
83
83
|
|
|
84
84
|
Package ``apache-airflow-providers-teradata``
|
|
85
85
|
|
|
86
|
-
Release: ``2.
|
|
86
|
+
Release: ``2.3.0.rc1``
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
`Teradata <https://www.teradata.com/>`__
|
|
@@ -96,7 +96,7 @@ This is a provider package for ``teradata`` provider. All classes for this provi
|
|
|
96
96
|
are in ``airflow.providers.teradata`` python package.
|
|
97
97
|
|
|
98
98
|
You can find package information and changelog for the provider
|
|
99
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.
|
|
99
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.3.0/>`_.
|
|
100
100
|
|
|
101
101
|
Installation
|
|
102
102
|
------------
|
|
@@ -141,4 +141,4 @@ Dependent package
|
|
|
141
141
|
====================================================================================================================== ===================
|
|
142
142
|
|
|
143
143
|
The changelog for the provider package can be found in the
|
|
144
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.
|
|
144
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-teradata/2.3.0/changelog.html>`_.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
airflow/providers/teradata/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
|
2
|
+
airflow/providers/teradata/__init__.py,sha256=4Cfe7ZUHPkFU23rL0pUd9Q1-5Vf3SjeGWvEdLbl7Nkw,1495
|
|
3
|
+
airflow/providers/teradata/get_provider_info.py,sha256=Nfzu7KUVee_rVIsY8cswYxeZcCShpg9Np7oYccCMolM,3863
|
|
4
|
+
airflow/providers/teradata/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
5
|
+
airflow/providers/teradata/hooks/teradata.py,sha256=9p4Tn2raEgEIGQMfCN2DPtC6n6SJb2KBkKPMTTRfjrw,9511
|
|
6
|
+
airflow/providers/teradata/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
7
|
+
airflow/providers/teradata/operators/teradata.py,sha256=rpjTlRC4vTJLflf9X0arNs-zQyxlmvvr83D4uCvJCw4,3631
|
|
8
|
+
airflow/providers/teradata/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
9
|
+
airflow/providers/teradata/transfers/azure_blob_to_teradata.py,sha256=nsQclRtIiLgDaxeTY8uDNfQxBh5VHuV8ZH1mEXWeUu0,5625
|
|
10
|
+
airflow/providers/teradata/transfers/s3_to_teradata.py,sha256=w14RG_cRFX5BKIbru_cg5C7WXpR0NF1bNZhvcwn7-bQ,5485
|
|
11
|
+
airflow/providers/teradata/transfers/teradata_to_teradata.py,sha256=WketoakWYtYdMn7W3hR55otQJqQSKB_dKHTtYLc4mco,3834
|
|
12
|
+
apache_airflow_providers_teradata-2.3.0rc1.dist-info/entry_points.txt,sha256=JbigXoUoKVSNWG-_-029FCCuehMOmAvuSnNGZ9Bz1Kc,104
|
|
13
|
+
apache_airflow_providers_teradata-2.3.0rc1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
14
|
+
apache_airflow_providers_teradata-2.3.0rc1.dist-info/METADATA,sha256=Vpqgdv3ek4jN9OR_2cAI0Kbk_QxItSWHJKe4ELuKaok,6799
|
|
15
|
+
apache_airflow_providers_teradata-2.3.0rc1.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
airflow/providers/teradata/LICENSE,sha256=ywUBpKZc7Jb96rVt5I3IDbg7dIJAbUSHkuoDcF3jbH4,13569
|
|
2
|
-
airflow/providers/teradata/__init__.py,sha256=L9que1GKjKvTBWirt0nnaIHaOEq8A9mODqqjwDIpy0s,1495
|
|
3
|
-
airflow/providers/teradata/get_provider_info.py,sha256=TIQHi9NqwB5kd_mRuiD7x7FNrmZkIlgJ3Rzp17Jl5Fw,3854
|
|
4
|
-
airflow/providers/teradata/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
5
|
-
airflow/providers/teradata/hooks/teradata.py,sha256=9p4Tn2raEgEIGQMfCN2DPtC6n6SJb2KBkKPMTTRfjrw,9511
|
|
6
|
-
airflow/providers/teradata/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
7
|
-
airflow/providers/teradata/operators/teradata.py,sha256=Q5fHVZRHaMeeE1c5PVdoN8ah16q4bL9pTXkodTMyeKA,3628
|
|
8
|
-
airflow/providers/teradata/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
9
|
-
airflow/providers/teradata/transfers/azure_blob_to_teradata.py,sha256=VQQjdjo65s81Agnt3ubFLZkrgrrpNaoqxT3FZEkhXSM,4293
|
|
10
|
-
airflow/providers/teradata/transfers/s3_to_teradata.py,sha256=jLUPTh3ynTS5vuOBYH8pSH5TVJSoGUCw1U4cErRZZpI,4523
|
|
11
|
-
airflow/providers/teradata/transfers/teradata_to_teradata.py,sha256=WketoakWYtYdMn7W3hR55otQJqQSKB_dKHTtYLc4mco,3834
|
|
12
|
-
apache_airflow_providers_teradata-2.2.0rc1.dist-info/entry_points.txt,sha256=JbigXoUoKVSNWG-_-029FCCuehMOmAvuSnNGZ9Bz1Kc,104
|
|
13
|
-
apache_airflow_providers_teradata-2.2.0rc1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
14
|
-
apache_airflow_providers_teradata-2.2.0rc1.dist-info/METADATA,sha256=9jHhR5O4mpeNyuE_0Rhye1RcuYzQCwX9zIR4VK9dWDM,6799
|
|
15
|
-
apache_airflow_providers_teradata-2.2.0rc1.dist-info/RECORD,,
|
|
File without changes
|