Tobiko Cloud: Getting Started
Tobiko Cloud is a data platform that extends SQLMesh to make it easy to manage data at scale without the waste.
We're here to make it easy to get started and feel confident that everything is working as expected. After you've completed the steps below, you'll have achieved the following:
- Log in to Tobiko Cloud via the browser
- Connect Tobiko Cloud to your local machine via the CLI
- Connect Tobiko Cloud to your data warehouse
- Verify that Tobiko Cloud interacts with your data warehouse as expected
Prerequisites
Before you start, the Tobiko team must complete a few steps.
Your Tobiko Solutions Architect will:
- Set up a 1 hour meeting with you to fully onboard
- Request that a new Tobiko Cloud account be created for you (single tenant by default)
- Share a temporary password link that expires in 7 days
- Make sure you save the password in your own password manager
To prepare for the meeting, ensure you or another attendee have data warehouse administrator rights to:
- Update warehouse user and object permissions
- Create new users and grant them create/update/delete permissions on a specific database (ex:
database.schema.table
)
For migrations from SQLMesh (open source) to Tobiko Cloud only:
- Your Tobiko Solutions Architect will send you a script to extract your current state
- You send that state to the Tobiko Cloud engineers to validate before the migration occurs
- After validation, Tobiko Solutions Architect will schedule a migration date and meeting to move your state to Tobiko Cloud. There will be some downtime if you are running SQLMesh in a production environment.
Note: if you must be on VPN to access your data warehouse or have specific security requirements, please let us know and we can discuss options to ensure Tobiko Cloud can securely connect.
Technical Requirements:
- Tobiko Cloud requires Python version between 3.9 and 3.12
Note
If you don't have a supported Python version installed, you can use uv to install it. At the time of writing, these are the suggested commands to install uv and Python:
Log in to Tobiko Cloud
The first step to setting up Tobiko Cloud is logging in to the web interface:
- We will authenticate into your Tobiko Cloud instance. If it is your first time going through this flow, your Solutions Architect will guide you on how to get SSO configured. Open the url below.
-
Once logged in, you should see the home page. If you are not redirected, then input your Tobiko Cloud URL in the browser (ex: https://cloud.tobikodata.com/sqlmesh/tobiko/public-demo/observer/)
Your view should be empty, but the figure below shows a populated example with Tobiko Cloud running in production:
Install the tcloud
CLI
Now we need to configure the tcloud
command line interface tool.
First, open a terminal within your terminal/IDE (ex: VSCode). Then follow the following steps to install the tcloud
CLI:
-
Create a new project directory, or an existing SQLMesh project, and navigate into it:
-
Create a new file called
requirements.txt
and addtcloud
to it:Pypi source: tcloud
Note: your Tobiko Solutions Architect will provide you a pinned version of
tcloud
-
Create a Python virtual environment in the project directory and install
tcloud
(example is using uv):
Note
You may need to run python3
or pip3
instead of python
or pip
, depending on your python installation.
If you do not see tcloud
in the virtual environment path above, you may need to reactivate the venv:
-
Create an alias to ensure use of
tcloud
:We recommend using a command line alias to ensure all
sqlmesh
commands run on Tobiko Cloud.Set the alias in the terminal by running
alias sqlmesh='tcloud sqlmesh'
in every session.Or add this to your shell profile file (ex:
~/.zshrc
or~/.bashrc
) so you don't have to run the command every time:Note: the rest of the commands in this document will NOT use the alias to avoid confusion with the open source SQLMesh CLI.
Connect Tobiko Cloud to Data Warehouse
Now we're ready to connect your data warehouse to Tobiko Cloud:
-
Create a new file called
tcloud.yaml
and add the project configuration below, substituting the appropriate values for your project:projects: public-demo: # TODO: update this for the project name in the URL url: https://cloud.tobikodata.com/sqlmesh/tobiko/public-demo/ # TODO: update for your unique URL gateway: tobiko_cloud extras: bigquery,web,github # TODO: update bigquery for your data warehouse default_project: public-demo # TODO: update this for the project name in the URL
-
If you are going through the SSO flow then, run the following command:
This will fire off the SSO flow and open a link in your browser to authenticate.Once authenticated, you will see the following screen.
-
Initialize a new SQLMesh project:
-
Update your project's
config.yaml
with your data warehouse connection information:Your new SQLMesh project will contain a configuration file named
config.yaml
that includes a DuckDB connection.Replace the DuckDB connection information with your data warehouse's information.
This example shows a Bigquery warehouse connection; see more examples here.
-
Create a
tcloud
user in the warehouseDuring your onboarding call, we will walk through instructions live to create a new
tcloud
data warehouse user with the necessary permissions.SQLMesh will run as this user to create, update, and delete tables in your data warehouse. You can scope the user permissions to a specific database if needed.
Find additional data warehouse specific instructions here: Data Warehouse Integrations.
-
Verify the connection between Tobiko Cloud and data warehouse:
Now we're ready to verify that the connection between Tobiko Cloud and the data warehouse is working properly.
Run the
info
command from your terminal:It will return output similar to this:
Verify SQLMesh functionality
Let's run a plan
to verify that SQLMesh is working correctly.
Run tcloud sqlmesh plan
in your terminal and enter y
at the prompt to apply the changes.
It will return output similar to this:
(.venv) ➜ tcloud_project git:(main) ✗ tcloud sqlmesh plan
======================================================================
Successfully Ran 1 tests against duckdb
----------------------------------------------------------------------
New environment `prod` will be created from `prod`
Summary of differences against `prod`:
Models:
└── Added:
├── sqlmesh_example.full_model
├── sqlmesh_example.incremental_model
└── sqlmesh_example.seed_model
Models needing backfill (missing dates):
├── sqlmesh_example.full_model: 2024-11-24 - 2024-11-24
├── sqlmesh_example.incremental_model: 2020-01-01 - 2024-11-24
└── sqlmesh_example.seed_model: 2024-11-24 - 2024-11-24
Apply - Backfill Tables [y/n]: y
Creating physical tables ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 3/3 • 0:00:00
All model versions have been created successfully
[1/1] sqlmesh_example.seed_model evaluated in 0.00s
[1/1] sqlmesh_example.incremental_model evaluated in 0.01s
[1/1] sqlmesh_example.full_model evaluated in 0.01s
Evaluating models ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 3/3 • 0:00:00
All model batches have been executed successfully
Virtually Updating 'prod' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 0:00:00
The target environment has been updated successfully
Tobiko Cloud and SQLMesh are working!
Next steps
Your tcloud
project directory should look and feel like this:
From here, if you have an existing SQLMesh project, you can copy over your existing models and macros to the models
and macros
directories (along with other files as needed).
You are now fully onboarded with Tobiko Cloud. We recommend reviewing the helpful links below to get familiar with SQLMesh and Tobiko Cloud.
Here's to data transformation without the waste!