Deploying Features in a Repository to a Workspace
Your Tecton Repository contains Tecton Object Definitions which define feature pipelines and other dataflows.
When you make changes to your Repository locally and apply them to a selected
Target Workspace (using the tecton apply
CLI command), Tecton does the
following:
- Tecton identifies the diff between the Target Workspace's current state vs. the newly-applied state and validates any new or updated Object Definitions
- Tecton updates the Workspace Configuration accordingly (e.g. by setting up required pipelines, spinning up online or offline table(s), modifying Feature View definitions, connecting to new Data Sources, etc.).
- The changes are applied to the
current workspace
that is selected in your Tecton CLI. (To see the selected Workspace, run
tecton workspace show
. To change the selected Workspace, runtecton workspace select your_workspace
). - Changes that have been applied become available on your Tecton instance; for example, feature pipelines run against applied features and write the results to the online and offline stores.
Making a change to a Tecton Repository​
As an example, add the file my_entity.py
, which contains an Entity
object,
to a local Tecton Repository:
# my_repo/my_entity.py
from tecton import Entity
user = Entity(name="user", join_keys=["user_id"], description="My first entity!")
It's important to declare Tecton Objects as global variables in your Python
module. When plan
or apply
commands are run, the Tecton CLI references all
Python objects instantiated in the global
scope to identify objects in the
Tecton Repository.