atoti-client-directquery-synapse 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-synapse
3
+ Version: 0.9.0
4
+ Summary: Code to use DirectQuery on Azure Synapse Analytics
5
+ Home-page: https://www.atoti.io
6
+ License: Proprietary
7
+ Keywords: atoti,cloud,database,directquery,synapse
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_synapse.html
@@ -0,0 +1,7 @@
1
+ atoti_directquery_synapse/__init__.py,sha256=m45NYYwGfJEMbZkCc04gf94VK16lEVX8Ep6uTUnWg1A,247
2
+ atoti_directquery_synapse/connection_config.py,sha256=jdBsYmbQId3b6hUNdkrwJaJ2Yg5-pkTNgiDFt-Eo9ZA,2014
3
+ atoti_directquery_synapse/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ atoti_directquery_synapse/table_config.py,sha256=7CadjwF-k-7tHYTagkWNDNE4yWF0gkIy94zPxphHZsc,525
5
+ atoti_client_directquery_synapse-0.9.0.dist-info/METADATA,sha256=P3sQWJPrBQv5LPI93kIPJQaf5zCQcUQM8A7rNmqYv5M,998
6
+ atoti_client_directquery_synapse-0.9.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
7
+ atoti_client_directquery_synapse-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,4 @@
1
+ """Code to use DirectQuery on `Azure Synapse Analytics <https://azure.microsoft.com/en-us/services/synapse-analytics>`__."""
2
+
3
+ from .connection_config import ConnectionConfig as ConnectionConfig
4
+ from .table_config import TableConfig as TableConfig
@@ -0,0 +1,70 @@
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 a Synapse database."""
21
+
22
+ url: str
23
+ """The JDBC connection string.
24
+
25
+ See https://docs.microsoft.com/en-us/azure/synapse-analytics/sql/connection-strings#sample-jdbc-connection-string for more information.
26
+
27
+ Example:
28
+ .. doctest::
29
+ :hide:
30
+
31
+ >>> account_identifier = "tck-directquery-ondemand"
32
+
33
+ .. doctest::
34
+
35
+ >>> import os
36
+ >>> from atoti_directquery_synapse import ConnectionConfig
37
+ >>> connection_config = ConnectionConfig(
38
+ ... url="jdbc:sqlserver://"
39
+ ... + account_identifier
40
+ ... + ".sql.azuresynapse.net;authentication="
41
+ ... + os.environ["SYNAPSE_AUTHENTICATION_METHOD"]
42
+ ... + ";user="
43
+ ... + os.environ["SYNAPSE_USERNAME"],
44
+ ... password=os.environ["SYNAPSE_PASSWORD"],
45
+ ... )
46
+ >>> external_database = session.connect_to_external_database(connection_config)
47
+ """
48
+
49
+ @property
50
+ @override
51
+ def _database_key(self) -> str:
52
+ return "SYNAPSE"
53
+
54
+ @property
55
+ @override
56
+ def _options(self) -> dict[str, str]:
57
+ return {
58
+ **super()._options,
59
+ **self._auto_multi_array_conversion_options,
60
+ }
61
+
62
+ @property
63
+ @override
64
+ def _password(self) -> str | None:
65
+ return self.password
66
+
67
+ @property
68
+ @override
69
+ def _url(self) -> str | None:
70
+ return self.url
File without changes
@@ -0,0 +1,19 @@
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(
16
+ ExternalTableConfig[ConnectionConfig],
17
+ ArrayConversionConfig,
18
+ ):
19
+ """Config passed to :meth:`~atoti.Session.add_external_table`."""