Skip to main content
Version: devel View Markdown

What is a workspace?

A workspace is one data project kept as code, together with its configuration and profiles. It bundles everything that the project is made of:

EntityWhat it does
Pipelinesload data from sources into a destination
Datasets and schemasthe data that the pipelines write, and the description of its tables
Transformationsmodel the loaded data
Data quality checks and metricsvalidate the data and track it over time
Notebooks and data appsread the data
Agentsrun unattended, for example to diagnose a failed job run
Jobsrun any of the above on a schedule or after another job
Profileshold the credentials and settings that the code runs with, and control access to the data

On your machine, the workspace is a Python project, typically a git repository: the local workspace. Here you write and run the code with local profiles, which never leave your machine.

On the dltHub platform, it is a remote workspace. Connecting creates a trusted link from the local workspace to the platform. The remote workspace mirrors the local one: the same code and configuration, prepared to run.

You deploy the local workspace to an environment, prod by default. That creates a workspace deployment: the code with the remote profiles of that environment, the jobs, and their runs and logs, shown to the people that you invite. Each environment has a workspace deployment of its own, so production and staging never share jobs, job runs or credentials. The remote workspace holds all of them, in one organization.

The local workspace​

The local workspace is a regular Python project with a .dlt folder. You run and test everything here first, with the local profiles dev and tests. It contains:

  • .dlt/.workspace: the file that turns on the dlthub CLI and declares the profiles and environments. Without this file you are using plain OSS dlt.
  • .dlt/config.toml and .dlt/secrets.toml: the settings and credentials of every profile. A profile adds settings files of its own.
  • pyproject.toml (or requirements.txt): the dependencies, such as dlt[hub], duckdb and marimo.
  • Pipeline files and a deployment module, __deployment__.py by default: the code that you run, and the jobs that a deployment has.
  • AI toolkit configuration: skills, rules and the MCP server for Claude Code, Cursor or Codex, see the AI Harness.

The remote workspace and its deployments​

When you connect the local workspace, the dltHub platform creates its counterpart in your organization. From then on, each environment that you deploy to has one workspace deployment there. A workspace deployment holds:

The dltHub web app lists each workspace deployment as a workspace, named after the local workspace and the environment: ingest for prod and ingest-staging for staging. Roles, API keys and variables belong to one workspace deployment.

A new workspace has one environment, prod, so it starts with a single workspace deployment. Add a staging environment when you want to review changes before they reach production, see Create a staging environment.

When you create an account, dltHub also creates a personal Playground workspace, so you can try things without any setup.

A workspace for a team​

A workspace gives a team three things to share:

  • The repository shares the code. Pipelines, schemas, transformations and checks live in version control. Each person works on a branch with the local profiles, which never leave their machine.
  • A workspace deployment shares the running project. Invite a colleague as a viewer to look at job runs, logs and notebooks, or as a developer to deploy and run jobs. Nobody needs your credentials for that.
  • Profiles share the data. Each profile gives the jobs that run with it write, read or no data access. A viewer opens a notebook that runs with access, the profile with read data access.

CI can deploy for you with a workspace API key. The CI/CD blueprint deploys a pull request to staging and the merged code to prod.

Creating a workspace​

uv run dlthub login
uv run dlthub workspace connect "<name>" --create

When you deploy, all files from your local project directory are mirrored to the workspace deployment on the dltHub platform. To exclude files you don't want deployed (temp directories, data/state directories, local IDE files), list them in .gitignore. Files not excluded can cause deployments to fail with:

Upload failed (HTTP 413): {"status_code":413,"detail":"Request Entity Too Large"}

Next steps​

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.