Skip to content

featurebyte.RequestColumn.point_in_time

point_in_time( ) -> RequestColumn

Description

Get a RequestColumn that represents the POINT_IN_TIME column in the request data.

Returns

  • RequestColumn

Examples

Create a feature that retrieves the timestamp of the latest invoice of a Customer.

>>> invoice_view = catalog.get_view("GROCERYINVOICE")
>>> latest_invoice = invoice_view.groupby("GroceryCustomerGuid").aggregate_over(
... value_column="Timestamp",
...   method="latest",
...   windows=[None],
...   feature_names=["Customer Latest Visit"],
... )
>>> # Create feature that computes the time since the latest invoice
>>> feature = (
...    fb.RequestColumn.point_in_time() - latest_invoice["Customer Latest Visit"]
... ).dt.hour
>>> feature.name = "Customer number of hours since last visit"