Lab: Setup Shift_left tool¶
This Lab focuses on how to get started withthe shift_left tool. This tools is not yet a public pipy module so cloning the repository and do some minimum installation are needed.
To install the CLI, which is based on Python, use a Python virtual environment like venv and a Python module manafer like pip or uv. All the development is based on uv so we recommend to use it.
1 - Preparation¶
We assume you have a Confluent Cloud account, an environment sets up, a Kafka Cluster available.
-
Clone this repository (this will not be necessary once the CLI will be available in pypi):
-
On Windows - enable WSL2. The shift_left tool was developed on Mac and tested on Linux. Windows WSL should work. Powershell will not work as of now (11/2025).
- All Platforms - install git
-
makeis used to encapsulate the confluent cli, to make it easier for Data Engineers to deploy Flink statement during development: It is not used by shift_left tool, but shift_left creates the Makefile with theshift_left table initcommand (see the recipe section).- install make for windows
- Mac OS:
brew install make - Linux:
sudo apt-get install build-essential
-
All Platforms - install confluent cli. This is not mandatory to run shift_left tool only if you want to use
make. -
Create virtual environment:
-
Once uv installed, verify the version. It should be fine to be greater or equal to 0.9.13
-
Create a new virtual environment in any folder:
This will create a.venvfolder. - Activate the environment:
- Verify the list of wheels available in the
src/shift_left/dist/to take the last one. The github also includes the list of releases to see the last available version number. - Install the cli:
- Install python 3.12.xx
- Create a Python virtual environment:
- Activate the environment:
- Be sure to use the pip install in the virtual environment:
- Install the
shift_leftCLI using the command (this is temporary once the CLI will be loaded to pypi): To get the list of version of the available wheels, look at the content under thesrc/shift_left/distfolder.
2- A Demonstration Project¶
- Clone a git repository with data as a product project done in Flink and in Spark. This project includes different demonstrations, but we will use the Customer c360 analytics project to support the current labs.
3- Get Confluent Cloud Information¶
The shift_left tool will access Confluent Cloud REST endpoint and will do operations on behalf of your Confluent user. You need to set environment variables and config file.
- Get the
shift_leftconfig file template to the tutorial folder:
3.1 Get Environment id from Confluent Cloud¶
Go to Environments from the left menu, select the environment you want to use 
Select the Details tab for the ID, Provider and region 
and update the config.yaml
3.2 Get Organization ID¶
3.3 Get Kafka Cluster Information¶
Go to Environments > Clusters > Select on Kafka Cluster > Cluster Settings > General tab
and update the config.yaml
4- Get Confluent Cloud Keys and Secrets¶
4.1 Confluent Cloud API Keys and Secrets¶
Go to the contextual menu on the top right side, and then Add API Key button: 
Select User or Service Account 
Then resource scope 
Set a name and description and download the created API.
- Edit the
tutorial/setup/set_env_varfile for the following variables:
4.2 Kafka Cluster API Keys and Secrets¶
- Edit the
tutorial/setup/set_env_varfile for the following variables:
4.3 Kafka Flink API Keys and Secrets¶
- Edit the
tutorial/setup/set_env_varfile for the following variables:
5- Finalize environment variables¶
Shift_left uses the CONFIG_FILE and PIPELINES environment variables all the time. So it is important to set them correctly. The following setting should work for the different labs of this tutorial.
export FLINK_PROJECT=$PWD/../flink_project_demos/customer_360/c360_flink_processing
export PIPELINES=$FLINK_PROJECT/pipelines
export STAGING=$FLINK_PROJECT/staging
export SRC_FOLDER=$FLINK_PROJECT/../c360_spark_processing
export CONFIG_FILE=$PWD/tutorial/setup/config.yaml
- Set your terminal shell with those environment variables:
6- Validate the configuration¶
The shift_left CLI works with 3 top level commands: project, table and pipeline. With the project the validate_config helps to debug the config.yaml specified by the CONFIG_FILE environment variables.
A CONFIG_FILE matches a specific environment, kafka cluster and Flink. So when working with different environments or different Kafka Clusters within an environment, it is recommended to use different config.yaml and environment variables.
Security access
The config.yaml and environment variable files should ignored in Git.
and update the config.yaml 
