atoti-client-directquery-bigquery 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-bigquery
3
+ Version: 0.9.3
4
+ Summary: Code to use DirectQuery on Google BigQuery
5
+ Project-URL: Documentation, https://docs.atoti.io/0.9.3/api/atoti_directquery_bigquery.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,bigquery,cloud,database,directquery,google
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_bigquery/__init__.py,sha256=ocje-W2dSYjiYIM32Cl83WcY58azqw7vlDWdiPCr78o,212
2
+ atoti_directquery_bigquery/connection_config.py,sha256=XzsHzIEUWY74A5fLAhkDiuMKDyhwHVOnfaSW2PPjQic,2089
3
+ atoti_directquery_bigquery/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ atoti_directquery_bigquery/table_config.py,sha256=7CadjwF-k-7tHYTagkWNDNE4yWF0gkIy94zPxphHZsc,525
5
+ atoti_client_directquery_bigquery-0.9.3.dist-info/METADATA,sha256=Jd6YfzymzwWoG8_4szYM2RZjnCC-Fp7H8ewGAlW5upU,772
6
+ atoti_client_directquery_bigquery-0.9.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ atoti_client_directquery_bigquery-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,4 @@
1
+ """Code to use DirectQuery on `Google BigQuery <https://cloud.google.com/bigquery>`__."""
2
+
3
+ from .connection_config import ConnectionConfig as ConnectionConfig
4
+ from .table_config import TableConfig as TableConfig
@@ -0,0 +1,66 @@
1
+ from pathlib import Path
2
+ from typing import final
3
+
4
+ from atoti._pydantic import PYDANTIC_CONFIG as _PYDANTIC_CONFIG
5
+ from atoti.directquery._external_database_connection_config import (
6
+ AutoMultiColumnArrayConversionConfig,
7
+ CacheConfig,
8
+ ExternalDatabaseConnectionConfig,
9
+ TimeTravelConfig,
10
+ )
11
+ from pydantic.dataclasses import dataclass
12
+ from typing_extensions import override
13
+
14
+
15
+ @final
16
+ @dataclass(config=_PYDANTIC_CONFIG, frozen=True, kw_only=True)
17
+ class ConnectionConfig(
18
+ ExternalDatabaseConnectionConfig,
19
+ AutoMultiColumnArrayConversionConfig,
20
+ CacheConfig,
21
+ TimeTravelConfig,
22
+ ):
23
+ """Config to connect to a BigQuery database.
24
+
25
+ Example:
26
+ .. doctest::
27
+ :hide:
28
+
29
+ >>> session = getfixture("session_with_directquery_bigquery_plugin")
30
+
31
+ >>> from atoti_directquery_bigquery import ConnectionConfig
32
+ >>> connection_config = ConnectionConfig()
33
+ >>> external_database = session.connect_to_external_database(connection_config)
34
+
35
+ """
36
+
37
+ credentials: Path | None = None
38
+ """The path to the `BigQuery credentials file <https://cloud.google.com/docs/authentication/getting-started#setting_the_environment_variable>`__.
39
+
40
+ If ``None``, the `application default credentials <https://cloud.google.com/java/docs/reference/google-auth-library/latest/com.google.auth.oauth2.GoogleCredentials#com_google_auth_oauth2_GoogleCredentials_getApplicationDefault__>`__ will be used.
41
+ """
42
+
43
+ @property
44
+ @override
45
+ def _database_key(self) -> str:
46
+ return "BIGQUERY"
47
+
48
+ @property
49
+ @override
50
+ def _options(self) -> dict[str, str]:
51
+ return {
52
+ **super()._options,
53
+ **self._auto_multi_array_conversion_options,
54
+ **self._cache_options,
55
+ **self._time_travel_options,
56
+ }
57
+
58
+ @property
59
+ @override
60
+ def _password(self) -> str | None:
61
+ return None if self.credentials is None else str(self.credentials)
62
+
63
+ @property
64
+ @override
65
+ def _url(self) -> str | None:
66
+ return None if self.credentials is None else str(self.credentials)
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`."""