CreateDataFlowTask
Create a data flow task.
Operation description
-
CPFS usage notes
Data flow is supported only on CPFS 2.2.0 and later. You can view the version information on the file system details page in the console.
Data flow tasks execute asynchronously. You can query the task status by calling the DescribeDataFlowTasks operation. Task duration depends on the amount of data. For large datasets, split the workload into multiple tasks.
You can create data flow tasks only on a data flow that is in the Running state.
Manually running a data flow task pauses the corresponding automatic data update task.
When you create an export task, ensure that the absolute path of each file to be exported from CPFS does not exceed 1,023 characters.
-
CPFS AI-Computing Edition usage notes
Data flow is supported only on CPFS AI-Computing Edition 2.4.0 and later. You can view the version information on the file system details page in the console.
Data flow tasks execute asynchronously. You can query the task status by calling the DescribeDataFlowTasks operation. Task duration depends on the amount of data. For large datasets, split the workload into multiple tasks.
You can create data flow tasks only on a data flow that is in the Running state.
When you create an export task, ensure that the absolute path of each file to be exported from CPFS AI-Computing Edition does not exceed 1,023 characters.
CPFS AI-Computing Edition supports two task types: batch tasks and streaming tasks. For more information, see Task types.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:CreateDataFlowTask |
create |
*DataFlow
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The ID of the file system.
|
cpfs-099394bd928c**** |
| DataFlowId |
string |
Yes |
The ID of the data flow. |
df-194433a5be31**** |
| SrcTaskId |
string |
No |
If you specify Note
Data flow streaming tasks are not supported. |
task-29ee8e890f45**** |
| TaskAction |
string |
No |
The type of the data flow task. Valid values:
Note
CPFS AI-Computing Edition supports only |
Import |
| DataType |
string |
No |
The data type that the data flow task operates on. Valid values:
|
Metadata |
| Directory |
string |
No |
The source directory of the data. Limits:
Note
|
/path_in_cpfs/ |
| EntryList |
string |
No |
The list of files for the data flow task to execute. Limits:
|
["/path_in_cpfs/file1", "/path_in_cpfs/file2"] |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run for this creation request. A dry run checks parameter validity and inventory without creating an instance or incurring charges. Valid values:
|
false |
| ClientToken |
string |
No |
A client-generated token that ensures the idempotence of the request. The token must be unique across different requests.
Note
If you do not specify this parameter, the system automatically uses the |
123e4567-e89b-12d3-a456-42665544**** |
| ConflictPolicy |
string |
No |
The conflict policy for files with the same name. Valid values:
Note
This parameter is required if the file system is a CPFS AI-Computing Edition instance. |
SKIP_THE_FILE |
| DstDirectory |
string |
No |
The destination directory for the data flow task mapping. Limits:
Note
|
/path_in_cpfs/ |
| CreateDirIfNotExist |
boolean |
No |
Specifies whether to automatically create the directory if it does not exist. Valid values:
Note
|
false |
| Includes |
string |
No |
Filters the subdirectories under the Note
|
["/test/","/test1/"] |
| TransferFileListPath |
string |
No |
Specifies an OSS directory. Data is synchronized based on the content of the CSV files in this directory. The following limits apply.
Note
|
/test_oss_path/ |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
2D69A58F-345C-4FDE-88E4-BF518948**** |
| TaskId |
string |
The Dataflow task ID. |
task-38aa8e890f45**** |
Examples
Success response
JSON format
{
"RequestId": "2D69A58F-345C-4FDE-88E4-BF518948****",
"TaskId": "task-38aa8e890f45****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalCharacters | The parameter contains illegal characters. | The parameter contains illegal characters. |
| 400 | MissingFileSystemId | FileSystemId is mandatory for this action. | |
| 400 | MissingDataFlowId | DataFlowId is mandatory for this action. | |
| 400 | InvalidFilesystemVersion.NotSupport | This Api does not support this fileSystem version. | This Api does not support this fileSystem version. |
| 403 | OperationDenied.InvalidState | The operation is not permitted when the status is processing. | The operation is not permitted when the status is processing. |
| 403 | OperationDenied.DependencyViolation | The operation is denied due to dependancy violation. | |
| 403 | OperationDenied.DataFlowNotSupported | The operation is not supported. | |
| 404 | InvalidParameter.InvalidFormat | The EntryList format is invalid. | |
| 404 | InvalidParameter.SizeTooLarge | The specified EntryList size exceeds 64 KB. | |
| 404 | InvalidDataFlow.NotFound | The specified data flow does not exist. | |
| 404 | InvalidTaskAction.NotSupported | The task action is not supported. | |
| 404 | InvalidTaskAction.PermissionDenied | The task action is not allowed. | |
| 404 | InvalidSrcTaskId.NotFound | The SrcTaskId is not found. | |
| 404 | InvalidDataType.NotSupported | The data type is not supported. | |
| 404 | InvalidSrcTaskId.TaskIdInvalid | Source task ID is invalid. | |
| 404 | InvalidSrcTaskId.TaskIdNotFound | Source task ID is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.