Workspaces

What is a Workspace?

A Workspace is an area that contains a set of Tinybird resources, including Pipes, Nodes, APIs, Data Sources & Auth Tokens.

What should I use Workspaces for?

Workspaces allow you to separate the different things you work on in Tinybird.

You can choose exactly how you organise your Workspaces, but the two common ways are a Workspace per project, or per team.

Creating Workspaces

You can create multiple Workspaces and doing so is easy. When you create a Workspace, you can start building immediately; there is no delay waiting for clusters to build.

Creating Workspaces in the UI

This section describes how to create a Workspace in the UI.

In the top left corner of the Tinybird UI you’ll see the name of your current Workspace.

To create a new Workspace, click on the name of the existing Workspace in the top left corner.

../_images/concepts-workspaces-create-new-workspace-1.png

You’ll see a drop down that lists all of your active Workspaces.

Click the + icon as shown below.

../_images/concepts-workspaces-create-new-workspace-2.png

This will open a dialog window with a form to help you create a new Workspace. You can give the Workspace a name by typing into the Workspace name box (see Mark 1 below).

If you want to use a Starter Kit, select it from the Starter kit dropdown (see Mark 2 below). When you’re happy, click Create Workspace (see Mark 3 below).

../_images/concepts-workspaces-create-new-workspace-3.png

Creating Workspaces in the CLI

This section describes how to create a Workspace in the CLI.

To create a new Workspace from the CLI, you can use the following command:

tb workspace create

You can use this command interactively or by providing the required inputs with flags.

To use it interactively, just run the command without any flags (e.g. tb workspace create).

You will see several prompts that you need to complete.

First, you’ll be asked to supply your User Auth Token.

To get your User Auth Token, see Getting your User Auth Token.

Paste the token into the prompt.

In order to create a new workspace we need your user token. Copy it from https://ui.tinybird.co/tokens and paste it here:

You can select whether you want to use a Starter Kit for your new Workspace. Using the blank option will give you an empty Workspace.

------------------------------------------------------------------------------------
| Idx | Id            | Description                                                |
------------------------------------------------------------------------------------
|   1 | blank         | Empty workspace                                            |
|   2 | web-analytics | Starting workspace ready to track visits and custom events |
------------------------------------------------------------------------------------

[0] to cancel

Use starter kit [1]: 1

Next, you’ll be asked to supply a name for your Workspace.

Workspace name [new_workspace_9479]: internal_creating_new_workspaces_example

A successful creation will give you the following output:

** Workspace 'internal_creating_new_workspaces_example' has been created

If you’re using the CLI in an automated system, you probably don’t want to use the interactive command. You can instead provide these options as flags:

tb workspace create --user_token <your_token> --starter-kit 1 internal_creating_new_workspaces_example

Deleting Workspaces

Deleting a Workspace deletes all resources within the Workspace, including Data Sources, any ingested data, Pipes and published APIs.

Deleted Workspaces cannot be recovered, so take care with this operation.

Deleting Workspaces in the UI

This section describes how to delete a Workspace in the UI.

To delete a Workspace in the UI, click on the Cog icon at the top of the left side navigation bar, next to the Workspace name (see Mark 1 below).

../_images/concepts-workspaces-delete-workspace-ui-1.png

This will open a dialog window. Click the three dots next to the Workspace name (see Mark 1 below). In the context menu, click Delete (see Mark 2 below).

../_images/concepts-workspaces-delete-workspace-ui-2.png

Finally, you will be asked to confirm that you want to delete the Workspace. If you are sure, click Delete to finish deleting the Workspace.

../_images/concepts-workspaces-delete-workspace-ui-3.png

Deleting Workspaces in the CLI

This section describes how to delete a Workspace in the CLI.

To delete a Workspace in the CLI, you can use the following command:

tb workspace delete

You will need to provide the name of the Workspace & your User Auth Token token, for example:

tb workspace delete my_workspace --user_token <your User Auth Token>

Managing Workspace users

User access to resources in Tinybird are controlled at the Workspace level.

You can invite as many users to a Workspace as you want, and a user can belong to multiple Workspaces.

There are two roles available, Guest and Admin, which can be assigned to a user and changed at any time.

