1. Connect to Space and Time

The first step to using Space and Time is authenticating with the platform.

Before you can start running queries, you have to connect to Space and Time. We'll walk you through how to register and authenticate with the platform.


📘

This video references instructions on the Space and Time CLI page. To follow along, open that page in a new tab.

A note on variables in this guide

Throughout the Getting Started guide, you will see references to variables like $SxT_DQL_API and $AT. Any variable prefaced by a $indicates that we've created an environment variable in our shell to represent the variable.

This helps us make our example code more clear and allows you to save time as you walk through the guide. In some cases, there are security advantages as well, such as when the variable represents a private key. A full discussion of how environment variables work is beyond the scope of this guide.

How you set an environment variable will depend on your OS and shell, but for OSX or Linux, it's usually as simple as setting them from your shell/terminal like:

export SxT_DQL_API="https://<your-SxT-API-URI-here>/v1/sql/dql"

How to authenticate

The easiest way to authenticate with Space and Time is by using the CLI. The Space and Time Command Line Interface (CLI) allows you to easily register a username and keypair to use when running queries and interacting with Space and Time.

To get started, follow the instructions for using the CLI for authentication.

👍

You connected to Space and Time!

Once you've authenticated, you can start running queries and interacting with the Space and Time data warehouse. In this guide, we'll walk you through how to use the Space and Time REST APIs to run a query, create a table, and load data.

Moving forward, you'll need the accessToken you received when you authenticated.


📘

Alternatively, you can register and authenticate by following the ED25519 authentication API workflow. You can also run commands in your favorite SQL editor by installing and connecting to the Space and Time JDBC driver.

In the next step, we'll walk you through how to run a basic query using our REST APIs.