datamarket 0.9.16__tar.gz → 0.9.17__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.
Potentially problematic release.
This version of datamarket might be problematic. Click here for more details.
- {datamarket-0.9.16 → datamarket-0.9.17}/PKG-INFO +1 -1
- {datamarket-0.9.16 → datamarket-0.9.17}/pyproject.toml +1 -1
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/peerdb.py +14 -4
- {datamarket-0.9.16 → datamarket-0.9.17}/LICENSE +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/README.md +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/__init__.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/__init__.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/alchemy.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/aws.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/drive.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/ftp.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/nominatim.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/proxy.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/interfaces/tinybird.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/params/__init__.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/params/nominatim.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/__init__.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/airflow.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/alchemy.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/main.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/selenium.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/soda.py +0 -0
- {datamarket-0.9.16 → datamarket-0.9.17}/src/datamarket/utils/typer.py +0 -0
|
@@ -18,10 +18,13 @@ from .alchemy import AlchemyInterface
|
|
|
18
18
|
########################################################################################################################
|
|
19
19
|
# EXCEPTIONS
|
|
20
20
|
|
|
21
|
+
|
|
21
22
|
class DatabaseNotConnectedError(Exception):
|
|
22
23
|
"""Custom error for when database is not connected."""
|
|
24
|
+
|
|
23
25
|
pass
|
|
24
26
|
|
|
27
|
+
|
|
25
28
|
########################################################################################################################
|
|
26
29
|
# CLASSES
|
|
27
30
|
|
|
@@ -78,10 +81,17 @@ class PostgresPeer:
|
|
|
78
81
|
with self.engine.connect() as conn:
|
|
79
82
|
conn.execute(text(f"DROP PUBLICATION IF EXISTS {schema_name}_peerdb"))
|
|
80
83
|
|
|
81
|
-
table_list =
|
|
84
|
+
table_list = []
|
|
85
|
+
for table in table_names:
|
|
86
|
+
full_table_name = f'"{schema_name}"."{table}"'
|
|
87
|
+
logger.info(f"Setting REPLICA IDENTITY FULL for table: {full_table_name}")
|
|
88
|
+
conn.execute(text(f"ALTER TABLE {full_table_name} REPLICA IDENTITY FULL;"))
|
|
89
|
+
table_list.append(full_table_name)
|
|
90
|
+
|
|
91
|
+
table_list_str = ", ".join(table_list)
|
|
82
92
|
conn.execute(
|
|
83
93
|
text(f"""
|
|
84
|
-
CREATE PUBLICATION {schema_name}_peerdb FOR TABLE {
|
|
94
|
+
CREATE PUBLICATION {schema_name}_peerdb FOR TABLE {table_list_str};
|
|
85
95
|
""")
|
|
86
96
|
)
|
|
87
97
|
conn.commit()
|
|
@@ -319,11 +329,11 @@ class PeerDBInterface:
|
|
|
319
329
|
if not self.docker_host_mapping or not host:
|
|
320
330
|
return host
|
|
321
331
|
|
|
322
|
-
if host in [
|
|
332
|
+
if host in ["localhost", "127.0.0.1"]:
|
|
323
333
|
logger.debug(f"Mapping host {host} to {self.docker_host_mapping} for Docker environment")
|
|
324
334
|
return self.docker_host_mapping
|
|
325
335
|
|
|
326
|
-
url_pattern = r
|
|
336
|
+
url_pattern = r"(localhost|127\.0\.0\.1)"
|
|
327
337
|
match = re.search(url_pattern, host)
|
|
328
338
|
if match:
|
|
329
339
|
original_host = match.group(1)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|