LAT Reference
LAT Client Command Line Interface
data pipelines are now the preferred method for loading data into the ocient system for details, see docid\ zncvnrhsf6fg1yvqk6mxt the lat client can be used to interact with a running lat instance it supports subcommands for interacting with pipelines, and previewing transformations the lat client is distributed in the form of a {{python}} wheel file contact {{ocient}} support for the wheel that corresponds to the lat version prerequisites python >= 3 8 pip3 >= 20 2 3 if pip install fails, try upgrading pip 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 client command usage get help on the command line lat client help lat client \<subcommand> help 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 0 422,422left unhandled content type left unhandled content type \ hosts (lat hosts) one or more lat hosts to orchestrate valid domain names or ip addresses can be used 0 422,422left unhandled content type left unhandled content type left unhandled content type left unhandled content type \ oauth domain (lat oauth domain) {{okta}} oauth domain to use for token acquisition 0 422,422left unhandled content type left unhandled content type left unhandled content type left unhandled content type \ oauth server (lat oauth server) okta oauth authorization server to use for token acquisition 422,422left unhandled content type left unhandled content type left unhandled content type left unhandled content type \ client id (lat client id) okta client id to use for token acquisition 0 422,422left unhandled content type left unhandled content type left unhandled content type left unhandled content type \ client secret (lat client secret) okta client secret to use for token acquisition 0 422,422left unhandled content type left unhandled content type left unhandled content type left unhandled content type \ oauth http proxy (lat oauth http proxy) http proxy url to use for token acquisition authentication credentials can be passed in proxy url 0 422,422left unhandled content type left unhandled content type left unhandled content type left unhandled content type 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 docid\ xk acu9i3s5tqrqgrz26v 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 108,462 unhandled content type unhandled content type unhandled content type unhandled content type 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 0 422,422left unhandled content type left unhandled content type 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 108,458 unhandled content type unhandled content type unhandled content type unhandled content type pipeline delete delete an existing pipeline unless the force flag is used, a pipeline must be stopped, or deletion will fail 125,470 unhandled content type unhandled content type unhandled content type unhandled content type 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 0 422,422left unhandled content type left unhandled content type pipeline stop stop the configured pipeline 0 422,422left unhandled content type left unhandled content type 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 108,466 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type pipeline errors retrieve errors that occur while the current pipeline runs 108,485 unhandled content type unhandled content type unhandled content type unhandled content type pipeline rebalance rebalances partitions evenly to all provided lat nodes this subcommand only applies to pipelines running file sources this command is meant to be used in the case of a node outage during a file load lat file loading does not support automatic partition re balancing and manual intervention is required the flow is as follows 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 0 422,422left unhandled content type left unhandled content type sink create create a new sink configuration the sink configuration file for this subcommand should match the same format as the docid\ tqopqz139pn8ti995a31m for example { "type" "ocient", "remotes" \["1 2 3 4 5050"]} 108,453 unhandled content type unhandled content type unhandled content type unhandled content type sink delete delete a sink configuration the sink configuration must not be part of a created or running pipeline 134,430 unhandled content type unhandled content type unhandled content type unhandled content type sink list list all configured sinks 0 422,422left unhandled content type left unhandled content type sink get get a sink configuration by id 141,443 unhandled content type unhandled content type unhandled content type unhandled content type 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 docid\ p makey5cmtzhn iw2zon you must specify the topic or file group option, which should match the topic or file group key in the specified transform section 134,480 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type common workflows check on status of lat pipelines $ lat client pipeline status 10 4 0 1 8080 stopped 10 4 0 2 8080 stopped 10 4 0 3 8080 stopped $ lat client pipeline status hosts https //10 4 0 1 8080 10 4 0 1 8080 stopped updating an existing lat pipeline lat client pipeline update pipeline /home/user/my new pipeline json if the pipeline was running prior to the update, successful completion of this command will automatically restart the pipeline if unsuccessful, the cli will report an error with an explanation of what is wrong with the command common issues are invalid json, missing a required column an unsuccessful update of the pipeline config does not impact actively running pipelines restart the pipeline \# first, stop the running pipelines to send custom hosts, use hosts ip1\ port ip2\ port $ lat client pipeline stop stopped 10 4 0 1 8080, 10 4 0 2 8080, 10 4 0 3 8080 \# then, start the pipelines $ lat client pipeline start started 10 4 0 1 8080, 10 4 0 2 8080, 10 4 0 3 8080 check multiple lat nodes to see if the pipeline configurations are compatible \# hosts with compatible pipelines $ lat client pipeline get hosts https //10 4 0 1 8080 https //10 4 0 2 8080 https //10 4 0 3 8080 { "pipeline id" "91326229 5fc6 4542 99ce 87bdcb00a978", "version" 2, "source" { }, "sink" { }, "transform" { } } \# hosts with incompatible pipeline $ lat client pipeline get hosts https //10 4 0 1 8080 https //10 4 0 2 8080 https //10 4 0 3 8080 hosts responded with incompatible pipelines b5a6e8647cd3a28d4a5bd07cd1c491ce 10 4 0 1 8080, 10 4 0 2 8080 160f270e39d7a51a431c841613e4dc4e 10 4 0 3 8080 the cli will compare the md5 hash of the pipeline configurations on all nodes and respond that all pipelines match or are inconsistent 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 ssl sslcertverificationerror \[ssl certificate verify failed] certificate verify failed unable to get local issuer certificate ( ssl c 997) you can run this command to resolve the error pip install upgrade certifi the root cause of this error can be a connection to either the lat server over ssl or an authentication to okta to obtain an access token over ssl you can run the same command in both cases to resolve the issue when the ssl certificate is self signed on the lat server, you can use the no verify flag when you connect to the lat server without verifying the ssl certificate related links docid\ zjlpeecj74 lp0ciflqh0 docid\ g68ytqw2qdudqpjld0tko