apache-airflow-providers-postgres 5.11.2rc1__tar.gz → 5.11.3rc1__tar.gz
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.
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/PKG-INFO +8 -8
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/README.rst +4 -4
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/__init__.py +1 -1
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/get_provider_info.py +3 -2
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/hooks/postgres.py +16 -9
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/pyproject.toml +4 -4
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/LICENSE +0 -0
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/datasets/__init__.py +0 -0
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/datasets/postgres.py +0 -0
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/hooks/__init__.py +0 -0
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/operators/__init__.py +0 -0
- {apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/airflow/providers/postgres/operators/postgres.py +0 -0
{apache_airflow_providers_postgres-5.11.2rc1 → apache_airflow_providers_postgres-5.11.3rc1}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: apache-airflow-providers-postgres
|
3
|
-
Version: 5.11.
|
3
|
+
Version: 5.11.3rc1
|
4
4
|
Summary: Provider package apache-airflow-providers-postgres for Apache Airflow
|
5
5
|
Keywords: airflow-provider,postgres,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
@@ -21,15 +21,15 @@ Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
23
|
Classifier: Topic :: System :: Monitoring
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.14.1rc0
|
25
25
|
Requires-Dist: apache-airflow>=2.7.0rc0
|
26
26
|
Requires-Dist: psycopg2-binary>=2.9.4
|
27
27
|
Requires-Dist: apache-airflow-providers-amazon>=2.6.0rc0 ; extra == "amazon"
|
28
28
|
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
|
29
29
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
30
30
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
31
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
32
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
31
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3/changelog.html
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
35
35
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
@@ -82,7 +82,7 @@ Provides-Extra: openlineage
|
|
82
82
|
|
83
83
|
Package ``apache-airflow-providers-postgres``
|
84
84
|
|
85
|
-
Release: ``5.11.
|
85
|
+
Release: ``5.11.3.rc1``
|
86
86
|
|
87
87
|
|
88
88
|
`PostgreSQL <https://www.postgresql.org/>`__
|
@@ -95,7 +95,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
|
|
95
95
|
are in ``airflow.providers.postgres`` python package.
|
96
96
|
|
97
97
|
You can find package information and changelog for the provider
|
98
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
98
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3/>`_.
|
99
99
|
|
100
100
|
Installation
|
101
101
|
------------
|
@@ -113,7 +113,7 @@ Requirements
|
|
113
113
|
PIP package Version required
|
114
114
|
======================================= ==================
|
115
115
|
``apache-airflow`` ``>=2.7.0``
|
116
|
-
``apache-airflow-providers-common-sql`` ``>=1.
|
116
|
+
``apache-airflow-providers-common-sql`` ``>=1.14.1``
|
117
117
|
``psycopg2-binary`` ``>=2.9.4``
|
118
118
|
======================================= ==================
|
119
119
|
|
@@ -139,4 +139,4 @@ Dependent package
|
|
139
139
|
============================================================================================================== ===============
|
140
140
|
|
141
141
|
The changelog for the provider package can be found in the
|
142
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
142
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3/changelog.html>`_.
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
Package ``apache-airflow-providers-postgres``
|
44
44
|
|
45
|
-
Release: ``5.11.
|
45
|
+
Release: ``5.11.3.rc1``
|
46
46
|
|
47
47
|
|
48
48
|
`PostgreSQL <https://www.postgresql.org/>`__
|
@@ -55,7 +55,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
|
|
55
55
|
are in ``airflow.providers.postgres`` python package.
|
56
56
|
|
57
57
|
You can find package information and changelog for the provider
|
58
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
58
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3/>`_.
|
59
59
|
|
60
60
|
Installation
|
61
61
|
------------
|
@@ -73,7 +73,7 @@ Requirements
|
|
73
73
|
PIP package Version required
|
74
74
|
======================================= ==================
|
75
75
|
``apache-airflow`` ``>=2.7.0``
|
76
|
-
``apache-airflow-providers-common-sql`` ``>=1.
|
76
|
+
``apache-airflow-providers-common-sql`` ``>=1.14.1``
|
77
77
|
``psycopg2-binary`` ``>=2.9.4``
|
78
78
|
======================================= ==================
|
79
79
|
|
@@ -99,4 +99,4 @@ Dependent package
|
|
99
99
|
============================================================================================================== ===============
|
100
100
|
|
101
101
|
The changelog for the provider package can be found in the
|
102
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
102
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3/changelog.html>`_.
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "5.11.
|
32
|
+
__version__ = "5.11.3"
|
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,9 @@ def get_provider_info():
|
|
28
28
|
"name": "PostgreSQL",
|
29
29
|
"description": "`PostgreSQL <https://www.postgresql.org/>`__\n",
|
30
30
|
"state": "ready",
|
31
|
-
"source-date-epoch":
|
31
|
+
"source-date-epoch": 1722664743,
|
32
32
|
"versions": [
|
33
|
+
"5.11.3",
|
33
34
|
"5.11.2",
|
34
35
|
"5.11.1",
|
35
36
|
"5.11.0",
|
@@ -68,7 +69,7 @@ def get_provider_info():
|
|
68
69
|
],
|
69
70
|
"dependencies": [
|
70
71
|
"apache-airflow>=2.7.0",
|
71
|
-
"apache-airflow-providers-common-sql>=1.
|
72
|
+
"apache-airflow-providers-common-sql>=1.14.1",
|
72
73
|
"psycopg2-binary>=2.9.4",
|
73
74
|
],
|
74
75
|
"additional-extras": [{"name": "amazon", "dependencies": ["apache-airflow-providers-amazon>=2.6.0"]}],
|
@@ -43,7 +43,8 @@ CursorType = Union[DictCursor, RealDictCursor, NamedTupleCursor]
|
|
43
43
|
|
44
44
|
|
45
45
|
class PostgresHook(DbApiHook):
|
46
|
-
"""
|
46
|
+
"""
|
47
|
+
Interact with Postgres.
|
47
48
|
|
48
49
|
You can specify ssl parameters in the extra field of your connection
|
49
50
|
as ``{"sslmode": "require", "sslcert": "/path/to/cert.pem", etc}``.
|
@@ -116,7 +117,7 @@ class PostgresHook(DbApiHook):
|
|
116
117
|
|
117
118
|
@property
|
118
119
|
def sqlalchemy_url(self) -> URL:
|
119
|
-
conn = self.get_connection(
|
120
|
+
conn = self.get_connection(self.get_conn_id())
|
120
121
|
return URL.create(
|
121
122
|
drivername="postgresql",
|
122
123
|
username=conn.login,
|
@@ -141,7 +142,7 @@ class PostgresHook(DbApiHook):
|
|
141
142
|
|
142
143
|
def get_conn(self) -> connection:
|
143
144
|
"""Establish a connection to a postgres database."""
|
144
|
-
conn_id =
|
145
|
+
conn_id = self.get_conn_id()
|
145
146
|
conn = deepcopy(self.connection or self.get_connection(conn_id))
|
146
147
|
|
147
148
|
# check for authentication via AWS IAM
|
@@ -176,7 +177,8 @@ class PostgresHook(DbApiHook):
|
|
176
177
|
return self.conn
|
177
178
|
|
178
179
|
def copy_expert(self, sql: str, filename: str) -> None:
|
179
|
-
"""
|
180
|
+
"""
|
181
|
+
Execute SQL using psycopg2's ``copy_expert`` method.
|
180
182
|
|
181
183
|
Necessary to execute COPY command without access to a superuser.
|
182
184
|
|
@@ -197,7 +199,8 @@ class PostgresHook(DbApiHook):
|
|
197
199
|
conn.commit()
|
198
200
|
|
199
201
|
def get_uri(self) -> str:
|
200
|
-
"""
|
202
|
+
"""
|
203
|
+
Extract the URI from the connection.
|
201
204
|
|
202
205
|
:return: the extracted URI in Sqlalchemy URI format.
|
203
206
|
"""
|
@@ -213,7 +216,8 @@ class PostgresHook(DbApiHook):
|
|
213
216
|
|
214
217
|
@staticmethod
|
215
218
|
def _serialize_cell(cell: object, conn: connection | None = None) -> Any:
|
216
|
-
"""
|
219
|
+
"""
|
220
|
+
Serialize a cell.
|
217
221
|
|
218
222
|
PostgreSQL adapts all arguments to the ``execute()`` method internally,
|
219
223
|
hence we return the cell without any conversion.
|
@@ -228,7 +232,8 @@ class PostgresHook(DbApiHook):
|
|
228
232
|
return cell
|
229
233
|
|
230
234
|
def get_iam_token(self, conn: Connection) -> tuple[str, str, int]:
|
231
|
-
"""
|
235
|
+
"""
|
236
|
+
Get the IAM token.
|
232
237
|
|
233
238
|
This uses AWSHook to retrieve a temporary password to connect to
|
234
239
|
Postgres or Redshift. Port is required. If none is provided, the default
|
@@ -269,7 +274,8 @@ class PostgresHook(DbApiHook):
|
|
269
274
|
return login, token, port
|
270
275
|
|
271
276
|
def get_table_primary_key(self, table: str, schema: str | None = "public") -> list[str] | None:
|
272
|
-
"""
|
277
|
+
"""
|
278
|
+
Get the table's primary key.
|
273
279
|
|
274
280
|
:param table: Name of the target table
|
275
281
|
:param schema: Name of the target schema, public by default
|
@@ -292,7 +298,8 @@ class PostgresHook(DbApiHook):
|
|
292
298
|
def _generate_insert_sql(
|
293
299
|
self, table: str, values: tuple[str, ...], target_fields: Iterable[str], replace: bool, **kwargs
|
294
300
|
) -> str:
|
295
|
-
"""
|
301
|
+
"""
|
302
|
+
Generate the INSERT SQL statement.
|
296
303
|
|
297
304
|
The REPLACE variant is specific to the PostgreSQL syntax.
|
298
305
|
|
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
|
|
28
28
|
|
29
29
|
[project]
|
30
30
|
name = "apache-airflow-providers-postgres"
|
31
|
-
version = "5.11.
|
31
|
+
version = "5.11.3.rc1"
|
32
32
|
description = "Provider package apache-airflow-providers-postgres for Apache Airflow"
|
33
33
|
readme = "README.rst"
|
34
34
|
authors = [
|
@@ -56,14 +56,14 @@ classifiers = [
|
|
56
56
|
]
|
57
57
|
requires-python = "~=3.8"
|
58
58
|
dependencies = [
|
59
|
-
"apache-airflow-providers-common-sql>=1.
|
59
|
+
"apache-airflow-providers-common-sql>=1.14.1rc0",
|
60
60
|
"apache-airflow>=2.7.0rc0",
|
61
61
|
"psycopg2-binary>=2.9.4",
|
62
62
|
]
|
63
63
|
|
64
64
|
[project.urls]
|
65
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
66
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.
|
65
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3"
|
66
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.3/changelog.html"
|
67
67
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
68
68
|
"Source Code" = "https://github.com/apache/airflow"
|
69
69
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|