Prerequisites
- Python >= 3.8
- pip3 >= 20.2.3
- If
pip installfails, try upgradingpip.
- If
- Wheel Python package
pip install wheel
Install
It is recommended to install the wheel in a Python virtual environment to avoid conflicts with globally installed Python packages. For the install command, replace$VERSION with the latest version of the LAT client.
Steps:
- Create the virtual environment.
python3 -m venv venv - Activate the virtual environment.
source venv/bin/activate - Install the wheel.
pip install lat_client-$VERSION-py3-none-any.whl - Run commands with
lat_client COMMAND ARGS - When a new terminal is opened, repeat step 2 to activate the environment and gain access to the
lat_clientcommand.
Usage
Get help on the command line:Shell
Common Arguments
Some arguments are available on all subcommands. For convenience, most of them can also be set using an environment variable.--no-verify
Skip certificate validation when connecting to LAT. Ignored if using http scheme
--hosts (LAT_HOSTS)
One or more LAT hosts to orchestrate. Valid domain names or IP addresses can be used.
--oauth-domain (LAT_OAUTH_DOMAIN)
OAuth domain to use for token acquisition.
--oauth-server (LAT_OAUTH_SERVER)
Okta OAuth authorization server to use for token acquisition.
--client-id (LAT_CLIENT_ID)
Okta client id to use for token acquisition.
--client-secret (LAT_CLIENT_SECRET)
Okta client secret to use for token acquisition.
--oauth-http-proxy (LAT_OAUTH_HTTP_PROXY)
HTTP proxy URL to use for token acquisition. Authentication credentials can be passed in proxy URL.
Subcommands
pipeline create
Create a new pipeline.
For most use cases, it is advisable to leave the pipeline_id unset when creating a pipeline. The client will set it to a random UUID to prevent deduplication across different pipelines. In the event that you want deduplication between pipelines, the pipeline_id should be copied from the previous pipeline and included in the new pipeline. The LAT Transform Configuration must also be the same to ensure deduplication.
When the client is used to create a pipeline with a file source, the client will make adjustments to the source configuration such that partitions are assigned evenly across nodes.
First, the client will get the number of workers from the pipeline. If one is not set, it will use the minimum configured lat.default.workers instead. Then, it will set partitions = workers * num_nodes. Finally, it will set partitions_assigned = [workers * node_index, workers * (node_index + 1) - 1] for each node.
pipeline get
Get the configuration for an existing pipeline.
If the configured pipelines are identical, print the pipeline, otherwise an explanation of the inconsistency will be provided.
For pipelines with a file source, partitions_assigned is ignored when checking if pipelines are identical. Additionally, the client will validate that all partitions are assigned, and that no partition is assigned more than once.
pipeline update
Update the configuration for an existing pipeline.
The new pipeline can only make changes to subfields in transform, except for any topic / file_group names. All other subfields of transform are allowed to change, including to the table and column fields.
For pipelines with a file source, partition assignments will be copied from the existing pipeline.
If the pipeline was running prior to the update, successful completion of this command will automatically restart the pipeline.
pipeline delete
Delete an existing pipeline.
Unless the --force flag is used, a pipeline must be stopped, or deletion will fail.
pipeline start
Start the configured pipeline.
Prior to starting the pipeline, the pipeline start subcommand will validate that all specified hosts are configured with an identical pipeline, except for pipelines with a file source, which must have different partitions_assigned such that each partition is assigned exactly once across all hosts.
pipeline stop
Stop the configured pipeline.
pipeline status
Retrieve status of the pipeline. The valid pipeline statuses are STOPPED, RUNNING, COMPLETED, and FAILED. When the pipeline is FAILED, the file statuses will remain in processing.
pipeline errors
Retrieve errors that occur while the current pipeline runs.
pipeline rebalance
Rebalances partitions evenly to all provided LAT Nodes.
This subcommand only applies to pipelines running file sources.
- LAT Node goes offline.
- LAT operator rebalances the partitions from the offline node onto the online nodes using the client. The operator should use the rebalance command and omit the offline node from the hosts argument.
- LAT Node comes back online.
- LAT operator rebalances partitions using the client to include all nodes including the newly online node. The operator should use the rebalance command and include all online nodes in the hosts argument.
sink create
Create a new sink configuration.
The sink configuration file for this subcommand should match the same format as the LAT Sink Configuration. For example:
Text
sink delete
Delete a sink configuration. The sink configuration must not be part of a created or running pipeline.
sink list
List all configured sinks.
sink get
Get a sink configuration by id.
preview
Preview a transformation.
At most one of --transform or --pipeline can be provided. If neither is provided, the host will attempt to use the transformation configured in its pipeline.
You can specify the --extract or --pipeline option. If you specify none of these options, the host uses the JSON Extractor by default. For details about record and extractor types, see the LAT Extract Configuration.
You must specify the --topic or --file-group option, which should match the topic or file_group key in the specified transform section.
Common Workflows
Check on Status of LAT Pipelines
Shell
Updating an Existing LAT Pipeline
Shell
Restart the Pipeline
Shell
Check Multiple LAT Nodes to See If the Pipeline Configurations Are Compatible
Shell
LAT Client Command Line Interface Troubleshooting
If the certificate authorities on the system running the Python client (LAT Client) need to be updated, an error can occur. This type of error message might appear.Shell
Shell
--no-verify flag when you connect to the LAT Server without verifying the SSL Certificate.

