Skip to main content
Version: 0.4

Installing the Tecton CLI

note

This page is for the Tecton CLI on a terminal (typically on a laptop).

For installation information for the tecton package for use in interactive notebooks. Please refer to the instructions for your particular environment:

The Tecton CLI is primarily used for managing workspaces, applying feature repository changes to a workspace (via the tecton apply command), and creating API keys.

To set up the Tecton CLI on a terminal (typically on a laptop), follow these steps:

Install Python​

note
  • The Tecton CLI for Spark (Databricks and EMR) supports Python 3.7, 3.8, and 3.9.
  • The Tecton CLI for Snowflake requires Python 3.8, if you are defining transformations using @transformation mode="snowpark".

If you are joining a team that already uses Tecton, install the version of the Tecton CLI and the same version of Python that are already in use in your organization.

New users should aim to install the most recent version of the Tecton CLI and of Python. Using Tecton with Snowflake requires Python 3.8.

Python Environments​

Installing more than one Tecton CLI version into the same workspace can lead to inconsistent behavior. We recommend using Pyenv or Anaconda to manage your Tecton CLI 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 Mac M1 computers
  3. Activate the conda environment with: conda activate tecton

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

Apple M1 (arm64) Silicon Considerations​

The Tecton CLI >= 0.4 supports Mac M1 machines without depending on the Rosetta2 library. The Tecton CLI pip dependencies have arm64 wheels except for grpcio. To use the Tecton CLI >= 0.4 on Mac M1 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.

Contact Tecton support if you encounter any difficulties installing Tecton >= 0.4 with Monterey >= 12.1 on Mac M1 machines.

Install the Tecton CLI​

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

The pip command to install the Tecton CLI depends on the data platform you are using, as follows.

Data PlatformCommand to Install Tecton CLINotes
Sparkpip install tectonTecton support for Spark 2 installations reached end of life on December 31, 2021.
Databrickspip install 'tecton[databricks-connect]'Supports databricks-connect users using Databricks as their Spark compute engine. See the Databricks Connect documentation for more information.
Snowflakepip install 'tecton[snowflake]'Supports for Tecton on Snowflake, which uses the Snowflake compute engine. Tecton on Snowflake requires Python 3.8 if using Snowpark.

Installation of the Tecton CLI when unit tests will be run​

If you are using Spark and you will be running unit tests, use one of the following commands, instead of pip install tecton, to install the Tecton CLI:

  • To install with Pyspark 3.1: pip install 'tecton[pyspark]'
  • To install with Pyspark 3.2: pip install 'tecton[pyspark3.2]'
  • To install with Pyspark 3.3: pip install tecton pyspark==3.3

Tecton CLI installation examples​

👉 To install the latest stable release (recommended):

pip install tecton

👉 To install the latest beta release:

pip install --pre tecton

👉 To install a specific version of the Tecton CLI:

pip install tecton==0.5.7

The PyPI Release History page has a complete list of the Tecton CLI versions, including beta versions.

For Tecton on Snowflake Only​

If you are using Tecton on Snowflake, and defining transformations using @transformation mode="snowpark", install the Snowpark API for Python by running the command:

pip install snowflake-snowpark-python

Validate the Tecton CLI installation​

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

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

Use the Tecton CLI to sign in to your deployment​

Connect the CLI to your Tecton deployment using tecton login, which automatically authenticates and sets credentials:

$ tecton login
Enter configuration. Press enter to use current value
Tecton Cluster URL [example: https://yourco.tecton.ai]: https://foo.tecton.ai
✅ Authentication successful!

Manual authentication​

If automatic authentication fails, use the --manual flag to generate a URL where an authentication code can be found.

$ tecton login --manual
Enter configuration. Press enter to use current value
Tecton Cluster URL [example: https://yourco.tecton.ai]: https://foo.tecton.ai
Requesting authorization for Tecton CLI via browser.
If browser doesn\'t open automatically, visit the following link: <go to this URL>
Paste the authentication code here:abcdef123456789
✅ Updated configuration at /Users/username/.tecton/config

Was this page helpful?

Happy React is loading...