Install the Upsolver CLI
The page describes how to install and use the Upsolver command line interface (CLI).
Upsolver CLI is a command line client that provides a terminal-based interactive shell for running queries. It connects to Upsolver to execute SQL statements and perform all DDL and DML operations, including loading data as a continuous stream to various data destinations.
Upsolver CLI provides a command line interface to interact with the Upsolver API service over HTTP.
Install Upsolver CLI
Install using Brew (MacOS only)
Install using pip
python 3.8+ is required for installing Upsolver CLI.
Make sure you have Python 3.8+ installed, and then use pip or brew to install the CLI tool:
You can grab the latest archive link from https://github.com/Upsolver/cli/releases
Use Upsolver CLI
Help
For a complete description of every command and its flags, you can run it without any arguments or with a --help
flag.
Examples
Execute
To execute a SQL statement, you should provide an API token. You can choose whether to provide a file or a command to run.
Examples
Run an inline command:
Run command from a file:
If you want to avoid passing the token (and perhaps other optional flags) on every command, you can create a profile with the configure
command.
Configure
You can use the configure command to save a configuration file, so you won't have to provide a token and other optional flags to the execute
command every time.
The configuration profile will be located under ~/.upsolver/config
.
Examples
Create a default profile with an API token and CSV as output format:
Create another profile with an API URL and a different token:
Using Profiles
You can perform execute
command using different profiles by passing the -p
or --profile
flag to the upsolver
command.
Examples
Without the -p flag the default profile will be used:
Last updated