atoti-client-directquery-jdbc 0.9.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.
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.1
2
+ Name: atoti-client-directquery-jdbc
3
+ Version: 0.9.0
4
+ Summary: Code to use DirectQuery through JDBC
5
+ Home-page: https://www.atoti.io
6
+ License: Proprietary
7
+ Keywords: atoti,cloud,database,directquery,jdbc
8
+ Author: ActiveViam
9
+ Author-email: dev@atoti.io
10
+ Requires-Python: >=3.10
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: License :: Free To Use But Restricted
13
+ Classifier: License :: Other/Proprietary License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Typing :: Typed
20
+ Requires-Dist: atoti-client (==0.9.0)
21
+ Requires-Dist: pydantic (>=2.6.0)
22
+ Requires-Dist: typing-extensions (>=4.6.1)
23
+ Project-URL: Bug Tracker, https://github.com/atoti/atoti/issues
24
+ Project-URL: Documentation, https://docs.atoti.io/0.9.0/api/atoti_directquery_jdbc.html
@@ -0,0 +1,7 @@
1
+ atoti_directquery_jdbc/__init__.py,sha256=Zq8pdsr1xxaFaoouHNwfseiMokSRycDUMTGtHDE52vk,402
2
+ atoti_directquery_jdbc/connection_config.py,sha256=XfrCa8hK-G8Qtm1xFZMQ3-bu38SK3QjLxH9QVMQJJAU,1807
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.0.dist-info/METADATA,sha256=COgdAWgpj3mMn2xQmT2cPYNFnkGHvVZkX_-Dm8UZo3U,975
6
+ atoti_client_directquery_jdbc-0.9.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
7
+ atoti_client_directquery_jdbc-0.9.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 1.8.1
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,68 @@
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
+ ExternalDatabaseConnectionConfig,
7
+ PasswordConfig,
8
+ )
9
+ from pydantic.dataclasses import dataclass
10
+ from typing_extensions import override
11
+
12
+
13
+ @final
14
+ @dataclass(config=_PYDANTIC_CONFIG, frozen=True, kw_only=True)
15
+ class ConnectionConfig(
16
+ ExternalDatabaseConnectionConfig,
17
+ AutoMultiColumnArrayConversionConfig,
18
+ PasswordConfig,
19
+ ):
20
+ """Config to connect to an external database through JDBC.
21
+
22
+ See Also:
23
+ :class:`atoti_directquery_snowflake.ConnectionConfig` for an example.
24
+
25
+ """
26
+
27
+ url: str
28
+ """The JDBC connection string."""
29
+
30
+ sql_dialect_key: str
31
+ """The key of the SQL dialect to use.
32
+
33
+ The dialect will typically be provided with an :attr:`extra JAR <atoti.SessionConfig.extra_jars>`.
34
+ """
35
+
36
+ password_parameter_name: str | None = None
37
+ """The name of the query string parameter in which :attr:`password` should be added to :attr:`url`.
38
+
39
+ Unused when :attr:`password` is ``None``, required when it is not.
40
+ """
41
+
42
+ @property
43
+ @override
44
+ def _database_key(self) -> str:
45
+ return "GENERIC_JDBC"
46
+
47
+ @property
48
+ @override
49
+ def _options(self) -> dict[str, str]:
50
+ return {
51
+ **super()._options,
52
+ "CONNECTOR_KEY": self.sql_dialect_key,
53
+ **(
54
+ {"PASSWORD_PROPERTY_NAME": self.password_parameter_name}
55
+ if self.password_parameter_name
56
+ else {}
57
+ ),
58
+ }
59
+
60
+ @property
61
+ @override
62
+ def _password(self) -> str | None:
63
+ return self.password
64
+
65
+ @property
66
+ @override
67
+ def _url(self) -> str | None:
68
+ 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`."""