Skip to content

Tecton CLI Setup

To set up the Tecton CLI, follow these steps:

Install Python

Note

  • The Tecton CLI >= 0.3 supports Python 3.7, 3.8, and 3.9.
  • The Tecton CLI versions 0.1-0.2.11 require Python 3.7 or Python 3.8.

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. See the System Requirements for more information.

New users should aim to install the most recent version of the Tecton CLI and of Python.

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.

Install the Tecton CLI

Apple M1 (arm64) Silicon Considerations

The Tecton CLI >= 0.3 supports Mac M1 machines without depending on the Rosetta2 library. The Tecton CLI pipdependencies have arm64 wheels except for grpcio. To use the Tecton CLI >= 0.3 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.3 with Monterey >= 12.1 on Mac M1 machines.

If you need to install Tecton 0.2.x Mac M1 machine, contact Tecton support for assistance.

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

Tecton CLI submodules

The Tecton CLI has two submodules available (PySpark and Databricks Connect), which are available through PyPI. Install the Tecton CLI with the appropriate submodule for your deployment.

Data Platform Tecton CLI Submodule Notes
Spark tecton[pyspark] Supports >= PySpark 3.1. Tecton support for Spark 2 installations reached end of life on December 31, 2021.
Databricks tecton[databricks-connect] Supports databricks-connect users using Databricks as their Spark compute engine. See the Databricks Connect documentation for more information.

Tecton CLI installation examples

👉 To install the latest stable release (recommended):

pip install 'tecton[pyspark]'

👉 To install the latest beta release:

pip install --pre 'tecton[pyspark]'

👉 To install a specific version of the Tecton CLI:

pip install 'tecton[pyspark]==0.2.2'

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

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.3.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