tecton.Workspace¶
-
class
tecton.
Workspace
(workspace, _is_live=None, _validate=True)¶ Workspace class.
This class represents a Workspace. The Workspace class is used to fetch Tecton Objects, which are stored in a Workspace.
Examples of using the Workspace methods for accessing Tecton first class objects:
import tecton WORKSPACE_NAME = "jsd_tecton_wksp" workspace = tecton.Workspace(WORKSPACE_NAME) # For a specified workspace, list high-level registered Objects print(f" Entities : {workspace.list_entities()}") print(f" Feature Data Sources: {workspace.list_data_sources()}") print(f" Feature Views : {workspace.list_feature_views()}") print(f" Feature Services : {workspace.list_feature_services()}") print(f" Transformations : {workspace.list_transformations()}") print(f" Feature Tables : {workspace.list_feature_tables()}") print(f" List of Workspaces : {tecton.list_workspaces()}")
The output: Entities : ['ad', 'auction', 'content', 'ContentKeyword', 'ads_user', 'fraud_user'] Feature Data Sources: ['ad_impressions_stream', 'ad_impressions_batch', 'transactions_stream', 'transactions_batch', 'users_batch', 'credit_scores_batch'] Feature Views : ['user_has_great_credit', 'user_age', 'transaction_amount_is_high', 'transaction_amount_is_higher_than_average', 'transaction_bucketing', 'user_ctr_7d_2', ... 'user_ad_impression_counts', 'content_keyword_click_counts'] Feature Services : ['ad_ctr_feature_service', 'fraud_detection_feature_service', 'fraud_detection_feature_service:v2', 'minimal_fs', 'continuous_feature_service'] Transformations : ['content_keyword_click_counts', 'user_ad_impression_counts', 'user_click_counts', 'user_impression_counts', 'user_ctr_7d', 'user_ctr_7d_2', 'user_distinct_ad_count_7d', ... 'weekend_transaction_count_n_days', 'user_has_good_credit_sql'] Feature Tables : ['user_login_counts', 'user_page_click_feature_table'] List of Workspaces : ['jsd_tecton_wksp, 'kafka_streaming_staging, 'kafka_streaming_production', ... 'on_demand_streaming_aggregation_pipeline']
Methods
Fetch an existing
tecton.Workspace
by name.Returns a list of all registered Workspaces.
Returns a
BatchDataSource
orStreamDataSource
within a workspace.Returns a
tecton.interactive.Dataset
within a workspace.Returns an
tecton.interactive.Entity
within a workspace.Returns a
tecton.interactive.FeatureService
within a workspace.Returns a
tecton.interactive.FeatureTable
within a workspace.Returns a FeatureView within a workspace.
Returns a
tecton.interactive.Transformation
within a workspace.Returns a list of all registered DataSources within a workspace.
Returns a list of all registered Datasets within a workspace.
Returns a list of all registered Entities within a workspace.
Returns a list of all registered FeatureServices within a workspace.
Returns a list of all registered FeatureTables within a workspace.
Returns a list of all registered FeatureViews within a workspace.
Returns a list of all registered Transformations within a workspace.
-
__init__
(workspace, _is_live=None, _validate=True)¶ Fetch an existing
tecton.Workspace
by name.- Parameters
workspace (
str
) – Workspace name.
-
classmethod
get_all
(self)¶ Returns a list of all registered Workspaces.
- Returns
A list of Workspace objects.
-
get_data_source
(name)¶ Returns a
BatchDataSource
orStreamDataSource
within a workspace.- Parameters
name (
str
) – BatchDataSource or StreamDataSource name.- Returns
the named BatchDataSource or StreamDataSource
-
get_dataset
(name)¶ Returns a
tecton.interactive.Dataset
within a workspace.- Parameters
name – Dataset name.
- Returns
the named Dataset
-
get_entity
(name)¶ Returns an
tecton.interactive.Entity
within a workspace.- Parameters
name (
str
) – Entity name.- Returns
the named Entity
-
get_feature_service
(name)¶ Returns a
tecton.interactive.FeatureService
within a workspace.- Parameters
name (
str
) – FeatureService name.- Returns
the named FeatureService
-
get_feature_table
(name)¶ Returns a
tecton.interactive.FeatureTable
within a workspace.- Parameters
name (
str
) – FeatureTable name- Returns
the named FeatureTable
-
get_feature_view
(name)¶ Returns a FeatureView within a workspace.
- Parameters
name (
str
) – FeatureView name- Returns
BatchFeatureView
,BatchWindowAggregateFeatureView
,StreamFeatureView
,StreamWindowAggregateFeatureView
, orOnDemandFeatureView
-
get_transformation
(name)¶ Returns a
tecton.interactive.Transformation
within a workspace.- Parameters
name (
str
) – Transformation name.- Returns
the named Transformation
-
list_data_sources
()¶ Returns a list of all registered DataSources within a workspace.
- Returns
A list of strings.
-
list_datasets
()¶ Returns a list of all registered Datasets within a workspace.
- Returns
A list of strings.
-
list_entities
()¶ Returns a list of all registered Entities within a workspace.
- Returns
A list of strings.
-
list_feature_services
()¶ Returns a list of all registered FeatureServices within a workspace.
- Returns
A list of strings.
-
list_feature_tables
()¶ Returns a list of all registered FeatureTables within a workspace.
- Returns
A list of strings.
-
list_feature_views
()¶ Returns a list of all registered FeatureViews within a workspace.
- Returns
A list of strings.
-
list_transformations
()¶ Returns a list of all registered Transformations within a workspace.
- Returns
A list of strings.
-
summary
()¶
-