Skip to main content
Version: Beta 🚧

tecton.Workspace

Summary​

Workspace class.

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​

NameDescription
__init__(...)Fetch an existing tecton.Workspace by name.
get_all(...)Deprecated.
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_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_transformations()Returns a list of all registered Transformations within a workspace.
delete_dataset(...)Deletes a Dataset that has been saved to this workspace.
summary()Returns workspace metadata.

__init__(...)​

Fetch an existing tecton.Workspace by name.

Parameters​

  • workspace (str) – Workspace name.
  • _is_live (Default: None)
  • _validate (Default: True)

@classmethod get_all(...)​

Deprecated. Use tecton.list_workspaces() instead. Returns a list of all registered Workspaces.

Parameters​

  • self

Returns​

A list of Workspace objects.

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.

get_dataset(...)​

Returns a Dataset that has been saved to this workspace.

Parameters​

  • name (str) – The name of the Dataset to retrieve.

get_entity(...)​

Returns an Entity that has been applied to a workspace.

Parameters​

  • name (str) – The name of the Entity to retrieve.

get_feature_freshness()​

Returns feature freshness status for Feature Views and Tables.

Returns​

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.

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.

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.

get_transformation(...)​

Returns a Transformation that has been applied to a workspace.

Parameters​

  • name (str) – The name of the Transformation to retrieve.

list_data_sources()​

Returns a list of all registered Data Sources within a workspace.

Returns​

List of strings of data source names

list_datasets()​

Returns a list of all saved Datasets within a workspace.

Returns​

List of strings of dataset names

list_entities()​

Returns a list of all registered Entities within a workspace.

Returns​

List of strings of entity names

list_feature_services()​

Returns a list of all registered Feature Services within a workspace.

Returns​

List of strings of feature service names

list_feature_tables()​

Returns a list of all registered Feature Tables within a workspace.

Returns​

List of strings of feature table names

list_feature_views()​

Returns a list of all registered Feature Views within a workspace.

Returns​

List of strings of feature view names

list_transformations()​

Returns a list of all registered Transformations within a workspace.

Returns​

List of strings of transformation names

summary()​

Returns workspace metadata.

Returns​

Displayable of metadata for this workspace. Use to_dict() for a parseable representation.

delete_dataset(...)​

Deletes a Dataset that has been saved to this workspace.

Parameters​

  • name (str) – The name of the Dataset to delete.

Was this page helpful?

Happy React is loading...