atoti-client-directquery-jdbc 0.9.3__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.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: atoti-client-directquery-jdbc
3
+ Version: 0.9.3
4
+ Summary: Code to use DirectQuery through JDBC
5
+ Project-URL: Documentation, https://docs.atoti.io/0.9.3/api/atoti_directquery_jdbc.html
6
+ Project-URL: Homepage, https://www.atoti.io
7
+ Project-URL: Issues, https://github.com/atoti/atoti/issues
8
+ Author-email: ActiveViam <dev@atoti.io>
9
+ Keywords: atoti,cloud,database,directquery,jdbc
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: License :: Free for non-commercial use
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Typing :: Typed
15
+ Requires-Python: >=3.10
16
+ Requires-Dist: atoti-client==0.9.3
17
+ Requires-Dist: pydantic>=2.10.1
18
+ Requires-Dist: typing-extensions>=4.12.2
@@ -0,0 +1,7 @@
1
+ atoti_directquery_jdbc/__init__.py,sha256=Zq8pdsr1xxaFaoouHNwfseiMokSRycDUMTGtHDE52vk,402
2
+ atoti_directquery_jdbc/connection_config.py,sha256=O8yCs1v749xIDh331WOQ6t7M6zSPEK1x2epwG2Dqo4k,2132
3
+ atoti_directquery_jdbc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ atoti_directquery_jdbc/table_config.py,sha256=p-ZTGjghRwFw3W-guO_4JMwFCwaLE1DC9zgUoQAGt-k,514
5
+ atoti_client_directquery_jdbc-0.9.3.dist-info/METADATA,sha256=bvhMSMDzypJHVWzE8M0CgNPs-5UncSqwXey92ImvA7A,747
6
+ atoti_client_directquery_jdbc-0.9.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ atoti_client_directquery_jdbc-0.9.3.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,9 @@
1
+ """Code to use DirectQuery through `JDBC <https://en.wikipedia.org/wiki/Java_Database_Connectivity>`__.
2
+
3
+ Note:
4
+ For better performance, prefer database-specific connectors when available.
5
+ For instance, to connect to ClickHouse, use :mod:`atoti_directquery_clickhouse`.
6
+ """
7
+
8
+ from .connection_config import ConnectionConfig as ConnectionConfig
9
+ from .table_config import TableConfig as TableConfig
@@ -0,0 +1,80 @@
1
+ from typing import final
2
+
3
+ from atoti._pydantic import PYDANTIC_CONFIG as _PYDANTIC_CONFIG
4
+ from atoti.directquery._external_database_connection_config import (
5
+ AutoMultiColumnArrayConversionConfig,
6
+ EmulatedTimeTravelConfig,
7
+ ExternalDatabaseConnectionConfig,
8
+ PasswordConfig,
9
+ )
10
+ from pydantic.dataclasses import dataclass
11
+ from typing_extensions import override
12
+
13
+
14
+ @final
15
+ @dataclass(config=_PYDANTIC_CONFIG, frozen=True, kw_only=True)
16
+ class ConnectionConfig(
17
+ ExternalDatabaseConnectionConfig,
18
+ AutoMultiColumnArrayConversionConfig,
19
+ PasswordConfig,
20
+ ):
21
+ """Config to connect to an external database through JDBC.
22
+
23
+ See Also:
24
+ :class:`atoti_directquery_snowflake.ConnectionConfig` for an example.
25
+
26
+ """
27
+
28
+ url: str
29
+ """The JDBC connection string."""
30
+
31
+ sql_dialect_key: str
32
+ """The key of the SQL dialect to use.
33
+
34
+ The dialect will typically be provided with an :attr:`extra JAR <atoti.SessionConfig.extra_jars>`.
35
+ """
36
+
37
+ password_parameter_name: str | None = None
38
+ """The name of the query string parameter in which :attr:`password` should be added to :attr:`url`.
39
+
40
+ Unused when :attr:`password` is ``None``, required when it is not.
41
+ """
42
+
43
+ time_travel: EmulatedTimeTravelConfig | None = None
44
+ """Optional configuration for emulated time-travel.
45
+
46
+ :meta private:
47
+ """
48
+
49
+ @property
50
+ @override
51
+ def _database_key(self) -> str:
52
+ return "GENERIC_JDBC"
53
+
54
+ @property
55
+ @override
56
+ def _options(self) -> dict[str, str]:
57
+ return {
58
+ **super()._options,
59
+ "CONNECTOR_KEY": self.sql_dialect_key,
60
+ **(
61
+ {"PASSWORD_PROPERTY_NAME": self.password_parameter_name}
62
+ if self.password_parameter_name
63
+ else {}
64
+ ),
65
+ **(
66
+ self.time_travel._emulated_time_travel_options
67
+ if self.time_travel
68
+ else {}
69
+ ),
70
+ }
71
+
72
+ @property
73
+ @override
74
+ def _password(self) -> str | None:
75
+ return self.password
76
+
77
+ @property
78
+ @override
79
+ def _url(self) -> str | None:
80
+ return self.url
File without changes
@@ -0,0 +1,16 @@
1
+ from typing import final
2
+
3
+ from atoti._pydantic import PYDANTIC_CONFIG as _PYDANTIC_CONFIG
4
+ from atoti.directquery._external_table_config import (
5
+ ArrayConversionConfig,
6
+ ExternalTableConfig,
7
+ )
8
+ from pydantic.dataclasses import dataclass
9
+
10
+ from .connection_config import ConnectionConfig
11
+
12
+
13
+ @final
14
+ @dataclass(config=_PYDANTIC_CONFIG, frozen=True, kw_only=True)
15
+ class TableConfig(ExternalTableConfig[ConnectionConfig], ArrayConversionConfig):
16
+ """Config passed to :meth:`~atoti.Session.add_external_table`."""