77from ... import errors
88from ...client import AuthenticatedClient , Client
99from ...models .http_validation_error import HTTPValidationError
10+ from ...models .materialize_op import MaterializeOp
1011from ...models .operation_envelope import OperationEnvelope
1112from ...models .operation_error import OperationError
1213from ...types import UNSET , Response , Unset
1516def _get_kwargs (
1617 graph_id : str ,
1718 * ,
18- force : bool | Unset = False ,
19- rebuild : bool | Unset = False ,
20- ignore_errors : bool | Unset = True ,
21- dry_run : bool | Unset = False ,
22- source : None | str | Unset = UNSET ,
23- materialize_embeddings : bool | Unset = False ,
19+ body : MaterializeOp ,
2420 idempotency_key : None | str | Unset = UNSET ,
2521) -> dict [str , Any ]:
2622 headers : dict [str , Any ] = {}
2723 if not isinstance (idempotency_key , Unset ):
2824 headers ["Idempotency-Key" ] = idempotency_key
2925
30- params : dict [str , Any ] = {}
31-
32- params ["force" ] = force
33-
34- params ["rebuild" ] = rebuild
35-
36- params ["ignore_errors" ] = ignore_errors
37-
38- params ["dry_run" ] = dry_run
39-
40- json_source : None | str | Unset
41- if isinstance (source , Unset ):
42- json_source = UNSET
43- else :
44- json_source = source
45- params ["source" ] = json_source
46-
47- params ["materialize_embeddings" ] = materialize_embeddings
48-
49- params = {k : v for k , v in params .items () if v is not UNSET and v is not None }
50-
5126 _kwargs : dict [str , Any ] = {
5227 "method" : "post" ,
5328 "url" : "/v1/graphs/{graph_id}/operations/materialize" .format (
5429 graph_id = quote (str (graph_id ), safe = "" ),
5530 ),
56- "params" : params ,
5731 }
5832
33+ _kwargs ["json" ] = body .to_dict ()
34+
35+ headers ["Content-Type" ] = "application/json"
36+
5937 _kwargs ["headers" ] = headers
6038 return _kwargs
6139
@@ -125,33 +103,20 @@ def sync_detailed(
125103 graph_id : str ,
126104 * ,
127105 client : AuthenticatedClient ,
128- force : bool | Unset = False ,
129- rebuild : bool | Unset = False ,
130- ignore_errors : bool | Unset = True ,
131- dry_run : bool | Unset = False ,
132- source : None | str | Unset = UNSET ,
133- materialize_embeddings : bool | Unset = False ,
106+ body : MaterializeOp ,
134107 idempotency_key : None | str | Unset = UNSET ,
135108) -> Response [Any | HTTPValidationError | OperationEnvelope | OperationError ]:
136109 """Materialize Graph
137110
138111 Materialize graph from staging tables or extensions OLTP.
139112
140- Delegates to the existing materialize_graph handler which handles
141- distributed locking, source routing, and Dagster/direct dispatch.
142-
143113 **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
144114 return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
145115
146116 Args:
147117 graph_id (str):
148- force (bool | Unset): Default: False.
149- rebuild (bool | Unset): Default: False.
150- ignore_errors (bool | Unset): Default: True.
151- dry_run (bool | Unset): Default: False.
152- source (None | str | Unset):
153- materialize_embeddings (bool | Unset): Default: False.
154118 idempotency_key (None | str | Unset):
119+ body (MaterializeOp): Body for the materialize operation.
155120
156121 Raises:
157122 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -163,12 +128,7 @@ def sync_detailed(
163128
164129 kwargs = _get_kwargs (
165130 graph_id = graph_id ,
166- force = force ,
167- rebuild = rebuild ,
168- ignore_errors = ignore_errors ,
169- dry_run = dry_run ,
170- source = source ,
171- materialize_embeddings = materialize_embeddings ,
131+ body = body ,
172132 idempotency_key = idempotency_key ,
173133 )
174134
@@ -183,33 +143,20 @@ def sync(
183143 graph_id : str ,
184144 * ,
185145 client : AuthenticatedClient ,
186- force : bool | Unset = False ,
187- rebuild : bool | Unset = False ,
188- ignore_errors : bool | Unset = True ,
189- dry_run : bool | Unset = False ,
190- source : None | str | Unset = UNSET ,
191- materialize_embeddings : bool | Unset = False ,
146+ body : MaterializeOp ,
192147 idempotency_key : None | str | Unset = UNSET ,
193148) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None :
194149 """Materialize Graph
195150
196151 Materialize graph from staging tables or extensions OLTP.
197152
198- Delegates to the existing materialize_graph handler which handles
199- distributed locking, source routing, and Dagster/direct dispatch.
200-
201153 **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
202154 return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
203155
204156 Args:
205157 graph_id (str):
206- force (bool | Unset): Default: False.
207- rebuild (bool | Unset): Default: False.
208- ignore_errors (bool | Unset): Default: True.
209- dry_run (bool | Unset): Default: False.
210- source (None | str | Unset):
211- materialize_embeddings (bool | Unset): Default: False.
212158 idempotency_key (None | str | Unset):
159+ body (MaterializeOp): Body for the materialize operation.
213160
214161 Raises:
215162 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -222,12 +169,7 @@ def sync(
222169 return sync_detailed (
223170 graph_id = graph_id ,
224171 client = client ,
225- force = force ,
226- rebuild = rebuild ,
227- ignore_errors = ignore_errors ,
228- dry_run = dry_run ,
229- source = source ,
230- materialize_embeddings = materialize_embeddings ,
172+ body = body ,
231173 idempotency_key = idempotency_key ,
232174 ).parsed
233175
@@ -236,33 +178,20 @@ async def asyncio_detailed(
236178 graph_id : str ,
237179 * ,
238180 client : AuthenticatedClient ,
239- force : bool | Unset = False ,
240- rebuild : bool | Unset = False ,
241- ignore_errors : bool | Unset = True ,
242- dry_run : bool | Unset = False ,
243- source : None | str | Unset = UNSET ,
244- materialize_embeddings : bool | Unset = False ,
181+ body : MaterializeOp ,
245182 idempotency_key : None | str | Unset = UNSET ,
246183) -> Response [Any | HTTPValidationError | OperationEnvelope | OperationError ]:
247184 """Materialize Graph
248185
249186 Materialize graph from staging tables or extensions OLTP.
250187
251- Delegates to the existing materialize_graph handler which handles
252- distributed locking, source routing, and Dagster/direct dispatch.
253-
254188 **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
255189 return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
256190
257191 Args:
258192 graph_id (str):
259- force (bool | Unset): Default: False.
260- rebuild (bool | Unset): Default: False.
261- ignore_errors (bool | Unset): Default: True.
262- dry_run (bool | Unset): Default: False.
263- source (None | str | Unset):
264- materialize_embeddings (bool | Unset): Default: False.
265193 idempotency_key (None | str | Unset):
194+ body (MaterializeOp): Body for the materialize operation.
266195
267196 Raises:
268197 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -274,12 +203,7 @@ async def asyncio_detailed(
274203
275204 kwargs = _get_kwargs (
276205 graph_id = graph_id ,
277- force = force ,
278- rebuild = rebuild ,
279- ignore_errors = ignore_errors ,
280- dry_run = dry_run ,
281- source = source ,
282- materialize_embeddings = materialize_embeddings ,
206+ body = body ,
283207 idempotency_key = idempotency_key ,
284208 )
285209
@@ -292,33 +216,20 @@ async def asyncio(
292216 graph_id : str ,
293217 * ,
294218 client : AuthenticatedClient ,
295- force : bool | Unset = False ,
296- rebuild : bool | Unset = False ,
297- ignore_errors : bool | Unset = True ,
298- dry_run : bool | Unset = False ,
299- source : None | str | Unset = UNSET ,
300- materialize_embeddings : bool | Unset = False ,
219+ body : MaterializeOp ,
301220 idempotency_key : None | str | Unset = UNSET ,
302221) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None :
303222 """Materialize Graph
304223
305224 Materialize graph from staging tables or extensions OLTP.
306225
307- Delegates to the existing materialize_graph handler which handles
308- distributed locking, source routing, and Dagster/direct dispatch.
309-
310226 **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
311227 return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
312228
313229 Args:
314230 graph_id (str):
315- force (bool | Unset): Default: False.
316- rebuild (bool | Unset): Default: False.
317- ignore_errors (bool | Unset): Default: True.
318- dry_run (bool | Unset): Default: False.
319- source (None | str | Unset):
320- materialize_embeddings (bool | Unset): Default: False.
321231 idempotency_key (None | str | Unset):
232+ body (MaterializeOp): Body for the materialize operation.
322233
323234 Raises:
324235 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -332,12 +243,7 @@ async def asyncio(
332243 await asyncio_detailed (
333244 graph_id = graph_id ,
334245 client = client ,
335- force = force ,
336- rebuild = rebuild ,
337- ignore_errors = ignore_errors ,
338- dry_run = dry_run ,
339- source = source ,
340- materialize_embeddings = materialize_embeddings ,
246+ body = body ,
341247 idempotency_key = idempotency_key ,
342248 )
343249 ).parsed
0 commit comments