Skip to main content



Create the schema in TQL


Explains what the feature is or what its benefits are to the user or customer.


Having examined the structure of the data to be loaded and become familiar with the ThoughtSpot SQL Command Line (TQL), you are now ready to create the schema.

This method is a good way to get familiar with TQL and how to create database objects, but when creating a schema in a production system, you will most likely Write a SQL script to create the schema.

To create the schema directly in TQL:

  1. Connect to the database with the ThoughtSpot SQL Command Line (TQL).
  2. If the database you will be using does not exist, create it now:
    TQL> CREATE DATABASE my_database;
  3. Connect to the database:
    TQL> USE my_database;
  4. If you wish to use a schema other than the default one, create it now:
    TQL> CREATE SCHEMA my_schema;
  5. Issue a CREATE TABLE command for each table you will create, using the information in Plan the schema.