4. Load data to your table

Getting data into Space and Time.


This page is part of the Getting Started guide. For the best experience, make sure to follow the guide step-by-step

There are several ways to load data into Space and Time, and you'll want to choose a method depending on the volume, velocity, and frequency of your loading. In this example, we'll show you how to load data into the DAPP_USER_WALLETS table we created in Part 3 using our REST APIs.

How to load data

Before we get started, make sure you have the API Reference page open for the Modify Resources (DML) API.


sqlText: This will be the SQL DML command you want to run to insert data.

INSERT INTO <NEW_SCHMEA_HERE>.DAPP_USER_WALLETS (User_Wallet_Address, User_Subscription) 
VALUES ('0x2B6eD29A95753C3Ad948348e3e7b1A251080Ffb9', 'prime');

2. Set resourceId and biscuit

  • resourceId: <ENTER_SCHEMA_HERE>.<DAPP_USER_WALLETS> This will be the schema and table we created in part 3.
  • biscuit: This will be the biscuit that we generated in part 3.

2. Put it all together

curl -i --request POST \
     --url "$SxT_PROD_DML_API" \
     --header 'accept: application/json' \
     --header 'authorization: Bearer '"$AT"'' \
     --header 'biscuit: '"$BISCUIT"'' \
     --header 'content-type: application/json' \
     --data @- <<EOF
  "sqlText": "INSERT INTO <NEW_SCHMEA_HERE>.DAPP_USER_WALLETS (User_Wallet_Address, User_Subscription) VALUES ('0x2B6eD29A95753C3Ad948348e3e7b1A251080Ffb9', 'prime')"


You loaded data to your table!


  1. Let's validate the data by calling the Execute Queries (DQL) API.

Your resourceId and biscuit will be the same. Here's the sqlText you can use this to validate the data:



Other ways to load data

For more than a few thousand rows, you can load data with streaming.

Now that you have your data in the platform, let's look at how to join it with Space and Time's indexed blockchain data using our REST APIs.