Data Spaces
Data Spaces are a data-hosting service provided by the Datadata platform, letting you create, write, and query data tables directly on the platform without standing up your own database.
Each Data Space is an independent DuckDB database that the platform stores and persists for you. You can run arbitrary DuckDB SQL against it to manage table structure and data, and you can also use it as a datasource in cross-source JOIN queries.
The underlying implementation of Data Spaces has been upgraded from the earlier DuckLake approach to "one independent DuckDB database per Data Space". The datasource type identifier has likewise been renamed from the old ducklake to dataspace (ducklake is deprecated).
What Are Data Spaces
Data Spaces are platform-hosted data storage with the following features:
- Each Data Space is an independent DuckDB database, hosted and persisted by the platform
- Create, write, alter, and drop tables directly with SQL — any DuckDB DDL/DML is supported
- Can participate in cross-source JOIN queries alongside external databases
- A good landing spot for the output of AI-generated crawlers / ETL scripts
Read / Write Separation (Important)
A Data Space has two access paths with completely different purposes — do not confuse them:
| Purpose | Which path | Characteristics |
|---|---|---|
| Alter schema / write data | Data Space SQL execute endpoint | Synchronous; runs arbitrary DDL/DML directly against the single Data Space's DuckDB database; results returned inline |
| Query / read data | Query engine (execute-adhoc) | Mounts the Data Space as a read-only datasource; supports cross-source JOINs and DQL |
The query engine mounts a Data Space read-only and physically cannot write to it — writes must go through the Data Space SQL execute endpoint.
Creating a Data Space
- Click Datasources in the Studio sidebar
- Click New Datasource → Create Data Space
- Enter a name for the Data Space
- Done
This gives you a datasource of type dataspace that can be referenced via the API / AI Skills.
Managing Tables in a Data Space
The Data Space SQL execute endpoint runs any valid DuckDB SQL. When executing inside the Data Space, refer to tables by their bare name tablename or main.tablename:
-- Create a table
CREATE TABLE products (id INTEGER, name VARCHAR, price DOUBLE);
-- Insert data (parameterized placeholders supported)
INSERT INTO products VALUES (?, ?, ?);
-- Inspect the table structure
DESCRIBE products;
-- Drop the table
DROP TABLE IF EXISTS products;
After changing table structure, trigger a schema scan to refresh the datasource metadata so new tables / columns become visible in the platform's metadata.
Query results exceeding 10,000 rows are truncated.
Querying Data in a Data Space
Once data is written, read it back through the query engine (execute-adhoc) — mount the Data Space as a datasource and reference its tables with this naming convention:
"{attachAlias}".main."{tableName}"
mainis DuckDB's fixed schemaattachAliasis the mount alias assigned to the datasource at query time, conventionally the datasource name
For example, after mounting a Data Space named sales, you can run SELECT * FROM "sales".main."products".
Use Cases
- Data Cleaning — After uploading CSV files, clean and transform via SQL or DQL/Python scripts, then write the result into a Data Space
- Intermediate Storage — Save intermediate results of data processing for later analysis
- Data Integration — Consolidate data from different sources into a unified Data Space
- Script Output — Land data scraped by crawler / ETL scripts
Related Docs
- Querying Data — Read Data Spaces through the query engine
- Datadata Manual — Create and manage Data Spaces via MCP tools
- Datadata REST API — Manage Data Spaces from scripts via the REST API