upload
upload ¶
Dataset upload and data operations.
delete_data_version
async
¶
delete_data_version(
auth: DomoAuth,
dataset_id: str,
data_id: int,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
Delete one data version by its integer dataId, tagged or untagged.
Domo terms: DELETE /api/query/v1/datasources/{id}/{dataId}. This is the only route
that can remove the untagged ("null partition") data, which delete_partition_stage_1
cannot address by tag. Other versions are untouched. Indexing is asynchronous: call
index_dataset and poll the row count before expecting the total to drop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of the dataset. |
required |
data_id
|
int
|
integer id from |
required |
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData with an empty |
Raises:
| Type | Description |
|---|---|
ValueError
|
|
Dataset_CRUD_Error
|
non-2xx response. An unknown dataset id answers HTTP 400 (not 404), proven by the no-op test cited below. |
Deleting a data_id that does not exist on an existing dataset succeeds (HTTP 200,
idempotent), see
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_delete_nonexistent_data_id_is_noop_and_missing_dataset_raises.
The effect on totals and partitions is proven by
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_delete_untagged_data_version_keeps_tagged_partitions.
Example: await delete_data_version(auth=auth, dataset_id=ds_id, data_id=1)
Endpoint
DELETE /query/v1/datasources/{}/{}
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | |
index_dataset
async
¶
index_dataset(
auth: DomoAuth,
dataset_id: str,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
Ask Domo to index all pending data versions of a dataset.
Domo terms: POST .../indexes with dataIds: []. Indexing is asynchronous: the call
returns before the queryable row count reflects new uploads or deleted versions, and
SQL queries 404 until the first index completes (both rest on observed runs, not
verified). Poll SELECT COUNT(*) until it equals the expected value; do not sleep
blindly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of an existing dataset. |
required |
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData; |
ResponseGetData
|
it cannot be passed to |
ResponseGetData
|
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_index_dataset_returns_a_request_key_not_an_index_id. |
Raises:
| Type | Description |
|---|---|
Dataset_CRUD_Error
|
non-2xx response. |
Example: await index_dataset(auth=auth, dataset_id=ds_id)
Endpoint
POST /data/v3/datasources/{}/indexes
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | |
index_status
async
¶
index_status(
auth: DomoAuth,
dataset_id: str,
index_id: str,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
Get the completion status of an index started by index_dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of the dataset that was indexed. |
required |
index_id
|
str
|
an index id. |
required |
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData; |
Raises:
| Type | Description |
|---|---|
Dataset_GET_Error
|
non-2xx response. |
Example: await index_status(auth=auth, dataset_id=ds_id, index_id=idx)
Endpoint
GET /data/v3/datasources/{}/indexes/{}/statuses
Source code in src/crew_dcs/routes/dataset/upload.py
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 | |
list_data_versions
async
¶
list_data_versions(
auth: DomoAuth,
dataset_id: str,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
List every data version (dataId) of a dataset, tagged AND untagged.
Domo terms: GET /api/data/v3/datasources/{id}/partitions. A REPLACE commit and a
tagged commit each create one data version. Unlike list_partitions, this includes the untagged
("null partition") version, which has partitionId None. A dataset with no data
yet, and an id Domo does not know, both return an empty list rather than an error,
see tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_delete_nonexistent_data_id_is_noop_and_missing_dataset_raises.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of the dataset. |
required |
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData whose |
ResponseGetData
|
|
ResponseGetData
|
use |
Raises:
| Type | Description |
|---|---|
Dataset_GET_Error
|
non-2xx response. |
The untagged version is listed distinctly from tagged ones, see
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_tagged_upload_is_additive_and_untagged_version_is_listed. After
delete_data_version the deleted id disappears from this list, see
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_delete_untagged_data_version_keeps_tagged_partitions.
Example: versions = (await list_data_versions(auth=auth, dataset_id=ds_id)).response
Endpoint
GET /data/v3/datasources/{}/partitions
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
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 569 570 571 572 | |
list_partitions
async
¶
list_partitions(
auth: DomoAuth,
dataset_id: str,
body: dict | None = None,
debug_loop: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
List the TAGGED partitions of a dataset (not the untagged data).
Domo terms: POST /api/query/v1/datasources/{id}/partition/list, paged with limit/offset in the body until exhausted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of an existing dataset. |
required |
body
|
dict | None
|
optional request body; defaults to |
None
|
debug_loop
|
bool
|
log each page of the paging loop. |
False
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData whose |
ResponseGetData
|
|
Raises:
| Type | Description |
|---|---|
DatasetNotFoundError
|
Domo answered 404 "Not Found". |
Dataset_GET_Error
|
any other non-2xx response. |
Untagged ("null partition") data is NOT listed here even though it counts toward the
dataset total; use list_data_versions to see it, see
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_tagged_upload_is_additive_and_untagged_version_is_listed.
Example: parts = (await list_partitions(auth=auth, dataset_id=ds_id)).response
Endpoint
POST /query/v1/datasources/{}/partition/list
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
upload_dataset_stage_1
async
¶
upload_dataset_stage_1(
auth: DomoAuth,
dataset_id: str,
partition_tag: str | None = None,
*,
context: RouteContext | None = None,
return_raw: bool = False,
**context_kwargs,
) -> ResponseGetData
Open an upload session (stage 1 of 3) and return its upload_id.
Domo terms: POST /api/data/v3/datasources/{id}/uploads. Nothing is visible in the dataset until stage 3 commits the session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of an existing dataset. |
required |
partition_tag
|
str | None
|
optional data tag (a partition key such as "2025-01"). When set the
session is opened with |
None
|
return_raw
|
bool
|
return the raw response instead of unwrapping the upload id. |
False
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData whose |
ResponseGetData
|
|
Raises:
| Type | Description |
|---|---|
UploadDataError
|
non-2xx response, or no |
Related: stage 2 is upload_dataset_stage_2_df/_file, stage 3 is
upload_dataset_stage_3; DomoDataset_Data.upload_data runs all three.
Tagged uploads add a data version next to untagged data, see
tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_tagged_upload_is_additive_and_untagged_version_is_listed.
Example: upload_id = (await upload_dataset_stage_1(auth=auth, dataset_id=ds_id)).response
Endpoint
POST /data/v3/datasources/{}/uploads
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
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 | |
upload_dataset_stage_2_df
async
¶
upload_dataset_stage_2_df(
auth: DomoAuth,
dataset_id: str,
upload_id: str,
upload_df: DataFrame,
part_id: int = 2,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
Upload a DataFrame as one part of an open upload session (stage 2 of 3).
The frame is serialised as header-less CSV, so its columns must be in the dataset schema's order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of the dataset the session belongs to. |
required |
upload_id
|
str
|
id returned by |
required |
upload_df
|
DataFrame
|
rows to send. |
required |
part_id
|
int
|
1-based part number; use distinct ids to stream several parts into one session. |
2
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData with |
Raises:
| Type | Description |
|---|---|
UploadDataError
|
non-2xx response (stage 2). |
The data is not live until upload_dataset_stage_3 commits the session.
Example: await upload_dataset_stage_2_df(auth=auth, dataset_id=ds_id, upload_id=up_id, upload_df=df, part_id=1)
Endpoint
PUT /data/v3/datasources/{}/uploads/{}/parts/{}
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
upload_dataset_stage_2_file
async
¶
upload_dataset_stage_2_file(
auth: DomoAuth,
dataset_id: str,
upload_id: str,
data_file: TextIOWrapper | None = None,
part_id: int = 2,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
Upload a CSV file object as one part of an open upload session (stage 2 of 3).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of the dataset the session belongs to. |
required |
upload_id
|
str
|
id returned by |
required |
data_file
|
TextIOWrapper | None
|
open text file of header-less CSV rows matching the dataset schema. |
None
|
part_id
|
int
|
1-based part number; use distinct ids to stream several parts into one session. |
2
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData with |
Raises:
| Type | Description |
|---|---|
UploadDataError
|
non-2xx response (stage 2). |
The data is not live until upload_dataset_stage_3 commits the session.
Example: await upload_dataset_stage_2_file(auth=auth, dataset_id=ds_id, upload_id=up_id, data_file=fh, part_id=1)
Endpoint
PUT /data/v3/datasources/{}/uploads/{}/parts/{}
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
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 | |
upload_dataset_stage_3
async
¶
upload_dataset_stage_3(
auth: DomoAuth,
dataset_id: str,
upload_id: str,
update_method: str = "REPLACE",
partition_tag: str | None = None,
is_index: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs,
) -> ResponseGetData
Commit an upload session (stage 3 of 3), creating a new data version.
Domo terms: PUT .../uploads/{upload_id}/commit. A REPLACE or tagged commit creates a
data version (a dataId); see list_data_versions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Domo auth for the target instance. |
required |
dataset_id
|
str
|
id of the dataset the session belongs to. |
required |
upload_id
|
str
|
id returned by |
required |
update_method
|
str
|
"REPLACE" (new data replaces the untagged dataset contents) or
"APPEND". Ignored when |
'REPLACE'
|
partition_tag
|
str | None
|
data tag (partition key) to store the rows under; None for untagged. |
None
|
is_index
|
bool
|
ask Domo to index in the same call. Indexing is asynchronous; row counts are stale until it finishes (poll the count rather than sleeping). |
False
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData with |
Raises:
| Type | Description |
|---|---|
UploadDataError
|
non-2xx response (stage 3). |
A tagged commit does NOT replace or remove untagged data; both stay in the total, see tests/integration/api_semantics/dataset_data_version_semantics_tests.py::test_tagged_upload_is_additive_and_untagged_version_is_listed.
Example: await upload_dataset_stage_3(auth=auth, dataset_id=ds_id, upload_id=up_id, partition_tag="2025-01")
Endpoint
PUT /data/v3/datasources/{}/uploads/{}/commit
Called by
Source code in src/crew_dcs/routes/dataset/upload.py
243 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 314 315 316 317 318 319 | |
See also¶
Domo Knowledge Base categories
- Connect Data (connectors, Data Center, accounts) (partial coverage)
- Manage Data (DataSets, DataSet Views, PDP, tags)