apache-airflow-providers-postgres 5.11.0rc1__py3-none-any.whl → 5.11.1__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 +3 -6
- airflow/providers/postgres/get_provider_info.py +2 -1
- airflow/providers/postgres/hooks/postgres.py +15 -5
- {apache_airflow_providers_postgres-5.11.0rc1.dist-info → apache_airflow_providers_postgres-5.11.1.dist-info}/METADATA +9 -9
- apache_airflow_providers_postgres-5.11.1.dist-info/RECORD +13 -0
- apache_airflow_providers_postgres-5.11.0rc1.dist-info/RECORD +0 -13
- {apache_airflow_providers_postgres-5.11.0rc1.dist-info → apache_airflow_providers_postgres-5.11.1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_postgres-5.11.0rc1.dist-info → apache_airflow_providers_postgres-5.11.1.dist-info}/entry_points.txt +0 -0
@@ -25,14 +25,11 @@ from __future__ import annotations
|
|
25
25
|
|
26
26
|
import packaging.version
|
27
27
|
|
28
|
-
|
28
|
+
from airflow import __version__ as airflow_version
|
29
29
|
|
30
|
-
|
30
|
+
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
|
33
|
-
from airflow import __version__ as airflow_version
|
34
|
-
except ImportError:
|
35
|
-
from airflow.version import version as airflow_version
|
32
|
+
__version__ = "5.11.1"
|
36
33
|
|
37
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
38
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": 1716288967,
|
32
32
|
"versions": [
|
33
|
+
"5.11.1",
|
33
34
|
"5.11.0",
|
34
35
|
"5.10.2",
|
35
36
|
"5.10.1",
|
@@ -28,6 +28,7 @@ import psycopg2.extensions
|
|
28
28
|
import psycopg2.extras
|
29
29
|
from deprecated import deprecated
|
30
30
|
from psycopg2.extras import DictCursor, NamedTupleCursor, RealDictCursor
|
31
|
+
from sqlalchemy.engine import URL
|
31
32
|
|
32
33
|
from airflow.exceptions import AirflowProviderDeprecationWarning
|
33
34
|
from airflow.providers.common.sql.hooks.sql import DbApiHook
|
@@ -113,6 +114,18 @@ class PostgresHook(DbApiHook):
|
|
113
114
|
def schema(self, value):
|
114
115
|
self.database = value
|
115
116
|
|
117
|
+
@property
|
118
|
+
def sqlalchemy_url(self) -> URL:
|
119
|
+
conn = self.get_connection(getattr(self, self.conn_name_attr))
|
120
|
+
return URL.create(
|
121
|
+
drivername="postgresql",
|
122
|
+
username=conn.login,
|
123
|
+
password=conn.password,
|
124
|
+
host=conn.host,
|
125
|
+
port=conn.port,
|
126
|
+
database=self.database or conn.schema,
|
127
|
+
)
|
128
|
+
|
116
129
|
def _get_cursor(self, raw_cursor: str) -> CursorType:
|
117
130
|
_cursor = raw_cursor.lower()
|
118
131
|
cursor_types = {
|
@@ -186,12 +199,9 @@ class PostgresHook(DbApiHook):
|
|
186
199
|
def get_uri(self) -> str:
|
187
200
|
"""Extract the URI from the connection.
|
188
201
|
|
189
|
-
:return: the extracted
|
202
|
+
:return: the extracted URI in Sqlalchemy URI format.
|
190
203
|
"""
|
191
|
-
|
192
|
-
conn.schema = self.database or conn.schema
|
193
|
-
uri = conn.get_uri().replace("postgres://", "postgresql://")
|
194
|
-
return uri
|
204
|
+
return self.sqlalchemy_url.render_as_string(hide_password=False)
|
195
205
|
|
196
206
|
def bulk_load(self, table: str, tmp_file: str) -> None:
|
197
207
|
"""Load a tab-delimited file into a database table."""
|
@@ -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.1
|
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.3.
|
25
|
-
Requires-Dist: apache-airflow>=2.7.
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.3.1
|
25
|
+
Requires-Dist: apache-airflow>=2.7.0
|
26
26
|
Requires-Dist: psycopg2-binary>=2.8.0
|
27
|
-
Requires-Dist: apache-airflow-providers-amazon>=2.6.
|
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.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.1/changelog.html
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-postgres/5.11.1
|
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.1``
|
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.1/>`_.
|
99
99
|
|
100
100
|
Installation
|
101
101
|
------------
|
@@ -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.1/changelog.html>`_.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
airflow/providers/postgres/LICENSE,sha256=ywUBpKZc7Jb96rVt5I3IDbg7dIJAbUSHkuoDcF3jbH4,13569
|
2
|
+
airflow/providers/postgres/__init__.py,sha256=11cyVT7WE8b6jHEeSFM5y3K5uWAMMd2LaHGB8DxZei4,1496
|
3
|
+
airflow/providers/postgres/get_provider_info.py,sha256=OOxog1C8rlBNyWmXrMnVX38YWPVnr6lKMI4osG-Vovo,3610
|
4
|
+
airflow/providers/postgres/datasets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
|
+
airflow/providers/postgres/datasets/postgres.py,sha256=XNhOJCbOA_soaaiS73JjULMqAM_7PBryhToe8FJREA0,1522
|
6
|
+
airflow/providers/postgres/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
7
|
+
airflow/providers/postgres/hooks/postgres.py,sha256=vq298ZVhfVpoIdxnfq2aOzlNcU4jw9nPCgBqJVxmZC4,16095
|
8
|
+
airflow/providers/postgres/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
+
airflow/providers/postgres/operators/postgres.py,sha256=M8qx8FBf97HRwJMn_zg_EqCPGqsx-iZ0aRzMQuG3lJg,3509
|
10
|
+
apache_airflow_providers_postgres-5.11.1.dist-info/entry_points.txt,sha256=dhtJi6PTWHd6BwKhmI4OtSPvQVI_p0yYWI0eba83HqY,104
|
11
|
+
apache_airflow_providers_postgres-5.11.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
12
|
+
apache_airflow_providers_postgres-5.11.1.dist-info/METADATA,sha256=VGguC4pGtoKC4h8_UOc_5c8Vbhp88jSnQj_BumCKV34,6611
|
13
|
+
apache_airflow_providers_postgres-5.11.1.dist-info/RECORD,,
|
@@ -1,13 +0,0 @@
|
|
1
|
-
airflow/providers/postgres/LICENSE,sha256=ywUBpKZc7Jb96rVt5I3IDbg7dIJAbUSHkuoDcF3jbH4,13569
|
2
|
-
airflow/providers/postgres/__init__.py,sha256=E1E_YY0kVJnSxIPADH5efCDq2hOg-C-YeQma5QMVTSY,1584
|
3
|
-
airflow/providers/postgres/get_provider_info.py,sha256=zCR-ZtI5zIIc3MEnP7jpxJRWB_S3BzIRFt_bjRYIm4c,3588
|
4
|
-
airflow/providers/postgres/datasets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
|
-
airflow/providers/postgres/datasets/postgres.py,sha256=XNhOJCbOA_soaaiS73JjULMqAM_7PBryhToe8FJREA0,1522
|
6
|
-
airflow/providers/postgres/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
7
|
-
airflow/providers/postgres/hooks/postgres.py,sha256=LAiK2VhiIKU2tOuVk3jFeNUoaeglrvISgZ9yByXzZHc,15800
|
8
|
-
airflow/providers/postgres/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
-
airflow/providers/postgres/operators/postgres.py,sha256=M8qx8FBf97HRwJMn_zg_EqCPGqsx-iZ0aRzMQuG3lJg,3509
|
10
|
-
apache_airflow_providers_postgres-5.11.0rc1.dist-info/entry_points.txt,sha256=dhtJi6PTWHd6BwKhmI4OtSPvQVI_p0yYWI0eba83HqY,104
|
11
|
-
apache_airflow_providers_postgres-5.11.0rc1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
12
|
-
apache_airflow_providers_postgres-5.11.0rc1.dist-info/METADATA,sha256=2bDd919ctu524rSzhUnXAJPKSiEA7aFRP5W5sLJI_b4,6627
|
13
|
-
apache_airflow_providers_postgres-5.11.0rc1.dist-info/RECORD,,
|
File without changes
|