tecton.Dataset
Summaryβ
Dataset class.
Persisted data consisting of entity & request keys, timestamps, and calculated
features. Datasets are associated with either a
FeatureService
or FeatureView
.
There are 2 types of Datasets: Saved and Logged.
Saved Datasets are generated manually when calling get_historical_features()
by setting the save
parameter.
Logged Datasets are generated automatically when declaring a
FeatureService
with
tecton.LoggingConfig
,
and the data is continuously added to it when requesting online data from the
FeatureService.
To get an existing Dataset, call workspace.get_dataset()
.
Attributesβ
Name | Data Type | Description |
---|---|---|
columns | List[str] | The columns of the dataframe |
is_archived | bool | |
name | Dataset name |
Methodsβ
Name | Description |
---|---|
__init__(...) | Method generated by attrs for class TectonDataFrame. |
explain(...) | Prints the query tree. |
get_spine_dataframe() | Get a tecton.TectonDataFrame containing the spine. |
get_time_range(...) | |
subtree(...) | Creates a TectonDataFrame from a subtree of prior querytree labeled by a node id in .explain(). |
summary() | Print out a summary of this classβs attributes. |
to_pandas() | Converts the Dataset to a Pandas DataFrame and returns it. |
to_snowpark () | Returns data as a Snowpark DataFrame. |
to_spark() | Converts the Dataset to a Spark DataFrame and returns it. |
__init__(...)β
Method generated by attrs for class TectonDataFrame.
Parametersβ
proto
,spark_df
pandas_df
explain(...)β
Prints the query tree. Should only be used when this TectonDataFrame is backed by a query tree.
Parametersβ
node_id
(bool
) β If True, the unique id associated with each node will be rendered. (Default:True
)name
(bool
) β If True, the class names of the nodes will be rendered. (Default:True
)description
(bool
) β If True, the actions of the nodes will be rendered. (Default:True
)columns
(bool
) β If True, the columns of each node will be rendered as an appendix after tree itself. (Default:False
)
get_spine_dataframe()β
Get a tecton.TectonDataFrame
containing the
spine.
get_time_range(...)β
Parametersβ
timestamp_key
subtree(...)β
Creates a TectonDataFrame from a subtree of prior querytree labeled by a node id in .explain().
Parametersβ
node_id
summary()β
Print out a summary of this classβs attributes.
to_pandas()β
Converts the Dataset to a Pandas DataFrame and returns it.
to_snowpark()β
Returns data as a Snowpark DataFrame.
to_spark()β
Converts the Dataset to a Spark DataFrame and returns it.