Using a Provider
See also:
[exec
] [shell
] [ StackQL Provider Registry ]
StackQL queries can be run against a number of different cloud providers, including Google Cloud Platform, Amazon Web Services, Microsoft Azure, Digital Ocean, and more. StackQL provider specifications are pulled from the StackQL Provider Registry, this can be done using the REGISTRY PULL
StackQL command, or by using the stackql registry
command line utility.
Installing a Provider
To see the list of available providers, run the following command:
REGISTRY LIST;
To install a provider, run the following command:
REGISTRY PULL okta;
To see providers installed on the current system, run the following command:
SHOW PROVIDERS;
Authenticating to a Provider
Authenticating to a cloud provider is often the first step in an StackQL routine. Meta commands such as SHOW
and DESCRIBE
can be run against a provider without authenticating, but SELECT
, INSERT
and EXEC
commands generally require an authenticated session.
Authentication is performed using environment variables set on the system (or sourced as secrets in a CI system), each provider will have it's own default unique variables used for authentication, so consult the documentation for your provider using the StackQL Provider Registry documentation.
You can authenticate to multiple providers in the same interactive shell or non-interactive batch routine by supplying multiple authentication objects, for example:
export AWS_ACCESS_KEY_ID=YOURACCESSKEYID
export AWS_SECRET_ACCESS_KEY=YOURSECRETACCESSKEY
export DIGITALOCEAN_TOKEN=dop_v1_yourdigitaloceantoken
export STACKQL_GITHUB_USERNAME=yourghuser
export STACKQL_GITHUB_PASSWORD=ghp_yourgithubpersonalaccesstoken
This is especially useful when you are joining data between multiple providers in a single query.