Updates a created file.
Operation description
When you debug or call this operation, the parameter values that you specify must be different from the existing file configurations of the node. For example, if a parameter of the source node is set to A, you must change the value to B before you submit the request. If you still specify A, an invalid exception is returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileFolderPath |
string |
No |
The path of the file. |
Business_process/First_Business_Process/data_integration/Folder_1/Folder_2 |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. You can logon to the DataWorks console and go to the Storage Management page to obtain the ID. |
100001 |
| FileName |
string |
No |
The name of the file. You can modify the file name by setting FileName to a new value. For example, call the ListFiles operation to query the file ID in the target folder, and then call the UpdateFile operation to specify the file ID for the FileId parameter and configure the FileName parameter to rename the file. |
ods_user_info_d |
| FileDescription |
string |
No |
The description of the file. |
Here is the file description |
| Content |
string |
No |
The code content of the file. Files of different code types (fileType) have different code formats. In Operation Center, right-click a node of the corresponding type and select View Code to view the specific code format. |
SELECT "1"; |
| AutoRerunTimes |
integer |
No |
The number of automatic reruns after an error occurs. |
3 |
| AutoRerunIntervalMillis |
integer |
No |
The interval between automatic reruns upon an error, in milliseconds. The maximum value is 1800000 milliseconds (30 minutes). This parameter corresponds to the Rerun Interval setting under Scheduling Configuration > Time Properties > Auto Rerun upon Error for a data development node in the DataWorks console. The time unit for Rerun Interval in the console is minutes. Convert the time accordingly when calling this operation. |
120000 |
| RerunMode |
string |
No |
The rerun property. Valid values:
This parameter corresponds to the Rerun Property setting under Scheduling Configuration > Time Properties > Rerun Property for a data development node in the DataWorks console. |
ALL_ALLOWED |
| Stop |
boolean |
No |
Specifies whether to pause scheduling. Valid values:
This parameter corresponds to the setting when Scheduling Type is set to Pause Scheduling under Scheduling Configuration > Time Properties > Scheduling Type for a data development node in the DataWorks console. |
false |
| ParaValue |
string |
No |
The scheduling parameters. This parameter corresponds to the Parameters setting under Scheduling Configuration for a data development node in the DataWorks console. For more information, see Scheduling parameters. |
x=a y=b z=c |
| StartEffectDate |
integer |
No |
The timestamp in milliseconds when automatic scheduling starts. This parameter corresponds to the start time in milliseconds under Scheduling Configuration > Time Properties > Effective Date for a data development node in the DataWorks console. |
936923400000 |
| EndEffectDate |
integer |
No |
The timestamp in milliseconds when automatic scheduling stops. This parameter corresponds to the end time in milliseconds under Scheduling Configuration > Time Properties > Effective Date for a data development node in the DataWorks console. |
4155787800000 |
| CronExpress |
string |
No |
The cron expression for timed scheduling. This parameter corresponds to the cron Expression setting under Scheduling Configuration > Time Property for a data development node in the DataWorks console. After you configure the Scheduling Epoch and Timed Scheduling time, DataWorks automatically generates the corresponding cron expression. Examples:
The cron expression has the following limits due to the DataWorks scheduling system rules:
|
00 00-59/5 1-23 * * ? |
| CycleType |
string |
No |
The type of the scheduling cycle. Valid values: NOT_DAY (minute or hour) and DAY (day, week, or month). This parameter corresponds to the Scheduling Cycle setting under Scheduling Configuration > Time Properties for a data development node in the DataWorks console. Valid values:
|
NOT_DAY |
| DependentType |
string |
No |
The mode in which the node depends on the previous cycle. Valid values:
|
USER_DEFINE |
| DependentNodeIdList |
string |
No |
The IDs of the nodes on which the current file depends when DependentType is set to USER_DEFINE. Separate multiple node IDs with commas (,). This parameter corresponds to the Settings when you select Other Nodes as the dependency after configuring Scheduling Configuration > Scheduling Dependency to Previous Epoch for a data development node in the DataWorks console. This is part of the parameter settings for scheduling dependencies. |
5,10,15,20 |
| InputList |
string |
No |
The output names of the upstream files on which the current file depends. Separate multiple output names with commas (,). This parameter corresponds to the Parent Node Output Name setting when you select Same Cycle under Scheduling Configuration > Scheduling Dependency for a data development node in the DataWorks console. Note
This parameter is required when you create a batch synchronization node by calling CreateDISyncTask and UpdateFile. |
project_root,project.file1,project.001_out |
| ProjectIdentifier |
string |
No |
The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Settings page to obtain the workspace name. You must specify either this parameter or ProjectId to determine the DataWorks workspace for this API call. |
dw_project |
| FileId |
integer |
Yes |
The ID of the file. You can call the ListFiles operation to obtain the file ID. |
100000001 |
| OutputList |
string |
No |
The output of the file. This parameter corresponds to the Output Name of Current Node setting when you select Same Cycle under Scheduling Configuration > Scheduling Dependency for a data development node in the DataWorks console. |
dw_project.ods_user_info_d |
| ResourceGroupIdentifier |
string |
No |
The schedule resource used when the file is published as a node and the node runs. You can call the ListResourceGroups operation to obtain the list of available resource groups for the workspace. |
default_group |
| ConnectionName |
string |
No |
The identifier of the data source used when the node corresponding to the file runs. You can call the ListDataSources operation to obtain the list of available data sources. |
odps_source |
| Owner |
string |
No |
The user ID of the file owner. |
18023848927592 |
| AutoParsing |
boolean |
No |
Specifies whether to enable the automatic parsing feature for the file. Valid values:
This parameter corresponds to the Code Parsing setting when you select Same Cycle under Scheduling Configuration > Scheduling Dependency for a data development node in the DataWorks console. |
true |
| SchedulerType |
string |
No |
The scheduling type. Valid values:
Valid values:
|
NORMAL |
| AdvancedSettings |
string |
No |
The advanced settings of the node. This parameter corresponds to the Advanced Settings in the right-side navigation pane on the editing page for EMR Spark Streaming and EMR Streaming SQL data development nodes in the DataWorks console. Currently, only EMR Spark Streaming and EMR Streaming SQL nodes support this parameter. The parameter value is in JSON format. |
{"queue":"default","SPARK_CONF":"--conf spark.driver.memory=2g"} |
| StartImmediately |
boolean |
No |
Specifies whether to start the node immediately after publishing. Valid values:
This parameter corresponds to the Start Mode setting under Configuration > Time Properties in the right-side navigation pane on the editing page for EMR Spark Streaming and EMR Streaming SQL data development nodes in the DataWorks console. |
true |
| InputParameters |
string |
No |
The input context parameters of the node. The parameter value is in JSON format. For the fields included, refer to the InputContextParameterList parameter structure in the response of the GetFile operation. This parameter corresponds to the Input Parameters of Current Node setting under Scheduling Configuration > Node Context for a data development node in the DataWorks console. |
[{"ValueSource": "project_001.first_node:bizdate_param","ParameterName": "bizdate_input"}] |
| OutputParameters |
string |
No |
The output context parameters of the node. The parameter value is in JSON format. For the fields included, refer to the OutputContextParameterList parameter structure in the response of the GetFile operation. This parameter corresponds to the Output Parameters of Current Node setting under Scheduling Configuration > Node Context for a data development node in the DataWorks console. |
[{"Type": 1,"Value": "${bizdate}","ParameterName": "bizdate_param"}] |
| IgnoreParentSkipRunningProperty |
boolean |
No |
Specifies whether to skip the dry-run property of the upstream node under Scheduling Configuration > Previous Cycle. |
true |
| ApplyScheduleImmediately |
boolean |
No |
Specifies whether the scheduling configuration takes effect immediately after publishing. |
true |
| Timeout |
integer |
No |
The timeout setting for the scheduling configuration. |
1 |
| ImageId |
string |
No |
The custom image ID. |
m-uf6d7npxk1hhek8ng0cb |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| ErrorMessage |
string |
The error message. |
The connection does not exist. |
| RequestId |
string |
The unique ID of the request. You can use this ID to troubleshoot issues. |
0000-ABCD-EFGH-IJKLMNOPQ |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"ErrorMessage": "The connection does not exist.",
"RequestId": "0000-ABCD-EFGH-IJKLMNOPQ",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.