|
271 | 271 | },
|
272 | 272 | {
|
273 | 273 | "cell_type": "markdown",
|
274 |
| - "id": "vocal-titanium", |
| 274 | + "id": "sapphire-flower", |
275 | 275 | "metadata": {},
|
276 | 276 | "source": [
|
277 | 277 | "## Get data"
|
278 | 278 | ]
|
279 | 279 | },
|
280 | 280 | {
|
281 | 281 | "cell_type": "markdown",
|
282 |
| - "id": "identical-disposal", |
| 282 | + "id": "mental-ancient", |
283 | 283 | "metadata": {},
|
284 | 284 | "source": [
|
285 | 285 | "Similarly to the examples about feeding, we can get a batch of data for convenience or get individual data points for increased control."
|
286 | 286 | ]
|
287 | 287 | },
|
288 | 288 | {
|
289 | 289 | "cell_type": "markdown",
|
290 |
| - "id": "korean-recruitment", |
| 290 | + "id": "accessible-miniature", |
291 | 291 | "metadata": {},
|
292 | 292 | "source": [
|
293 | 293 | "### Batch"
|
294 | 294 | ]
|
295 | 295 | },
|
296 | 296 | {
|
297 | 297 | "cell_type": "markdown",
|
298 |
| - "id": "french-vehicle", |
| 298 | + "id": "drawn-closure", |
299 | 299 | "metadata": {},
|
300 | 300 | "source": [
|
301 |
| - "We need to prepare the data as a list of dicts having the `id` key holding a unique id of the data point." |
| 301 | + "We need to prepare the data as a list of dicts having the `id` key holding a unique id of the data point. We then get the batch from the desired schema using the [get_batch](../../reference-api.rst#get-batch) method." |
302 | 302 | ]
|
303 | 303 | },
|
304 | 304 | {
|
305 | 305 | "cell_type": "code",
|
306 | 306 | "execution_count": 8,
|
307 |
| - "id": "formal-dealing", |
| 307 | + "id": "growing-pioneer", |
308 | 308 | "metadata": {},
|
309 | 309 | "outputs": [],
|
310 | 310 | "source": [
|
|
314 | 314 | },
|
315 | 315 | {
|
316 | 316 | "cell_type": "markdown",
|
317 |
| - "id": "light-dividend", |
| 317 | + "id": "objective-apache", |
318 | 318 | "metadata": {},
|
319 | 319 | "source": [
|
320 | 320 | "### Individual data points"
|
321 | 321 | ]
|
322 | 322 | },
|
323 | 323 | {
|
324 | 324 | "cell_type": "markdown",
|
325 |
| - "id": "sophisticated-forwarding", |
| 325 | + "id": "periodic-patient", |
326 | 326 | "metadata": {},
|
327 | 327 | "source": [
|
328 | 328 | "We can get individual data points synchronously or asynchronously."
|
329 | 329 | ]
|
330 | 330 | },
|
331 | 331 | {
|
332 | 332 | "cell_type": "markdown",
|
333 |
| - "id": "drawn-cooper", |
| 333 | + "id": "thick-plaza", |
334 | 334 | "metadata": {},
|
335 | 335 | "source": [
|
336 | 336 | "#### Synchronous"
|
|
339 | 339 | {
|
340 | 340 | "cell_type": "code",
|
341 | 341 | "execution_count": 9,
|
342 |
| - "id": "isolated-murder", |
| 342 | + "id": "interpreted-warrant", |
343 | 343 | "metadata": {},
|
344 | 344 | "outputs": [],
|
345 | 345 | "source": [
|
|
348 | 348 | },
|
349 | 349 | {
|
350 | 350 | "cell_type": "markdown",
|
351 |
| - "id": "portuguese-building", |
| 351 | + "id": "surface-spending", |
352 | 352 | "metadata": {},
|
353 | 353 | "source": [
|
354 | 354 | "#### Asynchronous"
|
|
357 | 357 | {
|
358 | 358 | "cell_type": "code",
|
359 | 359 | "execution_count": 10,
|
360 |
| - "id": "essential-import", |
| 360 | + "id": "aggressive-pocket", |
361 | 361 | "metadata": {},
|
362 | 362 | "outputs": [],
|
363 | 363 | "source": [
|
|
367 | 367 | },
|
368 | 368 | {
|
369 | 369 | "cell_type": "markdown",
|
370 |
| - "id": "perceived-broad", |
| 370 | + "id": "apart-legislature", |
371 | 371 | "metadata": {},
|
372 | 372 | "source": [
|
373 | 373 | "<div class=\"alert alert-info\">\n",
|
|
378 | 378 | },
|
379 | 379 | {
|
380 | 380 | "cell_type": "markdown",
|
381 |
| - "id": "rough-buffalo", |
| 381 | + "id": "demographic-bailey", |
382 | 382 | "metadata": {},
|
383 | 383 | "source": [
|
384 | 384 | "## Update data"
|
385 | 385 | ]
|
386 | 386 | },
|
387 | 387 | {
|
388 | 388 | "cell_type": "markdown",
|
389 |
| - "id": "damaged-solution", |
| 389 | + "id": "textile-marine", |
390 | 390 | "metadata": {},
|
391 | 391 | "source": [
|
392 | 392 | "Similarly to the examples about feeding, we can update a batch of data for convenience or update individual data points for increased control."
|
393 | 393 | ]
|
394 | 394 | },
|
395 | 395 | {
|
396 | 396 | "cell_type": "markdown",
|
397 |
| - "id": "unable-sodium", |
| 397 | + "id": "civic-coalition", |
398 | 398 | "metadata": {},
|
399 | 399 | "source": [
|
400 | 400 | "### Batch"
|
401 | 401 | ]
|
402 | 402 | },
|
403 | 403 | {
|
404 | 404 | "cell_type": "markdown",
|
405 |
| - "id": "urban-radar", |
| 405 | + "id": "circular-session", |
406 | 406 | "metadata": {},
|
407 | 407 | "source": [
|
408 | 408 | "We need to prepare the data as a list of dicts having the `id` key holding a unique id of the data point, the `fields` key holding a dict with the fields to be updated and an optional `create` key with a boolean value to indicate if a data point should be created in case it does not exist (default to `False`)."
|
|
411 | 411 | {
|
412 | 412 | "cell_type": "code",
|
413 | 413 | "execution_count": 11,
|
414 |
| - "id": "brutal-third", |
| 414 | + "id": "induced-correction", |
415 | 415 | "metadata": {},
|
416 | 416 | "outputs": [],
|
417 | 417 | "source": [
|
|
426 | 426 | "]"
|
427 | 427 | ]
|
428 | 428 | },
|
| 429 | + { |
| 430 | + "cell_type": "markdown", |
| 431 | + "id": "presidential-kitchen", |
| 432 | + "metadata": {}, |
| 433 | + "source": [ |
| 434 | + "We then update the batch on the desired schema using the [update_batch](../../reference-api.rst#update-batch) method." |
| 435 | + ] |
| 436 | + }, |
429 | 437 | {
|
430 | 438 | "cell_type": "code",
|
431 | 439 | "execution_count": 12,
|
432 |
| - "id": "rural-mainstream", |
| 440 | + "id": "otherwise-directive", |
433 | 441 | "metadata": {},
|
434 | 442 | "outputs": [],
|
435 | 443 | "source": [
|
|
438 | 446 | },
|
439 | 447 | {
|
440 | 448 | "cell_type": "markdown",
|
441 |
| - "id": "statutory-sympathy", |
| 449 | + "id": "proprietary-gossip", |
442 | 450 | "metadata": {},
|
443 | 451 | "source": [
|
444 | 452 | "### Individual data points"
|
445 | 453 | ]
|
446 | 454 | },
|
447 | 455 | {
|
448 | 456 | "cell_type": "markdown",
|
449 |
| - "id": "pleasant-aquatic", |
| 457 | + "id": "resistant-dubai", |
450 | 458 | "metadata": {},
|
451 | 459 | "source": [
|
452 | 460 | "We can update individual data points synchronously or asynchronously."
|
453 | 461 | ]
|
454 | 462 | },
|
455 | 463 | {
|
456 | 464 | "cell_type": "markdown",
|
457 |
| - "id": "maritime-mounting", |
| 465 | + "id": "jewish-sixth", |
458 | 466 | "metadata": {},
|
459 | 467 | "source": [
|
460 | 468 | "#### Synchronous"
|
|
463 | 471 | {
|
464 | 472 | "cell_type": "code",
|
465 | 473 | "execution_count": 13,
|
466 |
| - "id": "consistent-nashville", |
| 474 | + "id": "varied-radio", |
467 | 475 | "metadata": {},
|
468 | 476 | "outputs": [],
|
469 | 477 | "source": [
|
|
472 | 480 | },
|
473 | 481 | {
|
474 | 482 | "cell_type": "markdown",
|
475 |
| - "id": "younger-pantyhose", |
| 483 | + "id": "champion-light", |
476 | 484 | "metadata": {},
|
477 | 485 | "source": [
|
478 | 486 | "#### Asynchronous"
|
|
481 | 489 | {
|
482 | 490 | "cell_type": "code",
|
483 | 491 | "execution_count": 14,
|
484 |
| - "id": "blank-covering", |
| 492 | + "id": "grave-china", |
485 | 493 | "metadata": {},
|
486 | 494 | "outputs": [],
|
487 | 495 | "source": [
|
|
491 | 499 | },
|
492 | 500 | {
|
493 | 501 | "cell_type": "markdown",
|
494 |
| - "id": "wrapped-adult", |
| 502 | + "id": "organized-montreal", |
495 | 503 | "metadata": {},
|
496 | 504 | "source": [
|
497 | 505 | "<div class=\"alert alert-info\">\n",
|
|
502 | 510 | },
|
503 | 511 | {
|
504 | 512 | "cell_type": "markdown",
|
505 |
| - "id": "inner-bulletin", |
| 513 | + "id": "mechanical-border", |
506 | 514 | "metadata": {},
|
507 | 515 | "source": [
|
508 | 516 | "## Delete data"
|
509 | 517 | ]
|
510 | 518 | },
|
511 | 519 | {
|
512 | 520 | "cell_type": "markdown",
|
513 |
| - "id": "special-metro", |
| 521 | + "id": "miniature-invalid", |
514 | 522 | "metadata": {},
|
515 | 523 | "source": [
|
516 | 524 | "Similarly to the examples about feeding, we can delete a batch of data for convenience or delete individual data points for increased control."
|
517 | 525 | ]
|
518 | 526 | },
|
519 | 527 | {
|
520 | 528 | "cell_type": "markdown",
|
521 |
| - "id": "patient-campbell", |
| 529 | + "id": "primary-wheel", |
522 | 530 | "metadata": {},
|
523 | 531 | "source": [
|
524 | 532 | "### Batch"
|
525 | 533 | ]
|
526 | 534 | },
|
527 | 535 | {
|
528 | 536 | "cell_type": "markdown",
|
529 |
| - "id": "plain-hamilton", |
| 537 | + "id": "cross-serum", |
530 | 538 | "metadata": {},
|
531 | 539 | "source": [
|
532 |
| - "We need to prepare the data as a list of dicts having the `id` key holding a unique id of the data point." |
| 540 | + "We need to prepare the data as a list of dicts having the `id` key holding a unique id of the data point. We then delete the batch from the desired schema using the [delete_batch](../../reference-api.rst#delete-batch) method." |
533 | 541 | ]
|
534 | 542 | },
|
535 | 543 | {
|
536 | 544 | "cell_type": "code",
|
537 | 545 | "execution_count": 15,
|
538 |
| - "id": "bacterial-calendar", |
| 546 | + "id": "healthy-spell", |
539 | 547 | "metadata": {},
|
540 | 548 | "outputs": [],
|
541 | 549 | "source": [
|
|
545 | 553 | },
|
546 | 554 | {
|
547 | 555 | "cell_type": "markdown",
|
548 |
| - "id": "express-corruption", |
| 556 | + "id": "short-mississippi", |
549 | 557 | "metadata": {},
|
550 | 558 | "source": [
|
551 | 559 | "### Individual data points"
|
552 | 560 | ]
|
553 | 561 | },
|
554 | 562 | {
|
555 | 563 | "cell_type": "markdown",
|
556 |
| - "id": "dedicated-diamond", |
| 564 | + "id": "global-tolerance", |
557 | 565 | "metadata": {},
|
558 | 566 | "source": [
|
559 | 567 | "We can delete individual data points synchronously or asynchronously."
|
560 | 568 | ]
|
561 | 569 | },
|
562 | 570 | {
|
563 | 571 | "cell_type": "markdown",
|
564 |
| - "id": "declared-consumer", |
| 572 | + "id": "handled-tucson", |
565 | 573 | "metadata": {},
|
566 | 574 | "source": [
|
567 | 575 | "#### Synchronous"
|
|
570 | 578 | {
|
571 | 579 | "cell_type": "code",
|
572 | 580 | "execution_count": 16,
|
573 |
| - "id": "previous-champion", |
| 581 | + "id": "white-chamber", |
574 | 582 | "metadata": {},
|
575 | 583 | "outputs": [],
|
576 | 584 | "source": [
|
|
579 | 587 | },
|
580 | 588 | {
|
581 | 589 | "cell_type": "markdown",
|
582 |
| - "id": "advance-nigeria", |
| 590 | + "id": "pacific-implement", |
583 | 591 | "metadata": {},
|
584 | 592 | "source": [
|
585 | 593 | "#### Asynchronous"
|
|
588 | 596 | {
|
589 | 597 | "cell_type": "code",
|
590 | 598 | "execution_count": 17,
|
591 |
| - "id": "seventh-sherman", |
| 599 | + "id": "wrapped-actor", |
592 | 600 | "metadata": {},
|
593 | 601 | "outputs": [],
|
594 | 602 | "source": [
|
|
598 | 606 | },
|
599 | 607 | {
|
600 | 608 | "cell_type": "markdown",
|
601 |
| - "id": "alpine-laptop", |
| 609 | + "id": "entitled-conservative", |
602 | 610 | "metadata": {},
|
603 | 611 | "source": [
|
604 | 612 | "<div class=\"alert alert-info\">\n",
|
|
0 commit comments