The following diagram describes the internals of the StackQL at a high level.
The StackQL Driver is invoked by either a command being run in the StackQL Interactive Command Shell or a command or commands being submitted using the
stackql exec command. The Driver is responsible for the orchestration of StackQL commands.
The QueryParser parses the IQL statement and ensures the validity of the syntax provided as well as attribute references and mandatory attributes.
The ProviderInterface consumes signed extended API specs from the StackQL Provider Registry.
StackQL provider interface documents are used to enumerate and define all available resources and their associated methods and attributes for a given provider. This information - collected at execution time - is cached internally for the current session.
The QueryPlanner determines which components of the query will be executed remotely through the relevant Cloud Provider API, and which components will be executed locally (such as aggregate operations).
The RemoteExecutor is responsible for interacting with the relevant Cloud Provider's API, this includes the handling of asynchronous operations and paginated responses.
The LocalExector is the local embedded SQL engine responsible for operations on provider resource data, such as scalar functions and aggegation operations.