Skip to main content

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.

note

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:

PurposeWhich pathCharacteristics
Alter schema / write dataData Space SQL execute endpointSynchronous; runs arbitrary DDL/DML directly against the single Data Space's DuckDB database; results returned inline
Query / read dataQuery 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

  1. Click Datasources in the Studio sidebar
  2. Click New DatasourceCreate Data Space
  3. Enter a name for the Data Space
  4. 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;
tip

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}"
  • main is DuckDB's fixed schema
  • attachAlias is 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