Adding Workspace users in the UI

This section describes how to invite new users to your Workspace in the Tinybird UI.

In the top left corner of the Tinybird UI, click the Cog icon (see Mark 1 below).

../_images/concepts-workspaces-invite-to-workspace-1.png

This will open a dialog window. At the bottom of the dialog window, you can see the users that are already members of your Workspace (see Mark 1 below).

You can add new members by clicking the Add members button (see Mark 2 below).

../_images/concepts-workspaces-invite-to-workspace-2.png

A text dialog will open. Enter the email address for the user you want to invite in the text area (see Mark 1 below) and then click the Add button (see Mark 2 below). You can invite multiple users at the same time by adding multiple email addresses separated by a comma.

The users you invite will get an email notifying them that they have been invited. If the user does not already have a Tinybird account, they will be prompted to create one to accept your invite.

../_images/concepts-workspaces-invite-to-workspace-3.png

Invited users will appear in the user management dialog (see Mark 1 below). By default, they will have the Guest role (see Mark 2 below). If the user loses their invite link, you can resend it here too (see Mark 3 below).

../_images/concepts-workspaces-invite-to-workspace-4.png

Adding Workspace users in the CLI

This section describes how to invite new users to your Workspace in the Tinybird CLI.

To add new users, you can use the following command:

tb workspace members add

You will need to supply your User Auth Token with the --user_token flag.

To get your User Auth Token, see Getting your User Auth Token.

Add the email address of the user you want to invite as the final argument to the command.

tb workspace members add --user_token <your token> my_new_team_member@example.com

A successful invite will give you the following output:

** User my_new_team_member@example.com added to workspace 'internal_getting_started_guide'

Sharing Data Sources between Workspaces

While it’s useful to separate your work, sometimes you want to share resources between different teams or projects.

For example, you might have a Data Source of events data that multiple teams want to use to build features with. Rather than duplicating this data, you can share it between multiple Workspaces.

Let’s say you have a Workspace called Ingest. In this Workspace, you have your events Data Source.

You have two teams, TeamA and TeamB and each team has their own Workspace to work in. Both teams want access to the events Data Source.

From the Ingest Workspace we can share the events Data Source to both TeamA and TeamB Workspace’s, giving them access to the data.

This means that while both teams can access the data, control of the Data Sources remains centralised in the Ingest Workspace. Neither TeamA nor TeamB can directly modify the Data Source, meaning they can’t break things for the other team.

You cannot share Data Sources to Workspaces in different regions.

Sharing Data Sources in the UI

This section describes sharing a Data Source between your Workspaces.

On the left side navigation, find the Data Source that you want to share. When you hover over the Data Source, you will see a 3-dot icon for the Data Source Actions menu, click on the 3 dots (see Mark 1 below).

../_images/concepts-workspaces-sharing-ds-workspaces-1.png

In the context menu that appears, click the Share action (see Mark 1 below).

../_images/concepts-workspaces-sharing-ds-workspaces-2.png

This will open a dialog window. In the Search box, you can type the name of the Workspace that you want to share with (see Mark 1 below). As you type, the search box will suggest Workspaces that you are a member of.

You can only share Data Sources with Workspaces that you are a member of.

../_images/concepts-workspaces-sharing-ds-workspaces-3.png

You can click on the suggestions, or type the name and press Enter. When you have selected the Workspace, you will see the Workspace in the Shared section (see Mark 1 below).

Click Done to close the dialog (see Mark 2 below).

../_images/concepts-workspaces-sharing-ds-workspaces-4.png

Sharing Data Sources in the CLI

This section describes how to share Data Sources from one Workspace to another Workspace in the Tinybird CLI.

To share a Data Source, you can use the following command:

tb datasource share

You will need to supply your User Auth Token with the --user_token flag.

To get your User Auth Token, see Getting your User Auth Token.

You then need to supply the Data Source name and target Workspace name as the following arguments.

tb datasource share --user_token <your token> shopping_data my_second_workspace

The Data Source that you want share must exist in the Workspace that your Tinybird CLI is authenticated against. To check which Workspace you CLI is currently authenticated with, you can use:

tb auth info