apache-airflow-providers-postgres 6.1.2__py3-none-any.whl → 6.1.3rc1__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.
- airflow/providers/postgres/__init__.py +1 -1
- airflow/providers/postgres/get_provider_info.py +0 -59
- airflow/providers/postgres/hooks/postgres.py +10 -7
- {apache_airflow_providers_postgres-6.1.2.dist-info → apache_airflow_providers_postgres-6.1.3rc1.dist-info}/METADATA +8 -8
- apache_airflow_providers_postgres-6.1.3rc1.dist-info/RECORD +13 -0
- {apache_airflow_providers_postgres-6.1.2.dist-info → apache_airflow_providers_postgres-6.1.3rc1.dist-info}/WHEEL +1 -1
- apache_airflow_providers_postgres-6.1.2.dist-info/RECORD +0 -13
- {apache_airflow_providers_postgres-6.1.2.dist-info → apache_airflow_providers_postgres-6.1.3rc1.dist-info}/entry_points.txt +0 -0
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "6.1.
|
32
|
+
__version__ = "6.1.3"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.9.0"
|
@@ -26,54 +26,6 @@ def get_provider_info():
|
|
26
26
|
"package-name": "apache-airflow-providers-postgres",
|
27
27
|
"name": "PostgreSQL",
|
28
28
|
"description": "`PostgreSQL <https://www.postgresql.org/>`__\n",
|
29
|
-
"state": "ready",
|
30
|
-
"source-date-epoch": 1743836610,
|
31
|
-
"versions": [
|
32
|
-
"6.1.2",
|
33
|
-
"6.1.1",
|
34
|
-
"6.1.0",
|
35
|
-
"6.0.0",
|
36
|
-
"5.14.0",
|
37
|
-
"5.13.1",
|
38
|
-
"5.13.0",
|
39
|
-
"5.12.0",
|
40
|
-
"5.11.3",
|
41
|
-
"5.11.2",
|
42
|
-
"5.11.1",
|
43
|
-
"5.11.0",
|
44
|
-
"5.10.2",
|
45
|
-
"5.10.1",
|
46
|
-
"5.10.0",
|
47
|
-
"5.9.0",
|
48
|
-
"5.8.0",
|
49
|
-
"5.7.1",
|
50
|
-
"5.7.0",
|
51
|
-
"5.6.1",
|
52
|
-
"5.6.0",
|
53
|
-
"5.5.2",
|
54
|
-
"5.5.1",
|
55
|
-
"5.5.0",
|
56
|
-
"5.4.0",
|
57
|
-
"5.3.1",
|
58
|
-
"5.3.0",
|
59
|
-
"5.2.2",
|
60
|
-
"5.2.1",
|
61
|
-
"5.2.0",
|
62
|
-
"5.1.0",
|
63
|
-
"5.0.0",
|
64
|
-
"4.1.0",
|
65
|
-
"4.0.1",
|
66
|
-
"4.0.0",
|
67
|
-
"3.0.0",
|
68
|
-
"2.4.0",
|
69
|
-
"2.3.0",
|
70
|
-
"2.2.0",
|
71
|
-
"2.1.0",
|
72
|
-
"2.0.0",
|
73
|
-
"1.0.2",
|
74
|
-
"1.0.1",
|
75
|
-
"1.0.0",
|
76
|
-
],
|
77
29
|
"integrations": [
|
78
30
|
{
|
79
31
|
"integration-name": "PostgreSQL",
|
@@ -113,15 +65,4 @@ def get_provider_info():
|
|
113
65
|
"handler": "airflow.providers.postgres.assets.postgres.sanitize_uri",
|
114
66
|
}
|
115
67
|
],
|
116
|
-
"dependencies": [
|
117
|
-
"apache-airflow>=2.9.0",
|
118
|
-
"apache-airflow-providers-common-sql>=1.23.0",
|
119
|
-
"psycopg2-binary>=2.9.9",
|
120
|
-
"asyncpg>=0.30.0",
|
121
|
-
],
|
122
|
-
"optional-dependencies": {
|
123
|
-
"amazon": ["apache-airflow-providers-amazon>=2.6.0"],
|
124
|
-
"openlineage": ["apache-airflow-providers-openlineage"],
|
125
|
-
},
|
126
|
-
"devel-dependencies": [],
|
127
68
|
}
|
@@ -25,7 +25,7 @@ from typing import TYPE_CHECKING, Any, Union
|
|
25
25
|
import psycopg2
|
26
26
|
import psycopg2.extensions
|
27
27
|
import psycopg2.extras
|
28
|
-
from psycopg2.extras import DictCursor, NamedTupleCursor, RealDictCursor
|
28
|
+
from psycopg2.extras import DictCursor, Json, NamedTupleCursor, RealDictCursor
|
29
29
|
from sqlalchemy.engine import URL
|
30
30
|
|
31
31
|
from airflow.exceptions import AirflowException
|
@@ -141,9 +141,8 @@ class PostgresHook(DbApiHook):
|
|
141
141
|
}
|
142
142
|
if _cursor in cursor_types:
|
143
143
|
return cursor_types[_cursor]
|
144
|
-
|
145
|
-
|
146
|
-
raise ValueError(f"Invalid cursor passed {_cursor}. Valid options are: {valid_cursors}")
|
144
|
+
valid_cursors = ", ".join(cursor_types.keys())
|
145
|
+
raise ValueError(f"Invalid cursor passed {_cursor}. Valid options are: {valid_cursors}")
|
147
146
|
|
148
147
|
def get_conn(self) -> connection:
|
149
148
|
"""Establish a connection to a postgres database."""
|
@@ -217,16 +216,20 @@ class PostgresHook(DbApiHook):
|
|
217
216
|
"""
|
218
217
|
Serialize a cell.
|
219
218
|
|
220
|
-
|
221
|
-
|
219
|
+
In order to pass a Python object to the database as query argument you can use the
|
220
|
+
Json (class psycopg2.extras.Json) adapter.
|
221
|
+
|
222
|
+
Reading from the database, json and jsonb values will be automatically converted to Python objects.
|
222
223
|
|
223
|
-
See
|
224
|
+
See https://www.psycopg.org/docs/extras.html#json-adaptation for
|
224
225
|
more information.
|
225
226
|
|
226
227
|
:param cell: The cell to insert into the table
|
227
228
|
:param conn: The database connection
|
228
229
|
:return: The cell
|
229
230
|
"""
|
231
|
+
if isinstance(cell, (dict, list)):
|
232
|
+
cell = Json(cell)
|
230
233
|
return cell
|
231
234
|
|
232
235
|
def get_iam_token(self, conn: Connection) -> tuple[str, str, int]:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-postgres
|
3
|
-
Version: 6.1.
|
3
|
+
Version: 6.1.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>
|
@@ -20,15 +20,15 @@ Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
23
|
-
Requires-Dist: apache-airflow>=2.9.
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.23.
|
23
|
+
Requires-Dist: apache-airflow>=2.9.0rc0
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.23.0rc0
|
25
25
|
Requires-Dist: psycopg2-binary>=2.9.9
|
26
26
|
Requires-Dist: asyncpg>=0.30.0
|
27
27
|
Requires-Dist: apache-airflow-providers-amazon>=2.6.0 ; extra == "amazon"
|
28
28
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
29
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
30
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.
|
31
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.3/changelog.html
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.3
|
32
32
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -61,7 +61,7 @@ Provides-Extra: openlineage
|
|
61
61
|
|
62
62
|
Package ``apache-airflow-providers-postgres``
|
63
63
|
|
64
|
-
Release: ``6.1.
|
64
|
+
Release: ``6.1.3``
|
65
65
|
|
66
66
|
|
67
67
|
`PostgreSQL <https://www.postgresql.org/>`__
|
@@ -74,7 +74,7 @@ This is a provider package for ``postgres`` provider. All classes for this provi
|
|
74
74
|
are in ``airflow.providers.postgres`` python package.
|
75
75
|
|
76
76
|
You can find package information and changelog for the provider
|
77
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.
|
77
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.3/>`_.
|
78
78
|
|
79
79
|
Installation
|
80
80
|
------------
|
@@ -119,5 +119,5 @@ Dependent package
|
|
119
119
|
============================================================================================================== ===============
|
120
120
|
|
121
121
|
The changelog for the provider package can be found in the
|
122
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.
|
122
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/6.1.3/changelog.html>`_.
|
123
123
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
airflow/providers/postgres/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
2
|
+
airflow/providers/postgres/__init__.py,sha256=Xbaqoxr6urScj2WZZbQeBrwdW3E2GRIOcaLGwbtZg2I,1495
|
3
|
+
airflow/providers/postgres/get_provider_info.py,sha256=qEEYbClLY3-NH40dBk2u_nOIfvfEIHdXaWsIJ8J5Z68,2626
|
4
|
+
airflow/providers/postgres/assets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
|
+
airflow/providers/postgres/assets/postgres.py,sha256=XNhOJCbOA_soaaiS73JjULMqAM_7PBryhToe8FJREA0,1522
|
6
|
+
airflow/providers/postgres/dialects/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
7
|
+
airflow/providers/postgres/dialects/postgres.py,sha256=8ygA2Jq2WBPhNOISU8YyitLmahxWnPGYNt8OaU_CBFI,3764
|
8
|
+
airflow/providers/postgres/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
+
airflow/providers/postgres/hooks/postgres.py,sha256=mOAyZA6e2D_WhrVsfDRaxm8xBTkOlzfxcXdTQ7eQ4vc,15404
|
10
|
+
apache_airflow_providers_postgres-6.1.3rc1.dist-info/entry_points.txt,sha256=dhtJi6PTWHd6BwKhmI4OtSPvQVI_p0yYWI0eba83HqY,104
|
11
|
+
apache_airflow_providers_postgres-6.1.3rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
12
|
+
apache_airflow_providers_postgres-6.1.3rc1.dist-info/METADATA,sha256=F6ypB8wcqCXZB17zYVessw0QIiJNT2NGQQColXaQu54,5696
|
13
|
+
apache_airflow_providers_postgres-6.1.3rc1.dist-info/RECORD,,
|
@@ -1,13 +0,0 @@
|
|
1
|
-
airflow/providers/postgres/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
2
|
-
airflow/providers/postgres/__init__.py,sha256=SL2DmRQ-bzSeQBrazcZL3xlQgZk6StfJmybpfcAPTCY,1495
|
3
|
-
airflow/providers/postgres/get_provider_info.py,sha256=zsRkZly8LQWWBnJo1tV_fiszij_3TlBnwqDb4CJGGkw,4078
|
4
|
-
airflow/providers/postgres/assets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
|
-
airflow/providers/postgres/assets/postgres.py,sha256=XNhOJCbOA_soaaiS73JjULMqAM_7PBryhToe8FJREA0,1522
|
6
|
-
airflow/providers/postgres/dialects/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
7
|
-
airflow/providers/postgres/dialects/postgres.py,sha256=8ygA2Jq2WBPhNOISU8YyitLmahxWnPGYNt8OaU_CBFI,3764
|
8
|
-
airflow/providers/postgres/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
-
airflow/providers/postgres/hooks/postgres.py,sha256=icb_MSQ1BXWcE9vaa-hUPWyykpTmqQKdLsxVB-jvHBk,15238
|
10
|
-
apache_airflow_providers_postgres-6.1.2.dist-info/entry_points.txt,sha256=dhtJi6PTWHd6BwKhmI4OtSPvQVI_p0yYWI0eba83HqY,104
|
11
|
-
apache_airflow_providers_postgres-6.1.2.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
|
12
|
-
apache_airflow_providers_postgres-6.1.2.dist-info/METADATA,sha256=_rWZadaohmi9EO50MT1kvIDxv-QJUbcKYlB8Mi2X3dg,5687
|
13
|
-
apache_airflow_providers_postgres-6.1.2.dist-info/RECORD,,
|