Tecton CLI Setup
To set up the Tecton CLI, follow these steps:
- 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.
- The Tecton CLI for Snowflake requires Python 3.8, if you are defining transformations using
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. Using Tecton with Snowflake requires Python 3.8.
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:
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 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:
- Install Anaconda. You can also use the stripped down Miniconda installer.
Create a new
condaenvironment with Python 3.8:
conda create -n tecton python=3.8 pip`. # Add `nomkl` after `pip` for x86 Anaconda installs on Mac M1 computers
Activate the conda environment with:
conda activate tecton
After completing your Pyenv or Anaconda installation, install the Tecton CLI.
Install the Tecton CLI
Tecton CLI submodules
The Tecton CLI has three submodules available for PySpark, Databricks Connect, and Snowflake available through PyPI. Install the Tecton CLI with the appropriate submodule for your deployment.
|Data Platform||Tecton CLI Submodule||Notes|
||Supports >= PySpark 3.1. Tecton support for Spark 2 installations reached end of life on December 31, 2021.|
||Supports databricks-connect users using Databricks as their Spark compute engine. See the Databricks Connect documentation for more information.|
||Supports for Tecton on Snowflake, which uses the Snowflake compute engine. Tecton on Snowflake requires Python 3.8 if you are defining transformations using
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.
For Tecton on Snowflake Only
If you are using Tecton on Snowflake, and defining transformations using
@transformation mode="snowpark", install Snowpark 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.3.3 Git Commit: a5ec28b4394217c27c93e9d1c4c8e721b48a4421 Build Datetime: 2022-04-11T21:19:14
Use the Tecton CLI to sign in to your deployment
Automatic authentication (recommended)
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!
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