-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathasyncio.pyi
More file actions
119 lines (109 loc) · 3.87 KB
/
asyncio.pyi
File metadata and controls
119 lines (109 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# mypy: disable-error-code="misc"
from contextlib import AbstractAsyncContextManager
from typing import List, Optional, Self, Union
import pyarrow as pa
from typing_extensions import AsyncIterator, Unpack, overload
from dbtsl.api.shared.query_params import GroupByParam, OrderByGroupBy, OrderByMetric, QueryParameters
from dbtsl.models import (
AsyncMetric,
Dimension,
Entity,
EnvironmentInfo,
Measure,
SavedQuery,
)
from dbtsl.timeout import TimeoutOptions
class AsyncGraphQLClient:
def __init__(
self,
server_host: str,
environment_id: int,
auth_token: str,
url_format: Optional[str] = None,
timeout: Optional[Union[TimeoutOptions, float, int]] = None,
*,
lazy: bool,
) -> None: ...
def session(self) -> AbstractAsyncContextManager[AsyncIterator[Self]]: ...
@property
def has_session(self) -> bool: ...
async def metrics(self) -> List[AsyncMetric]:
"""Get a list of all available metrics."""
...
async def dimensions(self, metrics: List[str]) -> List[Dimension]:
"""Get a list of all available dimensions for a given set of metrics."""
...
async def measures(self, metrics: List[str]) -> List[Measure]:
"""Get a list of all available measures for a given set of metrics."""
...
async def entities(self, metrics: List[str]) -> List[Entity]:
"""Get a list of all available entities for a given set of metrics."""
...
async def saved_queries(self) -> List[SavedQuery]:
"""Get a list of all available saved queries."""
...
async def environment_info(self) -> EnvironmentInfo:
"""Get information about the Semantic Layer environment."""
...
@overload
async def compile_sql(
self,
metrics: List[str],
group_by: Optional[List[str]] = None,
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy, OrderByMetric]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
@overload
async def compile_sql(
self,
group_by: List[str],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
@overload
async def compile_sql(
self,
saved_query: str,
limit: Optional[int] = None,
order_by: Optional[List[Union[OrderByGroupBy, OrderByMetric]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> str: ...
async def compile_sql(self, **query_params: Unpack[QueryParameters]) -> str:
"""Get the compiled SQL that would be sent to the warehouse by a query."""
...
@overload
async def query(
self,
metrics: List[str],
group_by: Optional[List[Union[GroupByParam, str]]] = None,
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy, OrderByMetric]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
@overload
async def query(
self,
group_by: List[Union[GroupByParam, str]],
limit: Optional[int] = None,
order_by: Optional[List[Union[str, OrderByGroupBy]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
@overload
async def query(
self,
saved_query: str,
limit: Optional[int] = None,
order_by: Optional[List[Union[OrderByGroupBy, OrderByMetric]]] = None,
where: Optional[List[str]] = None,
read_cache: bool = True,
) -> "pa.Table": ...
async def query(self, **params: Unpack[QueryParameters]) -> "pa.Table":
"""Query the Semantic Layer."""
...