Workspace
Summary​
This class represents a Workspace. The Workspace class is used to fetch Tecton Objects, which are stored in a Workspace.Examples​
Examples of using the Workspace methods for accessing Tecton first class objects:
import tecton
workspace = tecton.get_workspace("my_workspace")
# 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" Datasets : {workspace.list_datasets()}")
print(f" List of Workspaces : {tecton.list_workspaces()}")
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']
Datasets : ['fraud_detection_training_data', 'ad_ctr_training_data']
List of Workspaces : ['jsd_tecton_wksp, 'kafka_streaming_staging, 'kafka_streaming_production',
...
'on_demand_streaming_aggregation_pipeline']
Methods​
Name | Description |
---|---|
__init__(...) | Fetch an existing tecton.Workspace by name. |
delete_dataset(...) | Deletes a Dataset that has been saved to this workspace. |
get(...) | Returns a tecton.Workspace instance for the workspace with the provided name. |
get_data_source(...) | Returns a Data Source that has been applied to a workspace. |
get_dataset(...) | Returns a Dataset that has been saved to this workspace. |
get_entity(...) | Returns an Entity that has been applied to a workspace. |
get_feature_freshness() | Returns feature freshness status for Feature Views and Tables. |
get_feature_service(...) | Returns a Feature Service that has been applied to a workspace. |
get_feature_table(...) | Returns a Feature Table that has been applied to a workspace. |
get_feature_view(...) | Returns a Feature View that has been applied to a workspace. |
get_prompt(...) | Returns a Prompt that has been applied to a workspace. |
get_transformation(...) | Returns a Transformation that has been applied to a workspace. |
list_data_sources() | Returns a list of all registered Data Sources within a workspace. |
list_datasets() | Returns a list of all saved Datasets within a workspace. |
list_entities() | Returns a list of all registered Entities within a workspace. |
list_feature_services() | Returns a list of all registered Feature Services within a workspace. |
list_feature_tables() | Returns a list of all registered Feature Tables within a workspace. |
list_feature_views() | Returns a list of all registered Feature Views within a workspace. |
list_prompts() | Returns a list of all registered Prompts within a workspace. |
list_transformations() | Returns a list of all registered Transformations within a workspace. |
summary() | Returns workspace metadata. |
__init__(...)​
Fetch an existingtecton.Workspace
by name.Parameters
workspace
(str
) - Workspace name._is_live
(Optional
[bool
]) - True if this workspace is live. Live workspaces materialize data for real-time endpoints, accessible in the production environment. Default:None
_validate
(bool
) - If True, Tecton runs validation on object creation. Default:true
delete_dataset(...)​
Deletes a Dataset that has been saved to this workspace.Parameters
name
(str
) - The name of the Dataset to delete.
get(...)​
Returns atecton.Workspace
instance for the workspace with the provided name.Parameters
name
() - The name of the workspace to retrieve.
Returns
Workspace
get_data_source(...)​
Returns a Data Source that has been applied to a workspace.Parameters
name
(str
) - The name of the Data Source to retrieve.
Returns
Union
[BatchSource
, StreamSource
]
get_dataset(...)​
Returns a Dataset that has been saved to this workspace.Parameters
name
(str
) - The name of the Dataset to retrieve.
Returns
Dataset
get_entity(...)​
Returns an Entity that has been applied to a workspace.Parameters
name
(str
) - The name of the Entity to retrieve.
Returns
Entity
get_feature_freshness()​
Returns feature freshness status for Feature Views and Tables.Returns
Union
[, str
]: Displayable containing freshness statuses for all features. Use to_dict()
for a parseable representation.
get_feature_service(...)​
Returns a Feature Service that has been applied to a workspace.Parameters
name
(str
) - The name of the Feature Service to retrieve.
Returns
FeatureService
get_feature_table(...)​
Returns a Feature Table that has been applied to a workspace.Parameters
name
(str
) - The name of the Feature Table to retrieve.
Returns
FeatureTable
get_feature_view(...)​
Returns a Feature View that has been applied to a workspace.Parameters
name
(str
) - The name of the Feature View to retrieve.
Returns
FeatureView
get_prompt(...)​
Returns a Prompt that has been applied to a workspace.Parameters
name
(str
) - The name of the Prompt to retrieve.
Returns
Prompt
get_transformation(...)​
Returns a Transformation that has been applied to a workspace.Parameters
name
(str
) - The name of the Transformation to retrieve.
Returns
Transformation
list_data_sources()​
Returns a list of all registered Data Sources within a workspace.Returns
List
[str
]: List of strings of data source names
list_datasets()​
Returns a list of all saved Datasets within a workspace.Returns
List
[str
]: List of strings of dataset names
list_entities()​
Returns a list of all registered Entities within a workspace.Returns
List
[str
]: List of strings of entity names
list_feature_services()​
Returns a list of all registered Feature Services within a workspace.Returns
List
[str
]: List of strings of feature service names
list_feature_tables()​
Returns a list of all registered Feature Tables within a workspace.Returns
List
[str
]: List of strings of feature table names
list_feature_views()​
Returns a list of all registered Feature Views within a workspace.Returns
List
[str
]: List of strings of feature view names
list_prompts()​
Returns a list of all registered Prompts within a workspace.Returns
List
[str
]: List of strings of prompt names
list_transformations()​
Returns a list of all registered Transformations within a workspace.Returns
List
[str
]: List of strings of transformation names
summary()​
Returns workspace metadata.Returns
Displayable representation of metadata for this workspace. Useto_dict()
for a parseable representation.