Workspaces are environments that contain data by hosting Feature Stores. Every Tecton cluster contains one Workspace named
prod that has a production serving layer. This production workspace is the only workspace that can materialize or serve feature values in real-time.
You can create any number of non-production workspaces using the CLI. The workspace data can then be viewed in the Web UI and accessed via the Tecton SDK. Use non-production workspaces to perform experimental and exploratory development without affecting the production namespace.
Defining a Workspace
Create a new workspace using the CLI. The new workspace is empty in the remote Tecton cluster, with no working or committed files, until Feature Store configuration files are applied to it.
To create a new workspace based on
prod, do the following:
Create a new empty Workspace.
tecton workspace create my_workspace:
$ tecton workspace create my_workspace Created workspace "my_workspace". Switched to workspace "my_workspace". You're now on a new, empty workspace. Workspaces isolate their state, so if you run "tecton plan" Tecton will not see any existing state for this configuration.
Create a new Git branch.
To develop using the existing production state as a base, clone a new Git branch from main in which to store changes made in your workspace:
# Create a new git branch git checkout -b "my_workspace_branch" Switched to new branch "my_workspace_branch"
Apply the current state to your new workspace.
The new workspace
my_workspaceis empty. Run
tecton applyso that the new workspace reflects the current
prodstate, which has been captured in your local Git branch.
$ tecton apply ✅ Imported 11 Python modules from the feature repository ✅ Collecting local feature declarations ↓↓↓↓↓↓↓↓↓↓↓↓ Plan Start ↓↓↓↓↓↓↓↓↓↓ + Create FeaturePackage name: prod_feature owner: user ... ↑↑↑↑↑↑↑↑↑↑↑↑ Plan End ↑↑↑↑↑↑↑↑↑↑↑↑ Are you sure you want to apply this plan? [Y/n] Y All done!
You now have a development environment with a workspace and a Git branch that reflect the current state of the Tecton
Interacting with Workspaces
Once you create a workspace and apply it to the remote Tecton cluster, you can use it interactively for feature engineering and exploratory development.
When development is completed, apply the changes back to the
prod workspace by merging the new code back into the
main branch of the codebase. You can then delete the workspace or preserve it as a record of the development work.
Once you create a workspace and apply features to that workspace, data scientists can interact with and develop in it using the Tecton SDK.
To view objects in your workspace, do the following in your interactive notebook:
Switch into the new workspace using the Tecton
import tecton # Get my workspace my_experiment_workspace = tecton.get_workspace("my_workspace")
Fetch a Feature Package from the workspace:
experimental_fp = my_experiment_workspace.get_feature_package("my_experimental_feature")
Preview features from the Feature Package: