apache-airflow-providers-postgres 5.12.0__py3-none-any.whl → 5.13.0__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 +3 -2
- airflow/providers/postgres/hooks/postgres.py +19 -4
- {apache_airflow_providers_postgres-5.12.0.dist-info → apache_airflow_providers_postgres-5.13.0.dist-info}/METADATA +8 -8
- {apache_airflow_providers_postgres-5.12.0.dist-info → apache_airflow_providers_postgres-5.13.0.dist-info}/RECORD +7 -7
- {apache_airflow_providers_postgres-5.12.0.dist-info → apache_airflow_providers_postgres-5.13.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_postgres-5.12.0.dist-info → apache_airflow_providers_postgres-5.13.0.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__ = "5.
|
32
|
+
__version__ = "5.13.0"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.8.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": 1726861120,
|
32
32
|
"versions": [
|
33
|
+
"5.13.0",
|
33
34
|
"5.12.0",
|
34
35
|
"5.11.3",
|
35
36
|
"5.11.2",
|
@@ -70,7 +71,7 @@ def get_provider_info():
|
|
70
71
|
],
|
71
72
|
"dependencies": [
|
72
73
|
"apache-airflow>=2.8.0",
|
73
|
-
"apache-airflow-providers-common-sql>=1.
|
74
|
+
"apache-airflow-providers-common-sql>=1.17.0",
|
74
75
|
"psycopg2-binary>=2.9.4",
|
75
76
|
],
|
76
77
|
"additional-extras": [{"name": "amazon", "dependencies": ["apache-airflow-providers-amazon>=2.6.0"]}],
|
@@ -69,6 +69,10 @@ class PostgresHook(DbApiHook):
|
|
69
69
|
:param options: Optional. Specifies command-line options to send to the server
|
70
70
|
at connection start. For example, setting this to ``-c search_path=myschema``
|
71
71
|
sets the session's value of the ``search_path`` to ``myschema``.
|
72
|
+
:param enable_log_db_messages: Optional. If enabled logs database messages sent to the client
|
73
|
+
during the session. To avoid a memory leak psycopg2 only saves the last 50 messages.
|
74
|
+
For details, see: `PostgreSQL logging configuration parameters
|
75
|
+
<https://www.postgresql.org/docs/current/runtime-config-logging.html>`__
|
72
76
|
"""
|
73
77
|
|
74
78
|
conn_name_attr = "postgres_conn_id"
|
@@ -78,7 +82,9 @@ class PostgresHook(DbApiHook):
|
|
78
82
|
supports_autocommit = True
|
79
83
|
supports_executemany = True
|
80
84
|
|
81
|
-
def __init__(
|
85
|
+
def __init__(
|
86
|
+
self, *args, options: str | None = None, enable_log_db_messages: bool = False, **kwargs
|
87
|
+
) -> None:
|
82
88
|
if "schema" in kwargs:
|
83
89
|
warnings.warn(
|
84
90
|
'The "schema" arg has been renamed to "database" as it contained the database name.'
|
@@ -88,10 +94,10 @@ class PostgresHook(DbApiHook):
|
|
88
94
|
)
|
89
95
|
kwargs["database"] = kwargs["schema"]
|
90
96
|
super().__init__(*args, **kwargs)
|
91
|
-
self.connection: Connection | None = kwargs.pop("connection", None)
|
92
97
|
self.conn: connection = None
|
93
98
|
self.database: str | None = kwargs.pop("database", None)
|
94
99
|
self.options = options
|
100
|
+
self.enable_log_db_messages = enable_log_db_messages
|
95
101
|
|
96
102
|
@property
|
97
103
|
@deprecated(
|
@@ -142,8 +148,7 @@ class PostgresHook(DbApiHook):
|
|
142
148
|
|
143
149
|
def get_conn(self) -> connection:
|
144
150
|
"""Establish a connection to a postgres database."""
|
145
|
-
|
146
|
-
conn = deepcopy(self.connection or self.get_connection(conn_id))
|
151
|
+
conn = deepcopy(self.connection)
|
147
152
|
|
148
153
|
# check for authentication via AWS IAM
|
149
154
|
if conn.extra_dejson.get("iam", False):
|
@@ -396,3 +401,13 @@ class PostgresHook(DbApiHook):
|
|
396
401
|
"schema": "Database",
|
397
402
|
},
|
398
403
|
}
|
404
|
+
|
405
|
+
def get_db_log_messages(self, conn) -> None:
|
406
|
+
"""
|
407
|
+
Log all database messages sent to the client during the session.
|
408
|
+
|
409
|
+
:param conn: Connection object
|
410
|
+
"""
|
411
|
+
if self.enable_log_db_messages:
|
412
|
+
for output in conn.notices:
|
413
|
+
self.log.info(output)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: apache-airflow-providers-postgres
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.13.0
|
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.17.0
|
25
25
|
Requires-Dist: apache-airflow>=2.8.0
|
26
26
|
Requires-Dist: psycopg2-binary>=2.9.4
|
27
27
|
Requires-Dist: apache-airflow-providers-amazon>=2.6.0 ; 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.
|
32
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.
|
31
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.13.0/changelog.html
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.13.0
|
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.
|
85
|
+
Release: ``5.13.0``
|
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.
|
98
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.13.0/>`_.
|
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.8.0``
|
116
|
-
``apache-airflow-providers-common-sql`` ``>=1.
|
116
|
+
``apache-airflow-providers-common-sql`` ``>=1.17.0``
|
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.
|
142
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.13.0/changelog.html>`_.
|
@@ -1,13 +1,13 @@
|
|
1
1
|
airflow/providers/postgres/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
2
|
-
airflow/providers/postgres/__init__.py,sha256
|
3
|
-
airflow/providers/postgres/get_provider_info.py,sha256=
|
2
|
+
airflow/providers/postgres/__init__.py,sha256=-6YNvc4h1schz3yhaCaQHcReXTlEuhn2AVh-gCfWF78,1496
|
3
|
+
airflow/providers/postgres/get_provider_info.py,sha256=rll4pzr-lilEdZlXt_bD9dfhFe2RKZV3V_WwlAZSK98,3699
|
4
4
|
airflow/providers/postgres/datasets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
5
|
airflow/providers/postgres/datasets/postgres.py,sha256=XNhOJCbOA_soaaiS73JjULMqAM_7PBryhToe8FJREA0,1522
|
6
6
|
airflow/providers/postgres/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
7
|
-
airflow/providers/postgres/hooks/postgres.py,sha256
|
7
|
+
airflow/providers/postgres/hooks/postgres.py,sha256=MQwBq8js4vW7MVbocJMW_rPZzhea5UhmdySPqkPK0Fw,16738
|
8
8
|
airflow/providers/postgres/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
9
|
airflow/providers/postgres/operators/postgres.py,sha256=M8qx8FBf97HRwJMn_zg_EqCPGqsx-iZ0aRzMQuG3lJg,3509
|
10
|
-
apache_airflow_providers_postgres-5.
|
11
|
-
apache_airflow_providers_postgres-5.
|
12
|
-
apache_airflow_providers_postgres-5.
|
13
|
-
apache_airflow_providers_postgres-5.
|
10
|
+
apache_airflow_providers_postgres-5.13.0.dist-info/entry_points.txt,sha256=dhtJi6PTWHd6BwKhmI4OtSPvQVI_p0yYWI0eba83HqY,104
|
11
|
+
apache_airflow_providers_postgres-5.13.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
12
|
+
apache_airflow_providers_postgres-5.13.0.dist-info/METADATA,sha256=ZwdcN1J4KN7KLKFiGq6OTo8h6aHfrpbuPxikW6lDkRw,6613
|
13
|
+
apache_airflow_providers_postgres-5.13.0.dist-info/RECORD,,
|
File without changes
|