Skip to content

Commit

Permalink
updated the doc for the as_of
Browse files Browse the repository at this point in the history
  • Loading branch information
yogesh266 committed Aug 9, 2023
1 parent f2f6ee2 commit 2cd7485
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
19 changes: 9 additions & 10 deletions ads/feature_store/docs/source/dataset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,21 +245,20 @@ You can call the ``get_input_schema_dataframe()`` method of the Dataset instance
df = dataset.get_input_schema_dataframe()
df.show()
Preview
========
as_of
=======

You can call the ``preview()`` method of the Dataset instance to preview the dataset.
You can call the ``as_of()`` method of the Dataset instance to get specified point in time and time traveled data.

The ``.preview()`` method takes the following optional parameter:
- ``timestamp: date-time``. Commit timestamp for dataset
- ``version_number: int``. Version number for dataset
- ``row_count: int``. Defaults to 10. Total number of row to return
The ``.as_of()`` method takes the following optional parameter:

- ``commit_timestamp: date-time``. Commit timestamp for feature group
- ``version_number: int``. Version number for feature group

.. code-block:: python3
# Preview dataset
df = dataset.preview(row_count=50)
df.show()
# as_of feature group
df = dataset.as_of(version_number=1)
Restore
Expand Down
13 changes: 6 additions & 7 deletions ads/feature_store/docs/source/feature_group.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,21 +283,20 @@ Feature store provides an API similar to Pandas to join feature groups together
# Filter feature group
feature_group.filter(feature_group.col1 > 10).show()
Preview
as_of
=======

You can call the ``preview()`` method of the FeatureGroup instance to preview the feature group.
You can call the ``as_of()`` method of the FeatureGroup instance to get specified point in time and time traveled data.

The ``.preview()`` method takes the following optional parameter:
The ``.as_of()`` method takes the following optional parameter:

- ``timestamp: date-time``. Commit timestamp for feature group
- ``commit_timestamp: date-time``. Commit timestamp for feature group
- ``version_number: int``. Version number for feature group
- ``row_count: int``. Defaults to 10. Total number of row to return

.. code-block:: python3
# Preview feature group
df = feature_group.preview(row_count=50)
# as_of feature group
df = feature_group.as_of(version_number=1)
Restore
=======
Expand Down

0 comments on commit 2cd7485

Please sign in to comment.