Skip to content

Commit 8e02543

Browse files
update description to be before code
1 parent bf43d72 commit 8e02543

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

doc/amazon_sagemaker_featurestore.rst

+10-8
Original file line numberDiff line numberDiff line change
@@ -436,38 +436,40 @@ dataset builder.
436436

437437
.. code:: python
438438
439-
dataset_builder.include_duplicated_records().to_dataframe()
439+
dataset_builder.include_duplicated_records()
440+
dataset_builder.include_deleted_records()
440441
441442
The DatasetBuilder provides `with_number_of_records_from_query_results` and
442443
`with_number_of_recent_records_by_record_identifier` methods to limit the
443444
number of records returned for the offline snapshot.
444445

445-
.. code:: python
446-
447-
dataset_builder.with_number_of_recent_records_by_record_identifier(number_of_recent_records=1).to_dataframe()
448-
449446
`with_number_of_records_from_query_results` will limit the number of records
450447
in the output. For example, when N = 100, only 100 records are going to be
451448
returned in either the csv or dataframe.
452449

453450
.. code:: python
454451
455-
dataset_builder.with_number_of_records_from_query_results(number_of_records=100).to_dataframe()
452+
dataset_builder.with_number_of_records_from_query_results(number_of_records=N)
456453
457454
On the other hand, `with_number_of_recent_records_by_record_identifier` is
458455
used to deal with records which have the same identifier. They are going
459456
to be sorted according to `event_time` and return at most N recent records
460457
in the output.
461458

459+
.. code:: python
460+
461+
dataset_builder.with_number_of_recent_records_by_record_identifier(number_of_recent_records=N)
462+
462463
Since these functions return the dataset builder, these functions can
463464
be chained.
464465

465466
.. code:: python
466467
467468
dataset_builder
468-
.with_number_of_records_from_query_results(number_of_records=100)
469+
.with_number_of_records_from_query_results(number_of_records=N)
469470
.include_duplicated_records()
470-
.with_number_of_recent_records_by_record_identifier(number_of_recent_records=1)
471+
.with_number_of_recent_records_by_record_identifier(number_of_recent_records=N)
472+
.to_dataframe()
471473
472474
There are additional configurations that can be made for various use cases,
473475
such as time travel and point-in-time join. These are outlined in the

0 commit comments

Comments
 (0)