Create and manage datasets
Prerequisites
You must purchase the unstructured data feature for your current instance to use the dataset feature.
Usage limit
Datasets can only be created in a Basic project.
Permissions
Besides project administrators and developers, members with the data processing-edit permission can create, edit, delete, and move datasets, acquire locks, and create dataset versions, while those with the data processing-execute permission can submit datasets.
Create a dataset
In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.
In the top navigation bar of the Development page, select Project.
In the left-side navigation pane, choose Data Processing > Dataset. In the Dataset list, click the
icon to open the New dataset tab. Configure the parameters as needed.Offline
Parameter
Description
Basic Information
Name
Enter a name for the dataset. The name can be up to 256 characters long and can contain any characters.
Use Case
Select Offline.
Dataset Type
Select File Dataset, Table Dataset, or Hybrid Dataset. The default is File Dataset.
Object Storage Type, Metadata Storage Type
Object Storage Type: If you select File Dataset or Hybrid Dataset, you can use OSS, Amazon S3, or OBS data sources.
Metadata Storage Type: If you select Table Dataset or Hybrid Dataset, you must configure a metadata table to describe the dataset. You can select PostgreSQL, Milvus, Lindorm (wide-column), or OceanBase (MySQL tenant).
Content Type
Select Text, Image, Audio, or Video.
Directory
Select the directory to store the dataset.
If a suitable directory does not exist, create one:
Above the compute task list on the left, click the
icon to open the New Folder dialog box.In the New Folder dialog box, enter a Name and select a Directory.
Click OK.
Owner
Select an owner for the dataset. You can select any member in the current tenant. The current user is the owner by default.
Subject Domain (Optional)
Select the subject domain for the dataset. You can select any subject domain within the workspace that contains the current project.
Description (Optional)
Enter a description for the dataset. The description can be up to 2,000 characters long.
Version Configuration
Version
The version of the dataset. The default is V1 upon creation.
Description (Optional)
Enter a description for the dataset version. The description can be up to 2,000 characters long.
File Storage
NoteYou can configure file storage for File Datasets and Hybrid Datasets.
Data Source
Select a data source that matches the object storage type.
Production Path
Select the folder in the production data source that contains the data to process. If the data spans multiple folders, select their closest common parent folder.
ImportantIf the data source is restricted to a specific directory in the bucket, you can only select subdirectories within that directory.
Processing individual files in the root directory is not supported.
Mount Path
Enter a mount path. The path can contain letters, digits, underscores (_), and hyphens (-). The path is prefixed with
/mnt/data/.Metadata Storage
NoteYou can configure metadata storage for Table Datasets and Hybrid Datasets.
Data Source
Select a data source that matches the metadata storage type.
Production database/schema
Select an available database or schema from the chosen production data source.
Store To
You can store the data in a New Table or an Existing Table.
Table Name
Store to New Table: Enter a table name. The name can contain lowercase letters, digits, and underscores (_). It must start with a lowercase letter and be up to 64 characters long.
Store to Existing Table: Select a table from the specified database or schema. You can search for tables by name.
NoteWhen you select an existing table, the system automatically populates the table schema with its fields. You cannot modify the imported fields, their types, descriptions, or the primary key. Additionally, you cannot define the table schema by importing from a table, editing DDL, or adding fields. You can click Reload Table Schema to load the complete and latest table schema.
Table Schema
You can define the table schema using one of three methods: Import from Table, Edit DDL, or Add Field.
Import from Table: Click Import from Table. In the Add Field from Table dialog box, select a Data Source, Schema, and Source Table. Then, select one or more fields from the field list and click Add.
For the data source, you can select any data source under the current tenant whose storage type is consistent with the metadata storage. The selection is not limited to the data source selected for the current dataset. For the Schema, you can select a schema from the selected data source. If you do not select a schema, the one configured in the data source is used by default.
Edit DDL: Click Edit DDL. In the Edit DDL dialog box, you can edit the DDL statement for the current fields.
Add Field: Click Add Field to add a blank field to the table schema for you to configure.
After adding fields, you can configure the Field Name, Field Type, whether the field is a Primary Key, Is URL (configurable only for hybrid datasets), Not Null (configurable only for Milvus metadata tables), and the Field Description.
Field Name: The name must start with a lowercase letter, can contain only lowercase letters, digits, and underscores (_), and be up to 64 characters long.
Field Type: The supported field types depend on the metadata storage type.
PostgreSQL
The supported field types are Text, Numeric, Datetime, boolean, json, vector, and Other.
If the field type is vector, you can click Vector Configuration to configure the model and index for the field.
NoteIf the Vector extension is not installed for the selected metadata storage data source, the vector type is not supported.
Embedding model, Output Dimension: You can select any enabled Vector model from Intelligent Application Management > Model Configuration. The model determines the output dimension.
Create Index: Specifies whether to create an index. The default is Yes. If you select No, the subsequent index parameters are disabled.
Index type: You can select IVFFlat or HNSW. Different index types require different fields. For more information, see Appendix: Settings for different index types.
Similarity metric type: You can select COSINE, L2 (Euclidean), or IP (Inner Product).
Milvus
The supported field types are Numeric, Dense Vector, VARCHAR, JSON, ARRAY, Binary Vector, and Sparse Vector.
If you select the VARCHAR field type, you must specify a maximum length (1 to 65,535).
If you select a Dense Vector (non-INT8_VECTOR) field type, you can click Vector Configuration to configure the model and index for the field.
Embedding model, Output Dimension: You can select any enabled Vector model from Intelligent Application Management > Model Configuration. The model determines the output dimension.
Create Index: Specifies whether to create an index. The default is Yes. If you select No, the subsequent index parameters are disabled.
Index type: You can select AUTOINDEX, FLAT, IVF_FLAT, IVF_SQ8, IVF_PQ, IVF_RABITQ, HNSW, HNSW_SQ, HNSW_PQ, HNSW_PRQ, DISKANN, SCANN, or AISAQ. Different index types require different fields. For more information, see Appendix: Settings for different index types.
Similarity metric type: You can select COSINE, L2 (Euclidean), or IP (Inner Product).
Lindorm (wide-column)
The supported field types are Text, Numeric, Datetime, boolean, and Binary.
OceanBase (MySQL tenant)
The supported field types are Numeric, Datetime, Character, Text, and Vector.
For DECIMAL and NUMERIC field types, you must specify precision as [x,y], where x is the total number of digits (1-65) and y is the number of decimal places (0-30). The default is [10,0].
For DATETIME and TIMESTAMP field types, you must configure the number of fractional seconds. The default is 0, and the value must be an integer from 0 to 6.
For CHAR, VARCHAR, BINARY, and VARBINARY field types, you must configure the character length.
CHAR: The default is 128. The value must be an integer from 0 to 256.
VARCHAR: The default is 512. The value must be an integer from 0 to 262,144.
BINARY: The default is 1. The value must be an integer from 1 to 256.
VARBINARY: The default is 1. The value must be an integer from 1 to 1,048,576.
For the ARRAY field type, you must configure the element type. Supported element types are TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, and VARCHAR. If the element type is VARCHAR, you must configure the character length. The default is 512, and the value must be an integer from 0 to 262,144.
If the field type is vector, you can click Vector Configuration to configure the model and index for the field.
Embedding model, Output Dimension: You can select any enabled Vector model from Intelligent Application Management > Model Configuration. The model determines the output dimension.
Create Index: Specifies whether to create an index. The default is Yes. If you select No, the subsequent index parameters are disabled.
Index type: You can select HNSW, HNSW_SQ, HNSW_BQ, IVF, or IVF_PQ. Different index types require different fields. For more information, see Appendix: Settings for different index types.
Similarity metric type: You can select COSINE, L2 (Euclidean), or IP (Inner Product).
Primary Key:
If the metadata storage type is PostgreSQL, you can define only one single-column primary key. The field must be of a numeric or text type.
If the metadata storage type is Milvus, you can define only one single-column primary key. The field must be of the INT64 or VARCHAR type.
If the metadata storage type is Lindorm (wide-column), you can set multiple fields as the primary key (a composite primary key).
If the metadata storage type is OceanBase (MySQL tenant), you can set fields of numeric (except Decimal), datetime, character, and text (STRING) types as the primary key.
Is URL: This option is only available for text fields within a hybrid dataset.
Not Null: This option is available when the metadata storage type is Milvus. Primary key fields and dense vector fields are not null by default. For other field types, you can specify whether the field can be null.
Field Description (Optional): Enter a description for the field. The description can be up to 1,024 characters long.
Real-time
Parameter
Description
Basic Information
Name
Enter a name for the dataset. The name can be up to 256 characters long and can contain any characters.
Use Case
Select Real-time.
Dataset Type
Select Table Dataset or Hybrid Dataset. The default is Table Dataset.
Object Storage Type, Metadata Storage Type
Object Storage Type: If you select Hybrid Dataset, you can use OSS, Amazon S3, or OBS data sources.
Metadata Storage Type: If you select Table Dataset or Hybrid Dataset, you must configure a metadata table to describe the dataset. Currently, only Real-time Metatable is supported.
Content Type
Select Text, Image, Audio, or Video.
Directory
Select the directory to store the dataset.
If a suitable directory does not exist, create one:
Above the compute task list on the left, click the
icon to open the New Folder dialog box.In the New Folder dialog box, enter a Name and select a Directory.
Click OK.
Owner
Select an owner for the dataset. You can select any member in the current tenant. The current user is the owner by default.
Subject Domain (Optional)
Select the subject domain for the dataset. You can select any subject domain within the workspace that contains the current project.
Description (Optional)
Enter a description for the dataset. The description can be up to 2,000 characters long.
Version Configuration
Version
The version of the dataset. The default is V1 upon creation.
Description (Optional)
Enter a description for the dataset version. The description can be up to 2,000 characters long.
File Storage
NoteFile storage can be configured only for Hybrid Datasets.
Data Source
Select a data source that matches the object storage type.
Production Path
Select the folder in the production data source that contains the data to process. If the data spans multiple folders, select their closest common parent folder.
ImportantIf the data source is restricted to a specific directory in the bucket, you can only select subdirectories within that directory.
Processing individual files in the root directory is not supported.
Mount Path
Enter a mount path. The path can contain letters, digits, underscores (_), and hyphens (-). The path is prefixed with
/mnt/data/.Metadata Storage
NoteYou can configure metadata storage for Table Datasets and Hybrid Datasets.
Data Source Type
Select a data source that matches the metadata storage type. For example, if the metadata storage type is Kafka, the options include all Kafka data sources in the current tenant (production data sources only).
Metatable
You can select submitted Flink real-time metatables across projects. After you select a metatable, the system verifies that the current user has read and write permissions on all metatables. If a workflow attempts to write to a read-only metatable, the workflow fails.
Table Schema
After you select a metatable, its table schema is synchronized from the real-time metatable. The fields are read-only. You can click Reload Table Schema to get the latest field list.
Online
Parameter
Description
Basic Information
Name
Enter a name for the dataset. The name must be 4 to 100 characters in length, can contain Chinese characters, letters, digits, and underscores (_), and must start with a Chinese character or a letter.
Use Case
Select Online. To select this use case, you must first initialize API Gateway. To do so, navigate to Data Service > Service Management > Network Configuration.
API ID
This field is read-only. An ID is generated automatically after you submit the dataset.
Data Service Project
The project for the API, which defines its scope for authorization, throttling, and metering. The default project is the built-in Unstructured Online Service Project. If you have not purchased the Data Service value-added module for the current instance, this parameter cannot be modified. If you have purchased the module, you can select another data service project in the current tenant.
API Group
Select an API group in API Gateway. This determines the routing prefix and authorization policy.
Dataset Type
The value is set to Dataset API and cannot be changed.
Content Type
Select Text, Image, Audio, or Video.
Directory
Select the directory to store the dataset.
If a suitable directory does not exist, create one:
Above the compute task list on the left, click the
icon to open the New Folder dialog box.In the New Folder dialog box, enter a Name and select a Directory.
Click OK.
Owner
Select an owner for the dataset. You can select any member in the current tenant. The current user is the owner by default.
Subject Domain (Optional)
Select the subject domain for the dataset. You can select any subject domain within the workspace that contains the current project.
Dataset Description (Optional)
Enter a description for the dataset. The description can be up to 1,024 characters long.
API Basic Configuration
Version
The version of the dataset. The default is V1 upon creation.
Version Description (Optional)
Enter a description for the dataset version. The description can be up to 128 characters long.
Protocol
Currently, only the HTTP protocol is supported.
Operation Type
Select Single Query (GET) or List Query (LIST). Single Query returns a single record, while List Query returns a list of records. This setting cannot be changed after creation.
Invocation Mode
Select Synchronous or Asynchronous. The default is Asynchronous. A synchronous call returns the result immediately. An asynchronous call returns a task ID, which you must use to query the execution result.
Execution Timeout
Defines the maximum execution time for the backend workflow. This parameter is required only for the Asynchronous invocation mode. The default is 60 seconds, and the value must be a positive integer from 1 to 7,200 (2 hours).
Timeout
Defines the maximum duration of an API call. For Synchronous mode, the default is 3 seconds, and the value must be a positive integer from 3 to 60. For Asynchronous mode, the default is 600 seconds, and the value must be a positive integer from 3 to 7,200 (2 hours).
File Storage
NoteThis feature is disabled by default. When enabled, you can map URL fields in request and response parameters to file paths in object storage. This allows downstream operators to directly read and write files. When disabled, the Is URL option for request and response parameters cannot be selected.
Object Storage Type
You can use OSS, Amazon S3, or OBS data sources.
Data Source
Select a data source that matches the object storage type.
Production Path
Select the folder in the production data source that contains the data to process. If the data spans multiple folders, select their closest common parent folder.
ImportantIf the data source is restricted to a specific directory in the bucket, you can only select subdirectories within that directory.
Processing individual files in the root directory is not supported.
Mount Path
Enter a mount path. The path can contain letters, digits, underscores (_), and hyphens (-). The path is prefixed with
/mnt/data/.Request Parameters
Parameter Name
The name can contain only letters, digits, and underscores (_). Parameter names must be unique within the same API in a project.
Parameter Type
Select STRING, INT, LONG, DOUBLE, FLOAT, BOOLEAN, or DATE.
Default Value (Optional)
The value used if a caller omits this parameter.
Example (Optional)
Enter an example value for the parameter, which is used for API documentation and call testing.
Description (Optional)
Enter a description for the parameter.
Required
If selected, this parameter is mandatory for API calls.
Is URL
Specifies whether the parameter value is a file URL. This option can be selected only if file storage is enabled.
Response Parameters
Parameter Name
The naming conventions are the same as for request parameters. If the invocation mode is Asynchronous, the system automatically adds the
task_idandstatusparameters.Parameter Type
The parameter types are the same as for request parameters.
Example (Optional)
Enter an example value for the parameter, which is used for API documentation.
Description (Optional)
Enter a description for the parameter.
Is URL
Specifies whether the parameter value is a file URL. This option can be selected only if file storage is enabled.
After completing the configuration, click Submit.
Upon submission, the system automatically performs object and permission checks. You can view the details in the Submission Details dialog box. For more information, see Dataset Submission Instructions.
Index type configuration
The valid range of values for an index field depends on the data source and is listed in the 'Field Value' column.
Check which indexes your data source's vector field supports.
Type | Parameter | Value |
IVF | nlist: The number of clusters to partition the dataset into. | OceanBase (MySQL tenant): Defaults to 128. Accepts an integer in the range of [1, 65536]. |
sample_per_nlist: The number of data points to sample for each cluster center. | OceanBase (MySQL tenant): Defaults to 256. Accepts an integer in the range of [1, 9223372036854775807]. | |
IVF_FLAT | nlist: The number of clusters to partition the dataset into. | Milvus/PostgreSQL: Defaults to 128. Accepts an integer in the range of [1, 65536]. |
IVF_SQ8 | nlist: The number of clusters to partition the dataset into. | Milvus: Defaults to 128. Accepts an integer in the range of [1, 65536]. |
IVF_PQ | nlist: The number of clusters to partition the dataset into. |
|
m: The number of sub-vectors for product quantization. Must be an integer that evenly divides the vector dimension. |
| |
nbits: The number of quantization bits for each sub-vector. |
| |
sample_per_nlist: The number of data points to sample for each cluster center. | OceanBase (MySQL tenant): Defaults to 256. Accepts an integer in the range of [1, 9223372036854775807]. | |
IVF_RABITQ | nlist: The number of clusters to partition the dataset into. | Milvus: Defaults to 128. Accepts an integer in the range of [1, 65536]. |
refine (Optional): Enables a refinement process to store the refined data. Default: disabled. | N/A | |
refine_type: The data precision for the refinement process when | N/A | |
HNSW | M: The maximum number of connections for each node. |
|
efConstruction: Search width during index construction. |
| |
ef_search: The candidate set size for searches. This is a search parameter whose default value can be set at index creation. | OceanBase (MySQL tenant): Defaults to 64. Accepts an integer in the range of [1, 1000]. | |
extra_info_max_size: The maximum size for storing primary key information in the index. This parameter supports a narrower range of primary key types than the native database. Therefore, a field's eligibility as a native primary key does not guarantee support. | OceanBase (MySQL tenant): Unit: bytes. Defaults to 0. Accepts an integer in the range of [0, 16384].
| |
HNSW_SQ | M: The maximum number of connections for each node. |
|
efConstruction: Search width during index construction. |
| |
sq_type: The scalar quantization type. Supported values are SQ6, SQ8, BF16, FP16, and FP32. Defaults to SQ8. | N/A | |
refine: Enables a refinement process to improve search precision. Default: disabled. | N/A | |
refine_type: The data precision for the refinement process when | N/A | |
ef_search: The candidate set size for searches. This is a search parameter whose default value can be set at index creation. | OceanBase (MySQL tenant): Defaults to 64. Accepts an integer in the range of [1, 1000]. | |
extra_info_max_size: The maximum size for storing primary key information in the index. This parameter supports a narrower range of primary key types than the native database. Therefore, a field's eligibility as a native primary key does not guarantee support. | OceanBase (MySQL tenant): Unit: bytes. Defaults to 0. Accepts an integer in the range of [0, 16384].
| |
HNSW_BQ | M: The maximum number of connections for each node. | OceanBase (MySQL tenant): Defaults to 16. Accepts an integer in the range of [5, 128]. |
ef_construction: Search width during index construction. | OceanBase (MySQL tenant): Defaults to 200. Accepts an integer in the range of [5, 1000]. | |
refine_k: The rerank ratio for quantized vector searches. | OceanBase (MySQL tenant): Defaults to 4.0. Accepts a floating-point number in the range of [1.0, 1000.0]. | |
refine_type: The construction precision for the quantized index. Supported values are SQ8 and FP32. Defaults to SQ8. | N/A | |
bq_bits_query: The search precision for quantized vectors. | OceanBase (MySQL tenant): Unit: bit. Defaults to 32. Supported values: 0, 4, 32. | |
bq_use_fht: Enables Fast Hadamard Transform (FHT). | OceanBase (MySQL tenant): Boolean. Defaults to | |
ef_search: The candidate set size for searches. This is a search parameter whose default value can be set at index creation. | OceanBase (MySQL tenant): Defaults to 64. Accepts an integer in the range of [1, 1000]. | |
extra_info_max_size: The maximum size for storing primary key information in the index. This parameter supports a narrower range of primary key types than the native database. Therefore, a field's eligibility as a native primary key does not guarantee support. | OceanBase (MySQL tenant): Unit: bytes. Defaults to 0. Accepts an integer in the range of [0, 16384].
| |
HNSW_PQ/HNSW_PRQ | M: The maximum number of connections for each node. | Milvus: Defaults to 30. Accepts an integer in the range of [2, 2048]. |
efConstruction: Search width during index construction. | Milvus: Defaults to 360. Accepts an integer in the range of [1, ∞]. | |
m: The number of sub-vectors for product quantization. Must be an integer that evenly divides the vector dimension. | N/A | |
nbits: The number of quantization bits for each sub-vector. | Milvus: Defaults to 8. Accepts an integer in the range of [1, 16]. | |
refine: Enables a refinement process to improve search precision. Default: disabled. | N/A | |
refine_type: The data precision for the refinement process when | N/A | |
SCANN | nlist: The number of clusters to partition the dataset into. | Milvus: Defaults to 128. Accepts an integer in the range of [1, 65536]. |
with_raw_data: Stores raw vectors in the index to enable reranking. | N/A | |
AISAQ | max_degree: The maximum number of connections for each node in the graph. | Milvus: Defaults to 56. Accepts an integer in the range of [1, 512]. |
search_list_size: Candidate pool size for nearest neighbor search during index construction. | Milvus: Defaults to 100. Accepts an integer in the range of [1, 512]. | |
pg_code_budget_gb_ratio: The product quantization (PQ) compression ratio relative to the raw data size. | Milvus: Defaults to 0.125. Accepts a floating-point number in the range of [0.0, 0.25]. | |
AUTOINDEX FLAT DISKANN | N/A | N/A |
Manage datasets
On the top navigation bar of the Dataphin homepage, select Lab > Data Development.
In the top navigation bar of the Develop page, select a project.
In the left-side navigation pane, choose Data Processing > Dataset. In the Dataset list, click a dataset to view its details. If a dataset has multiple versions, you can click the different version tabs to view the information for each version. The following table describes other supported operations.
Actions
Description
View dataset information
For offline and real-time datasets: You can view basic information, including the dataset type, storage type (for file and hybrid datasets only), content type, owner, creation time, and description. On each version tab, you can view the file storage (for file and hybrid datasets only) and metadata storage (for table and hybrid datasets only) for that version.
For API datasets: You can view basic information, including the API ID, associated Data Service project, API group, dataset type, content type, owner, and creation time. On each version tab, you can also view the API basic configuration, file storage, request parameters, response parameters, and referenced workflows for that version.
The Referenced Workflows section displays the online workflow bound to the current version. This includes the workflow name (which you can click to go to the workflow configuration canvas), status, binding status, owner, description, and last publish time. Each API dataset version binds to a single online workflow, so only one record is displayed per version.
Edit basic dataset information
To edit the dataset's basic information, click Edit in the top menu bar of the dataset tab.
For offline and real-time datasets, you cannot modify the dataset type, object storage type, metadata storage type, content type, or owner. For descriptions of other modifiable parameters, refer to the instructions for creating a new dataset.
For an API dataset, you cannot modify the use case, API ID, dataset type, or Data Service project. For descriptions of other modifiable parameters, refer to the instructions for creating a new dataset.

Edit a dataset version
On the dataset tab, click Edit for a specific version to edit its description and mount path.
When editing an API dataset version, you can only modify the Version Description. You cannot change other settings. To make other changes, you must create a new dataset version.

Create a dataset version
On the dataset tab, click Create Dataset Version. You can select Create from Latest Version or Create Empty Version. For parameter descriptions, see the instructions for creating a dataset.
Delete a version
You can delete versions as long as at least one version remains. You cannot delete a version that has an object reference.
To delete an API dataset version with a binding status of BOUND, you must first take the bound online workflow offline and then delete the workflow. After the version is deleted, its corresponding route in the gateway is also removed. This does not affect other versions of the same dataset.
Delete a dataset
In the dataset directory on the left, click the More icon next to the dataset and select Delete. In the dialog box that appears, enter remarks in the Remarks field and click Confirm and Submit.
NoteYou cannot delete a dataset that has an object reference. You must remove the reference first.
API datasets can only be deleted; they cannot be taken offline. You cannot delete a dataset if it is referenced by an online workflow with a BOUND binding status. You must first take the referenced workflow offline and then delete the workflow.
