robosystems-client 0.2.3__py3-none-any.whl → 0.2.4__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.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +1 -41
- robosystems_client/api/agent/batch_process_queries.py +1 -41
- robosystems_client/api/agent/execute_specific_agent.py +1 -41
- robosystems_client/api/agent/get_agent_metadata.py +5 -49
- robosystems_client/api/agent/list_agents.py +4 -42
- robosystems_client/api/agent/recommend_agent.py +5 -45
- robosystems_client/api/auth/generate_sso_token.py +0 -18
- robosystems_client/api/auth/get_current_auth_user.py +14 -74
- robosystems_client/api/auth/logout_user.py +14 -50
- robosystems_client/api/auth/refresh_auth_session.py +14 -50
- robosystems_client/api/auth/resend_verification_email.py +14 -74
- robosystems_client/api/backup/create_backup.py +5 -45
- robosystems_client/api/backup/get_backup_download_url.py +4 -42
- robosystems_client/api/backup/get_backup_stats.py +5 -49
- robosystems_client/api/backup/list_backups.py +4 -42
- robosystems_client/api/backup/restore_backup.py +5 -45
- robosystems_client/api/connections/create_connection.py +5 -45
- robosystems_client/api/connections/create_link_token.py +5 -45
- robosystems_client/api/connections/delete_connection.py +5 -49
- robosystems_client/api/connections/exchange_link_token.py +5 -45
- robosystems_client/api/connections/get_connection.py +5 -49
- robosystems_client/api/connections/get_connection_options.py +5 -49
- robosystems_client/api/connections/init_o_auth.py +5 -45
- robosystems_client/api/connections/list_connections.py +4 -42
- robosystems_client/api/connections/oauth_callback.py +5 -45
- robosystems_client/api/connections/sync_connection.py +5 -45
- robosystems_client/api/graph_analytics/get_graph_metrics.py +5 -49
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +4 -42
- robosystems_client/api/graph_billing/get_current_graph_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_billing_history.py +4 -42
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +5 -49
- robosystems_client/api/graph_billing/get_graph_usage_details.py +4 -42
- robosystems_client/api/graph_credits/check_credit_balance.py +0 -38
- robosystems_client/api/graph_credits/check_storage_limits.py +1 -45
- robosystems_client/api/graph_credits/get_credit_summary.py +1 -45
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -38
- robosystems_client/api/graph_credits/list_credit_transactions.py +4 -42
- robosystems_client/api/graph_health/get_database_health.py +5 -49
- robosystems_client/api/graph_info/get_database_info.py +5 -49
- robosystems_client/api/graph_limits/get_graph_limits.py +5 -49
- robosystems_client/api/graphs/create_graph.py +21 -57
- robosystems_client/api/graphs/get_available_extensions.py +131 -15
- robosystems_client/api/graphs/get_graphs.py +154 -79
- robosystems_client/api/graphs/select_graph.py +117 -49
- robosystems_client/api/mcp/call_mcp_tool.py +24 -47
- robosystems_client/api/mcp/list_mcp_tools.py +13 -61
- robosystems_client/api/operations/cancel_operation.py +1 -45
- robosystems_client/api/operations/get_operation_status.py +1 -45
- robosystems_client/api/query/execute_cypher_query.py +69 -53
- robosystems_client/api/schema/export_graph_schema.py +223 -65
- robosystems_client/api/schema/get_graph_schema.py +137 -79
- robosystems_client/api/schema/validate_schema.py +5 -45
- robosystems_client/api/subgraphs/create_subgraph.py +5 -45
- robosystems_client/api/subgraphs/delete_subgraph.py +5 -45
- robosystems_client/api/subgraphs/get_subgraph_info.py +5 -49
- robosystems_client/api/subgraphs/get_subgraph_quota.py +5 -49
- robosystems_client/api/subgraphs/list_subgraphs.py +5 -49
- robosystems_client/api/tables/delete_file.py +181 -301
- robosystems_client/api/tables/get_file_info.py +117 -265
- robosystems_client/api/tables/get_upload_url.py +193 -389
- robosystems_client/api/tables/ingest_tables.py +277 -465
- robosystems_client/api/tables/list_table_files.py +193 -373
- robosystems_client/api/tables/list_tables.py +189 -361
- robosystems_client/api/tables/query_tables.py +85 -141
- robosystems_client/api/tables/update_file_status.py +205 -349
- robosystems_client/api/user/create_user_api_key.py +1 -41
- robosystems_client/api/user/get_all_credit_summaries.py +14 -111
- robosystems_client/api/user/get_current_user.py +14 -75
- robosystems_client/api/user/list_user_api_keys.py +14 -75
- robosystems_client/api/user/revoke_user_api_key.py +1 -45
- robosystems_client/api/user/update_user.py +1 -41
- robosystems_client/api/user/update_user_api_key.py +1 -41
- robosystems_client/api/user/update_user_password.py +1 -41
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -38
- robosystems_client/api/user_analytics/get_user_usage_overview.py +14 -75
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +14 -105
- robosystems_client/api/user_limits/get_shared_repository_limits.py +1 -45
- robosystems_client/api/user_limits/get_user_limits.py +14 -75
- robosystems_client/api/user_limits/get_user_usage.py +14 -75
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +1 -45
- robosystems_client/api/user_subscriptions/get_repository_credits.py +1 -45
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +14 -75
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -38
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +1 -41
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +1 -41
- robosystems_client/extensions/__init__.py +8 -1
- robosystems_client/extensions/auth_integration.py +1 -2
- robosystems_client/extensions/query_client.py +3 -2
- robosystems_client/extensions/sse_client.py +1 -1
- robosystems_client/extensions/table_ingest_client.py +5 -0
- robosystems_client/extensions/utils.py +2 -2
- robosystems_client/models/__init__.py +4 -4
- robosystems_client/models/create_graph_request.py +4 -3
- robosystems_client/models/cypher_query_request.py +5 -22
- robosystems_client/models/schema_export_response.py +4 -2
- robosystems_client/models/schema_info_response.py +77 -0
- robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
- robosystems_client/models/schema_validation_response.py +7 -6
- robosystems_client/models/table_query_request.py +37 -2
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +103 -102
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -9,35 +9,19 @@ from ...models.bulk_ingest_request import BulkIngestRequest
|
|
|
9
9
|
from ...models.bulk_ingest_response import BulkIngestResponse
|
|
10
10
|
from ...models.error_response import ErrorResponse
|
|
11
11
|
from ...models.http_validation_error import HTTPValidationError
|
|
12
|
-
from ...types import
|
|
12
|
+
from ...types import Response
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def _get_kwargs(
|
|
16
16
|
graph_id: str,
|
|
17
17
|
*,
|
|
18
18
|
body: BulkIngestRequest,
|
|
19
|
-
token: Union[None, Unset, str] = UNSET,
|
|
20
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
21
19
|
) -> dict[str, Any]:
|
|
22
20
|
headers: dict[str, Any] = {}
|
|
23
|
-
if not isinstance(authorization, Unset):
|
|
24
|
-
headers["authorization"] = authorization
|
|
25
|
-
|
|
26
|
-
params: dict[str, Any] = {}
|
|
27
|
-
|
|
28
|
-
json_token: Union[None, Unset, str]
|
|
29
|
-
if isinstance(token, Unset):
|
|
30
|
-
json_token = UNSET
|
|
31
|
-
else:
|
|
32
|
-
json_token = token
|
|
33
|
-
params["token"] = json_token
|
|
34
|
-
|
|
35
|
-
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
36
21
|
|
|
37
22
|
_kwargs: dict[str, Any] = {
|
|
38
23
|
"method": "post",
|
|
39
24
|
"url": f"/v1/graphs/{graph_id}/tables/ingest",
|
|
40
|
-
"params": params,
|
|
41
25
|
}
|
|
42
26
|
|
|
43
27
|
_kwargs["json"] = body.to_dict()
|
|
@@ -107,123 +91,80 @@ def sync_detailed(
|
|
|
107
91
|
*,
|
|
108
92
|
client: AuthenticatedClient,
|
|
109
93
|
body: BulkIngestRequest,
|
|
110
|
-
token: Union[None, Unset, str] = UNSET,
|
|
111
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
112
94
|
) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
\"table_name\": \"Entity\",
|
|
183
|
-
\"status\": \"success\",
|
|
184
|
-
\"rows_ingested\": 5000,
|
|
185
|
-
\"execution_time_ms\": 3200.1,
|
|
186
|
-
\"error\": null
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**Concurrency Control:**
|
|
193
|
-
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
194
|
-
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
195
|
-
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
196
|
-
|
|
197
|
-
**Tips:**
|
|
198
|
-
- Only files with 'uploaded' status are processed
|
|
199
|
-
- Tables with no uploaded files are skipped
|
|
200
|
-
- Use `ignore_errors=false` for strict validation
|
|
201
|
-
- Monitor progress via per-table results
|
|
202
|
-
- Check graph metadata for rebuild status
|
|
203
|
-
- Wait for current ingestion to complete before starting another
|
|
204
|
-
|
|
205
|
-
**Note:**
|
|
206
|
-
Table ingestion is included - no credit consumption.
|
|
207
|
-
|
|
208
|
-
Args:
|
|
209
|
-
graph_id (str): Graph database identifier
|
|
210
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
211
|
-
authorization (Union[None, Unset, str]):
|
|
212
|
-
body (BulkIngestRequest):
|
|
213
|
-
|
|
214
|
-
Raises:
|
|
215
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
216
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
217
|
-
|
|
218
|
-
Returns:
|
|
219
|
-
Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]
|
|
220
|
-
"""
|
|
95
|
+
"""Ingest Tables to Graph
|
|
96
|
+
|
|
97
|
+
Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database.
|
|
98
|
+
|
|
99
|
+
Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database.
|
|
100
|
+
Processes all tables in a single bulk operation with comprehensive error handling and metrics.
|
|
101
|
+
|
|
102
|
+
**Use Cases:**
|
|
103
|
+
- Initial graph population from uploaded data
|
|
104
|
+
- Incremental data updates with new files
|
|
105
|
+
- Complete database rebuild from source files
|
|
106
|
+
- Recovery from failed ingestion attempts
|
|
107
|
+
|
|
108
|
+
**Workflow:**
|
|
109
|
+
1. Upload data files via `POST /tables/{table_name}/files`
|
|
110
|
+
2. Files are validated and marked as 'uploaded'
|
|
111
|
+
3. Trigger ingestion: `POST /tables/ingest`
|
|
112
|
+
4. DuckDB staging tables created from S3 patterns
|
|
113
|
+
5. Data copied row-by-row from DuckDB to Kuzu
|
|
114
|
+
6. Per-table results and metrics returned
|
|
115
|
+
|
|
116
|
+
**Rebuild Feature:**
|
|
117
|
+
Setting `rebuild=true` regenerates the entire graph database from scratch:
|
|
118
|
+
- Deletes existing Kuzu database
|
|
119
|
+
- Recreates with fresh schema from active GraphSchema
|
|
120
|
+
- Ingests all data files
|
|
121
|
+
- Safe operation - S3 is source of truth
|
|
122
|
+
- Useful for schema changes or data corrections
|
|
123
|
+
- Graph marked as 'rebuilding' during process
|
|
124
|
+
|
|
125
|
+
**Error Handling:**
|
|
126
|
+
- Per-table error isolation with `ignore_errors` flag
|
|
127
|
+
- Partial success support (some tables succeed, some fail)
|
|
128
|
+
- Detailed error reporting per table
|
|
129
|
+
- Graph status tracking throughout process
|
|
130
|
+
- Automatic failure recovery and cleanup
|
|
131
|
+
|
|
132
|
+
**Performance:**
|
|
133
|
+
- Processes all tables in sequence
|
|
134
|
+
- Each table timed independently
|
|
135
|
+
- Total execution metrics provided
|
|
136
|
+
- Scales to thousands of files
|
|
137
|
+
- Optimized for large datasets
|
|
138
|
+
|
|
139
|
+
**Concurrency Control:**
|
|
140
|
+
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
141
|
+
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
142
|
+
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
143
|
+
|
|
144
|
+
**Important Notes:**
|
|
145
|
+
- Only files with 'uploaded' status are processed
|
|
146
|
+
- Tables with no uploaded files are skipped
|
|
147
|
+
- Use `ignore_errors=false` for strict validation
|
|
148
|
+
- Monitor progress via per-table results
|
|
149
|
+
- Check graph metadata for rebuild status
|
|
150
|
+
- Wait for current ingestion to complete before starting another
|
|
151
|
+
- Table ingestion is included - no credit consumption
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
graph_id (str):
|
|
155
|
+
body (BulkIngestRequest):
|
|
156
|
+
|
|
157
|
+
Raises:
|
|
158
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]
|
|
163
|
+
"""
|
|
221
164
|
|
|
222
165
|
kwargs = _get_kwargs(
|
|
223
166
|
graph_id=graph_id,
|
|
224
167
|
body=body,
|
|
225
|
-
token=token,
|
|
226
|
-
authorization=authorization,
|
|
227
168
|
)
|
|
228
169
|
|
|
229
170
|
response = client.get_httpx_client().request(
|
|
@@ -238,124 +179,81 @@ def sync(
|
|
|
238
179
|
*,
|
|
239
180
|
client: AuthenticatedClient,
|
|
240
181
|
body: BulkIngestRequest,
|
|
241
|
-
token: Union[None, Unset, str] = UNSET,
|
|
242
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
243
182
|
) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
\"table_name\": \"Entity\",
|
|
314
|
-
\"status\": \"success\",
|
|
315
|
-
\"rows_ingested\": 5000,
|
|
316
|
-
\"execution_time_ms\": 3200.1,
|
|
317
|
-
\"error\": null
|
|
318
|
-
}
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
**Concurrency Control:**
|
|
324
|
-
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
325
|
-
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
326
|
-
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
327
|
-
|
|
328
|
-
**Tips:**
|
|
329
|
-
- Only files with 'uploaded' status are processed
|
|
330
|
-
- Tables with no uploaded files are skipped
|
|
331
|
-
- Use `ignore_errors=false` for strict validation
|
|
332
|
-
- Monitor progress via per-table results
|
|
333
|
-
- Check graph metadata for rebuild status
|
|
334
|
-
- Wait for current ingestion to complete before starting another
|
|
335
|
-
|
|
336
|
-
**Note:**
|
|
337
|
-
Table ingestion is included - no credit consumption.
|
|
338
|
-
|
|
339
|
-
Args:
|
|
340
|
-
graph_id (str): Graph database identifier
|
|
341
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
342
|
-
authorization (Union[None, Unset, str]):
|
|
343
|
-
body (BulkIngestRequest):
|
|
344
|
-
|
|
345
|
-
Raises:
|
|
346
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
347
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
348
|
-
|
|
349
|
-
Returns:
|
|
350
|
-
Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]
|
|
351
|
-
"""
|
|
183
|
+
"""Ingest Tables to Graph
|
|
184
|
+
|
|
185
|
+
Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database.
|
|
186
|
+
|
|
187
|
+
Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database.
|
|
188
|
+
Processes all tables in a single bulk operation with comprehensive error handling and metrics.
|
|
189
|
+
|
|
190
|
+
**Use Cases:**
|
|
191
|
+
- Initial graph population from uploaded data
|
|
192
|
+
- Incremental data updates with new files
|
|
193
|
+
- Complete database rebuild from source files
|
|
194
|
+
- Recovery from failed ingestion attempts
|
|
195
|
+
|
|
196
|
+
**Workflow:**
|
|
197
|
+
1. Upload data files via `POST /tables/{table_name}/files`
|
|
198
|
+
2. Files are validated and marked as 'uploaded'
|
|
199
|
+
3. Trigger ingestion: `POST /tables/ingest`
|
|
200
|
+
4. DuckDB staging tables created from S3 patterns
|
|
201
|
+
5. Data copied row-by-row from DuckDB to Kuzu
|
|
202
|
+
6. Per-table results and metrics returned
|
|
203
|
+
|
|
204
|
+
**Rebuild Feature:**
|
|
205
|
+
Setting `rebuild=true` regenerates the entire graph database from scratch:
|
|
206
|
+
- Deletes existing Kuzu database
|
|
207
|
+
- Recreates with fresh schema from active GraphSchema
|
|
208
|
+
- Ingests all data files
|
|
209
|
+
- Safe operation - S3 is source of truth
|
|
210
|
+
- Useful for schema changes or data corrections
|
|
211
|
+
- Graph marked as 'rebuilding' during process
|
|
212
|
+
|
|
213
|
+
**Error Handling:**
|
|
214
|
+
- Per-table error isolation with `ignore_errors` flag
|
|
215
|
+
- Partial success support (some tables succeed, some fail)
|
|
216
|
+
- Detailed error reporting per table
|
|
217
|
+
- Graph status tracking throughout process
|
|
218
|
+
- Automatic failure recovery and cleanup
|
|
219
|
+
|
|
220
|
+
**Performance:**
|
|
221
|
+
- Processes all tables in sequence
|
|
222
|
+
- Each table timed independently
|
|
223
|
+
- Total execution metrics provided
|
|
224
|
+
- Scales to thousands of files
|
|
225
|
+
- Optimized for large datasets
|
|
226
|
+
|
|
227
|
+
**Concurrency Control:**
|
|
228
|
+
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
229
|
+
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
230
|
+
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
231
|
+
|
|
232
|
+
**Important Notes:**
|
|
233
|
+
- Only files with 'uploaded' status are processed
|
|
234
|
+
- Tables with no uploaded files are skipped
|
|
235
|
+
- Use `ignore_errors=false` for strict validation
|
|
236
|
+
- Monitor progress via per-table results
|
|
237
|
+
- Check graph metadata for rebuild status
|
|
238
|
+
- Wait for current ingestion to complete before starting another
|
|
239
|
+
- Table ingestion is included - no credit consumption
|
|
240
|
+
|
|
241
|
+
Args:
|
|
242
|
+
graph_id (str):
|
|
243
|
+
body (BulkIngestRequest):
|
|
244
|
+
|
|
245
|
+
Raises:
|
|
246
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
247
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
248
|
+
|
|
249
|
+
Returns:
|
|
250
|
+
Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]
|
|
251
|
+
"""
|
|
352
252
|
|
|
353
253
|
return sync_detailed(
|
|
354
254
|
graph_id=graph_id,
|
|
355
255
|
client=client,
|
|
356
256
|
body=body,
|
|
357
|
-
token=token,
|
|
358
|
-
authorization=authorization,
|
|
359
257
|
).parsed
|
|
360
258
|
|
|
361
259
|
|
|
@@ -364,123 +262,80 @@ async def asyncio_detailed(
|
|
|
364
262
|
*,
|
|
365
263
|
client: AuthenticatedClient,
|
|
366
264
|
body: BulkIngestRequest,
|
|
367
|
-
token: Union[None, Unset, str] = UNSET,
|
|
368
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
369
265
|
) -> Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
\"table_name\": \"Entity\",
|
|
440
|
-
\"status\": \"success\",
|
|
441
|
-
\"rows_ingested\": 5000,
|
|
442
|
-
\"execution_time_ms\": 3200.1,
|
|
443
|
-
\"error\": null
|
|
444
|
-
}
|
|
445
|
-
]
|
|
446
|
-
}
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
**Concurrency Control:**
|
|
450
|
-
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
451
|
-
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
452
|
-
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
453
|
-
|
|
454
|
-
**Tips:**
|
|
455
|
-
- Only files with 'uploaded' status are processed
|
|
456
|
-
- Tables with no uploaded files are skipped
|
|
457
|
-
- Use `ignore_errors=false` for strict validation
|
|
458
|
-
- Monitor progress via per-table results
|
|
459
|
-
- Check graph metadata for rebuild status
|
|
460
|
-
- Wait for current ingestion to complete before starting another
|
|
461
|
-
|
|
462
|
-
**Note:**
|
|
463
|
-
Table ingestion is included - no credit consumption.
|
|
464
|
-
|
|
465
|
-
Args:
|
|
466
|
-
graph_id (str): Graph database identifier
|
|
467
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
468
|
-
authorization (Union[None, Unset, str]):
|
|
469
|
-
body (BulkIngestRequest):
|
|
470
|
-
|
|
471
|
-
Raises:
|
|
472
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
473
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
474
|
-
|
|
475
|
-
Returns:
|
|
476
|
-
Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]
|
|
477
|
-
"""
|
|
266
|
+
"""Ingest Tables to Graph
|
|
267
|
+
|
|
268
|
+
Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database.
|
|
269
|
+
|
|
270
|
+
Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database.
|
|
271
|
+
Processes all tables in a single bulk operation with comprehensive error handling and metrics.
|
|
272
|
+
|
|
273
|
+
**Use Cases:**
|
|
274
|
+
- Initial graph population from uploaded data
|
|
275
|
+
- Incremental data updates with new files
|
|
276
|
+
- Complete database rebuild from source files
|
|
277
|
+
- Recovery from failed ingestion attempts
|
|
278
|
+
|
|
279
|
+
**Workflow:**
|
|
280
|
+
1. Upload data files via `POST /tables/{table_name}/files`
|
|
281
|
+
2. Files are validated and marked as 'uploaded'
|
|
282
|
+
3. Trigger ingestion: `POST /tables/ingest`
|
|
283
|
+
4. DuckDB staging tables created from S3 patterns
|
|
284
|
+
5. Data copied row-by-row from DuckDB to Kuzu
|
|
285
|
+
6. Per-table results and metrics returned
|
|
286
|
+
|
|
287
|
+
**Rebuild Feature:**
|
|
288
|
+
Setting `rebuild=true` regenerates the entire graph database from scratch:
|
|
289
|
+
- Deletes existing Kuzu database
|
|
290
|
+
- Recreates with fresh schema from active GraphSchema
|
|
291
|
+
- Ingests all data files
|
|
292
|
+
- Safe operation - S3 is source of truth
|
|
293
|
+
- Useful for schema changes or data corrections
|
|
294
|
+
- Graph marked as 'rebuilding' during process
|
|
295
|
+
|
|
296
|
+
**Error Handling:**
|
|
297
|
+
- Per-table error isolation with `ignore_errors` flag
|
|
298
|
+
- Partial success support (some tables succeed, some fail)
|
|
299
|
+
- Detailed error reporting per table
|
|
300
|
+
- Graph status tracking throughout process
|
|
301
|
+
- Automatic failure recovery and cleanup
|
|
302
|
+
|
|
303
|
+
**Performance:**
|
|
304
|
+
- Processes all tables in sequence
|
|
305
|
+
- Each table timed independently
|
|
306
|
+
- Total execution metrics provided
|
|
307
|
+
- Scales to thousands of files
|
|
308
|
+
- Optimized for large datasets
|
|
309
|
+
|
|
310
|
+
**Concurrency Control:**
|
|
311
|
+
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
312
|
+
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
313
|
+
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
314
|
+
|
|
315
|
+
**Important Notes:**
|
|
316
|
+
- Only files with 'uploaded' status are processed
|
|
317
|
+
- Tables with no uploaded files are skipped
|
|
318
|
+
- Use `ignore_errors=false` for strict validation
|
|
319
|
+
- Monitor progress via per-table results
|
|
320
|
+
- Check graph metadata for rebuild status
|
|
321
|
+
- Wait for current ingestion to complete before starting another
|
|
322
|
+
- Table ingestion is included - no credit consumption
|
|
323
|
+
|
|
324
|
+
Args:
|
|
325
|
+
graph_id (str):
|
|
326
|
+
body (BulkIngestRequest):
|
|
327
|
+
|
|
328
|
+
Raises:
|
|
329
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
330
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
331
|
+
|
|
332
|
+
Returns:
|
|
333
|
+
Response[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]
|
|
334
|
+
"""
|
|
478
335
|
|
|
479
336
|
kwargs = _get_kwargs(
|
|
480
337
|
graph_id=graph_id,
|
|
481
338
|
body=body,
|
|
482
|
-
token=token,
|
|
483
|
-
authorization=authorization,
|
|
484
339
|
)
|
|
485
340
|
|
|
486
341
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -493,124 +348,81 @@ async def asyncio(
|
|
|
493
348
|
*,
|
|
494
349
|
client: AuthenticatedClient,
|
|
495
350
|
body: BulkIngestRequest,
|
|
496
|
-
token: Union[None, Unset, str] = UNSET,
|
|
497
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
498
351
|
) -> Optional[Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]]:
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
\"table_name\": \"Entity\",
|
|
569
|
-
\"status\": \"success\",
|
|
570
|
-
\"rows_ingested\": 5000,
|
|
571
|
-
\"execution_time_ms\": 3200.1,
|
|
572
|
-
\"error\": null
|
|
573
|
-
}
|
|
574
|
-
]
|
|
575
|
-
}
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
**Concurrency Control:**
|
|
579
|
-
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
580
|
-
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
581
|
-
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
582
|
-
|
|
583
|
-
**Tips:**
|
|
584
|
-
- Only files with 'uploaded' status are processed
|
|
585
|
-
- Tables with no uploaded files are skipped
|
|
586
|
-
- Use `ignore_errors=false` for strict validation
|
|
587
|
-
- Monitor progress via per-table results
|
|
588
|
-
- Check graph metadata for rebuild status
|
|
589
|
-
- Wait for current ingestion to complete before starting another
|
|
590
|
-
|
|
591
|
-
**Note:**
|
|
592
|
-
Table ingestion is included - no credit consumption.
|
|
593
|
-
|
|
594
|
-
Args:
|
|
595
|
-
graph_id (str): Graph database identifier
|
|
596
|
-
token (Union[None, Unset, str]): JWT token for SSE authentication
|
|
597
|
-
authorization (Union[None, Unset, str]):
|
|
598
|
-
body (BulkIngestRequest):
|
|
599
|
-
|
|
600
|
-
Raises:
|
|
601
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
602
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
603
|
-
|
|
604
|
-
Returns:
|
|
605
|
-
Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]
|
|
606
|
-
"""
|
|
352
|
+
"""Ingest Tables to Graph
|
|
353
|
+
|
|
354
|
+
Load all files from S3 into DuckDB staging tables and ingest into Kuzu graph database.
|
|
355
|
+
|
|
356
|
+
Orchestrates the complete data pipeline from S3 staging files into the Kuzu graph database.
|
|
357
|
+
Processes all tables in a single bulk operation with comprehensive error handling and metrics.
|
|
358
|
+
|
|
359
|
+
**Use Cases:**
|
|
360
|
+
- Initial graph population from uploaded data
|
|
361
|
+
- Incremental data updates with new files
|
|
362
|
+
- Complete database rebuild from source files
|
|
363
|
+
- Recovery from failed ingestion attempts
|
|
364
|
+
|
|
365
|
+
**Workflow:**
|
|
366
|
+
1. Upload data files via `POST /tables/{table_name}/files`
|
|
367
|
+
2. Files are validated and marked as 'uploaded'
|
|
368
|
+
3. Trigger ingestion: `POST /tables/ingest`
|
|
369
|
+
4. DuckDB staging tables created from S3 patterns
|
|
370
|
+
5. Data copied row-by-row from DuckDB to Kuzu
|
|
371
|
+
6. Per-table results and metrics returned
|
|
372
|
+
|
|
373
|
+
**Rebuild Feature:**
|
|
374
|
+
Setting `rebuild=true` regenerates the entire graph database from scratch:
|
|
375
|
+
- Deletes existing Kuzu database
|
|
376
|
+
- Recreates with fresh schema from active GraphSchema
|
|
377
|
+
- Ingests all data files
|
|
378
|
+
- Safe operation - S3 is source of truth
|
|
379
|
+
- Useful for schema changes or data corrections
|
|
380
|
+
- Graph marked as 'rebuilding' during process
|
|
381
|
+
|
|
382
|
+
**Error Handling:**
|
|
383
|
+
- Per-table error isolation with `ignore_errors` flag
|
|
384
|
+
- Partial success support (some tables succeed, some fail)
|
|
385
|
+
- Detailed error reporting per table
|
|
386
|
+
- Graph status tracking throughout process
|
|
387
|
+
- Automatic failure recovery and cleanup
|
|
388
|
+
|
|
389
|
+
**Performance:**
|
|
390
|
+
- Processes all tables in sequence
|
|
391
|
+
- Each table timed independently
|
|
392
|
+
- Total execution metrics provided
|
|
393
|
+
- Scales to thousands of files
|
|
394
|
+
- Optimized for large datasets
|
|
395
|
+
|
|
396
|
+
**Concurrency Control:**
|
|
397
|
+
Only one ingestion can run per graph at a time. If another ingestion is in progress,
|
|
398
|
+
you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
399
|
+
the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
400
|
+
|
|
401
|
+
**Important Notes:**
|
|
402
|
+
- Only files with 'uploaded' status are processed
|
|
403
|
+
- Tables with no uploaded files are skipped
|
|
404
|
+
- Use `ignore_errors=false` for strict validation
|
|
405
|
+
- Monitor progress via per-table results
|
|
406
|
+
- Check graph metadata for rebuild status
|
|
407
|
+
- Wait for current ingestion to complete before starting another
|
|
408
|
+
- Table ingestion is included - no credit consumption
|
|
409
|
+
|
|
410
|
+
Args:
|
|
411
|
+
graph_id (str):
|
|
412
|
+
body (BulkIngestRequest):
|
|
413
|
+
|
|
414
|
+
Raises:
|
|
415
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
416
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
417
|
+
|
|
418
|
+
Returns:
|
|
419
|
+
Union[Any, BulkIngestResponse, ErrorResponse, HTTPValidationError]
|
|
420
|
+
"""
|
|
607
421
|
|
|
608
422
|
return (
|
|
609
423
|
await asyncio_detailed(
|
|
610
424
|
graph_id=graph_id,
|
|
611
425
|
client=client,
|
|
612
426
|
body=body,
|
|
613
|
-
token=token,
|
|
614
|
-
authorization=authorization,
|
|
615
427
|
)
|
|
616
428
|
).parsed
|