Skip to content

Lab Manual

The Lab provides a multi-purpose environment for data exploration, AI/ML modeling, and application development, based on Jupyter Lab.

To use ThanoSQL in this environment, you must first load the ThanoSQL Magic.

You can press the run button at the top, or you can run it with either the Ctrl + Enter or Shift + Enter shortcuts.

1. Loading ThanoSQL Magic

Load the ThanoSQL Magic extension program with the following command.

%load_ext thanosql

2. Setting API_TOKEN

Set the API_TOKEN obtained through Workspace Settings page - Developer - API Token - Copy button as follows.

%thanosql API_TOKEN=<Issued_API_TOKEN>


%thanosql API_TOKEN=eyGVFDdfafddvczs

With the generated API token, you can use all of the ThanoSQL`s REST APIs

For more information about using the ThanoSQL's REST API, see ThanoSQL REST API Reference

3. Check the list of the ThanoSQL models and datasets using the LIST query syntax

All preparations to use ThanoSQL are complete.

To view a list of prebuilt the ThanoSQL models, run the ThanoSQL statement below.



To see the list of datasets used by the tutorials, run the statement below.



How to write queries in the ThanoSQL Workspace Lab

There are two ways to write queries in ThanoSQL: line-based and cell-based.

  • Line-based: After entering %thanosql, continue writing the query on the same line. The query result is returned as a DataFrame and can be stored in a variable for further programming, similar to a Python variable.
df = %thanosql SELECT id, name FROM user
  • Cell-based: After entering %%thanosql, write the query freely on multiple lines. This provides a user experience similar to using other DBMSs to query tables or execute ThanoSQL extension syntax.
FROM user

4. Get Tutorial

You can check out the available tutorials from the tutorials in the ThanoSQL Technical Documentation. Running the statement below allows you to clone all the ThanoSQL's tutorial into your workspace.

!git clone

If you want to import only certain tutorials into your workspace, use the wget method as shown below.

Github URL of the ThanoSQL tutorials

!wget [Tutorials' Github URL]
# Example 
## wget
Tutorial URL
Search images by keywords
Search images by images
Search images by text
Search text by text
Search video by text
Create classification model using Auto-ML
Create Image Classification Model
Create text classification model
Create regression model using Auto-ML
Create voice recognition model that dictates audio files
Using a Speech Recognition Model that dictates and translate audio files
Use the Visual Question Answering Model to find an appropriate answer to a question
Create a Time Series Forecasting Model
Use your model in ThanoSQL
Perform Various Functions Using Generative Model

Last update: 2023-08-31