Skip to main content
MindStudio
Pricing
Blog About
My Workspace
Databases

Create Data Source

The Create Data Source block initializes a new, empty vector data source associated with the current app version.

Create a new empty vector data source

The Create Data Source block initializes a new, empty vector data source associated with the current app version. It takes a name as its primary input, which supports variable interpolation so the name can be constructed dynamically at runtime. An optional destination variable can be specified to capture the resulting data source ID for use in later steps of the workflow.

When the block runs, it returns two output fields: the unique ID of the newly created data source and the resolved name of that data source. The ID is the key output, as it serves as the reference point for any subsequent blocks that need to interact with the data source, such as uploading documents or running vector searches.

This block fits into workflows that need to provision storage dynamically before populating it with content. For example, a workflow might create a named data source, then pass its ID to document upload blocks to fill it with relevant material, and finally use it as a retrieval target for AI queries. It is typically one of the first steps in any workflow that builds or manages vector databases at runtime.

What you can build

Real-world workflows powered by the Create Data Source block.

Dynamic Knowledge Base Setup

Create a named vector data source at the start of a workflow to serve as a knowledge base, then populate it with documents specific to a user session or request.

Per-User Data Isolation

Generate a uniquely named data source for each user by interpolating user identifiers into the name field, keeping each user's vector data separate.

Automated Document Ingestion

Provision a new data source as the first step in a document ingestion pipeline, capturing its ID to pass directly into upload and indexing blocks.

Project-Scoped Vector Storage

Create a dedicated data source for each project or topic, using the returned ID to scope all subsequent retrieval and search operations to that project.

Scheduled Data Refresh

Spin up a fresh data source on a schedule to replace stale content, creating a new store before re-ingesting updated documents.

Multi-Tenant App Provisioning

Automatically create a separate data source for each tenant or organization during onboarding workflows, storing the returned ID for future tenant-specific queries.

Ready to add Create Data Source to your workflow?

Get Started Free

Common questions about Create Data Source

What parameters does the Create Data Source block require?

The block requires a name string for the new data source. This field supports variable interpolation, so it can be set dynamically at runtime. An optional destinationVar field can be provided to store the resulting data source ID in a named variable for use in later blocks.

What does the block return after creating a data source?

The block returns two fields: dataSourceId, which is the unique ID of the newly created data source, and name, which is the resolved name of the data source after any variable interpolation has been applied.

Does the block create the data source with any content already in it?

No. The data source is created empty. To add content, you would use a separate block such as the Upload Data Source Document block, passing in the dataSourceId returned by this block.

What kinds of workflows commonly use this block?

This block is typically used at the beginning of workflows that need to build or manage vector databases at runtime — for example, document ingestion pipelines, per-user or per-project knowledge base provisioning, and scheduled content refresh workflows.

Can the data source name be set dynamically?

Yes. The name field supports variable interpolation, which means you can construct the name using variables available in the workflow at the time the block runs.

Add Create Data Source to your workflow

Build powerful AI workflows with drag-and-drop blocks. No coding required.