Skip to main content
Version: Beta 🚧

Install the Tecton SDK

This guide covers installing the Tecton SDK in your local development environment. Once installed, the Tecton SDK can be used in a notebook environment (e.g. Jupyter Notebooks) for feature development, or through the CLI for account configuration and other utilities.

For installing the Tecton SDK in your Spark environment, please see the following guides:

Install Python

Python version support
  • The Tecton SDK for Spark (Databricks and EMR) supports Python >=3.8.
  • The Tecton SDK for Snowflake supports Python >=3.8, <3.12.

Installing more than one Tecton SDK version into the same workspace can lead to inconsistent behavior. We recommend using Pyenv or Anaconda to manage your Tecton SDK and Python installations and environments:

Pyenv

The popular Python version manager pyenv allows you to install different versions of Python, and the pyenv extension pyenv-virtualenv allows you to create a virtual environment using a specific Python version you've installed via pyenv. Once you've installed both packages, you can install Python 3.8 and create a virtual environment using it with the following commands. We use 3.8.12 as an example version of Python 3.8.

pyenv install 3.8.12
pyenv virtualenv 3.8.12 tecton
pyenv activate tecton

Anaconda

Anaconda uses an alternative package manager to the standard Python pip package management, however it can install pip packages as well. Anaconda's package repository also has pre-compiled binaries for Python versions and popular libraries which are handy if you have trouble building Python using a Python version manager.

To install Python with Anaconda:

  1. Install Anaconda. You can also use the stripped down Miniconda installer.

  2. Create a new conda environment with Python 3.8:

    conda create -n tecton python=3.8 pip`.
    # Add `nomkl` after `pip` for x86 Anaconda installs on Apple Silicon computers
  3. Activate the conda environment with: conda activate tecton

After completing your Pyenv or Anaconda installation, install the Tecton SDK.

Apple Silicon (arm64) Considerations

The Tecton SDK pip dependencies have arm64 wheels except for grpcio. To use the Tecton SDK on Apple Silicon machines:

  1. Update your macOS to Monterey 12.1 or higher.
  2. Update to the latest version of the XCode Command Line Tools.
  3. Install and compile the grpcio dependencies.

Install the Tecton SDK

The Tecton SDK is hosted on PyPI and you can install the latest version using pip. To learn more about the stable and beta Tecton SDK versions please see Release Notes.

The pip command to install the Tecton SDK depends on the compute engine you are using.

Compute EngineCommand to Install Tecton SDK
Riftpip install 'tecton[rift]>=0.9.0'
Spark 3.1pip install 'tecton[pyspark]'
Spark 3.2pip install 'tecton[pyspark3.2]'
Spark 3.3pip install tecton pyspark==3.3

If your local environment will only be used for CLI commands and not feature development or unit tests, then you can simply use pip install tecton.

Rift is currently in Public Preview and is available in Tecton 0.9+.

Validate the Tecton SDK installation

You can validate the installation using tecton version. If the installation succeeded, the output will contain the SDK version number and other information:

$ tecton version
Version: 0.5.7
Git Commit: a5ec28b4394217c27c93e9d1c4c8e721b48a4421
Build Datetime: 2022-04-11T21:19:14

In a notebook, test the Tecton version with:

import tecton
tecton.version.summary()

Log in to your Tecton Account

To authenticate your Notebook environment, use the tecton.login() method.

To authenticate your terminal, use the tecton login command.

Setting up Shell Completion (Optional)

The Tecton SDK supports shell completion (aka tab completion, autocomplete) for zsh, bash, and fish. For typical setups, shell completion can be set up as follows:

# Generate and save the Tecton auto-complete script.
tecton completion --zsh > ~/.tecton-complete.zsh

# Enable zsh auto-completion. (Not needed if you already have auto-complete enabled, e.g. are using oh-my-zsh.)
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc

# Add sourcing the script into your .zshrc.
echo '. ~/.tecton-complete.zsh' >> ~/.zshrc

Was this page helpful?

🧠 Hi! Ask me anything about Tecton!

Floating button icon