GetFile
Retrieves the details of a file.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace ID. You must specify either this parameter or the ProjectIdentifier parameter to determine the DataWorks workspace on which the API operation is performed. |
10000 |
| ProjectIdentifier |
string |
No |
The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace name. You must specify either this parameter or the ProjectId parameter to determine the DataWorks workspace on which the API operation is performed. |
dw_project |
| FileId |
integer |
No |
The ID of the file. You can call the ListFiles operation to query the ID of the file. |
100000001 |
| NodeId |
integer |
No |
The ID of the scheduling node. You can call the ListFiles operation to obtain the node ID. |
200000001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| ErrorMessage |
string |
The error message. |
The connection does not exist. |
| RequestId |
string |
The request ID. You can use the ID to troubleshoot issues. |
0000-ABCD-EFG**** |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The file details. |
|
| File |
object |
The basic information about the file. |
|
| CommitStatus |
integer |
The current commit status of the file. Valid values:
|
0 |
| AutoParsing |
boolean |
Indicates whether the automatic parsing feature is enabled for the file. Valid values:
This parameter corresponds to the Code parsing setting when you select Same cycle for Scheduling dependencies in the Scheduling configuration section of a data development node in the DataWorks console. |
true |
| Owner |
string |
The Alibaba Cloud user ID of the file owner. |
7775674356**** |
| CreateTime |
integer |
The timestamp when the file was created. Unit: milliseconds. |
1593879116000 |
| FileType |
integer |
The code for the file type. Each file type has a different code. For more information, see DataWorks nodes. |
10 |
| CurrentVersion |
integer |
The latest version number of the file that has been submitted. |
3 |
BizId
deprecated
|
integer |
The ID of the workflow to which the file belongs. [Deprecated] This field is deprecated. Use the BusinessId field instead. |
1000001 |
| LastEditUser |
string |
The Alibaba Cloud user ID of the user who last modified the file. |
424732**** |
| FileName |
string |
The name of the file. |
ods_user_info_d |
| ConnectionName |
string |
The name of the data source used when the node corresponding to the file is run. |
odps_source |
| UseType |
string |
The functional module to which the file belongs. Valid values:
|
NORMAL |
| FileFolderId |
string |
The ID of the folder to which the file belongs. |
2735c2**** |
| ParentId |
integer |
The ID of the composite node file to which the current file belongs if the current file is an internal file of a composite node file. |
-1 |
| CreateUser |
string |
The Alibaba Cloud user ID of the user who created the file. |
424732**** |
| IsMaxCompute |
boolean |
Indicates whether the resource file needs to be uploaded to MaxCompute. This parameter is required only when the file is a MaxCompute resource file. |
true |
| BusinessId |
integer |
The ID of the workflow to which the file belongs. |
1000001 |
| FileDescription |
string |
The description of the file. |
My first DataWorks file |
| DeletedStatus |
string |
The deletion status of the file. Valid values:
|
RECYCLE |
| LastEditTime |
integer |
The timestamp when the file was last modified. Unit: milliseconds. |
1593879116000 |
| Content |
string |
The code in the file. |
SHOW TABLES; |
| NodeId |
integer |
The ID of the scheduling node generated in the scheduling system after the file is submitted. |
300001 |
| AdvancedSettings |
string |
The advanced settings of the task. This field corresponds to Advanced Settings in the right-side navigation pane of the edit page for an EMR data development task in the DataWorks console. Note
EMR Shell tasks do not support advanced parameters. For details about the advanced parameters of each EMR task type, see Develop EMR nodes. |
{\"priority\":\"1\",\"ENABLE_SPARKSQL_JDBC\":false,\"FLOW_SKIP_SQL_ANALYZE\":false,\"queue\":\"default\"} |
| FileId |
integer |
The ID of the file. |
100000001 |
| NodeConfiguration |
object |
The scheduling configuration of the file. |
|
| RerunMode |
string |
The rerun mode. Valid values:
This parameter corresponds to the Rerun mode setting in the Time properties section of the Scheduling configuration tab for a data development node in the DataWorks console. |
ALL_ALLOWED |
| SchedulerType |
string |
The scheduling type. Valid values:
|
NORMAL |
| Stop |
boolean |
Indicates whether scheduling is paused. Valid values:
This parameter corresponds to the Pause scheduling setting in the Scheduling type section of the Time properties section in the Scheduling configuration tab for a data development node in the DataWorks console. |
false |
| ParaValue |
string |
The scheduling parameters. This parameter corresponds to the Parameters setting in the Scheduling configuration tab for a data development node in the DataWorks console. For more information, see Configure scheduling parameters. |
a=x b=y |
| StartEffectDate |
integer |
The timestamp when automatic scheduling starts. Unit: milliseconds. This parameter corresponds to the start time in the Effective date setting in the Time properties section of the Scheduling configuration tab for a data development node in the DataWorks console. |
936923400000 |
| EndEffectDate |
integer |
The timestamp when automatic scheduling stops. Unit: milliseconds. This parameter corresponds to the end time in the Effective date setting in the Time properties section of the Scheduling configuration tab for a data development node in the DataWorks console. |
4155787800000 |
| CycleType |
string |
The type of the scheduling cycle. Valid values: NOT_DAY (minute and hour) and DAY (day, week, and month). This parameter corresponds to the Scheduling cycle setting in the Time properties section of the Scheduling configuration tab for a data development node in the DataWorks console. |
DAY |
| DependentNodeIdList |
string |
The IDs of the nodes on which the current file depends when This field corresponds to the setting for Other nodes under Previous cycle in the scheduling dependency configuration for a data development task in the DataWorks console. |
5,10,15,20 |
| ResourceGroupId |
integer |
The resource group used when the node is run after the file is published. You can call the ListResourceGroups operation to query the resource groups available in the workspace. |
375827434852437 |
| DependentType |
string |
The dependency mode for the previous cycle. Valid values:
|
USER_DEFINE |
| AutoRerunTimes |
integer |
The number of automatic reruns allowed when an error occurs. |
3 |
| AutoRerunIntervalMillis |
integer |
The interval between automatic reruns when an error occurs. Unit: milliseconds. This parameter corresponds to the Rerun interval setting in the Time properties section of the Scheduling configuration tab for a data development node in the DataWorks console. The unit of the Rerun interval setting in the console is minutes. Convert the time unit when you call the operation. |
120000 |
| CronExpress |
string |
The cron expression for the timed scheduling of the file. |
00 05 00 * * ? |
| InputList |
array<object> |
The output information of the upstream files on which the file depends. |
|
|
object |
The output information of the upstream files on which the file depends. |
||
| Input |
string |
The output name of the upstream file on which the file depends. This parameter corresponds to the Parent node output name setting when you select Same cycle for Scheduling dependencies in the Scheduling configuration tab for a data development node in the DataWorks console. |
project.001_out |
| ParseType |
string |
The method used to configure the dependencies of the file. Valid values:
|
MANUAL |
| OutputList |
array<object> |
The output information of the file. |
|
|
object |
The output information of the file. |
||
| RefTableName |
string |
The output value of the file. This parameter corresponds to the Output table of current node column when you select Same cycle for Scheduling dependencies in the Scheduling configuration tab for a data development node in the DataWorks console. |
ods_user_info_d |
| Output |
string |
The output name of the file. This parameter corresponds to the Output name of current node column when you select Same cycle for Scheduling dependencies in the Scheduling configuration tab for a data development node in the DataWorks console. |
dw_project.002_out |
| StartImmediately |
boolean |
Indicates whether the node is started immediately after it is published. This parameter corresponds to the Startup method setting in the Time properties section of the Configuration tab for an EMR Spark Streaming or EMR Streaming SQL data development node in the DataWorks console. |
true |
| InputParameters |
array<object> |
The input parameters. |
|
|
object |
The input parameters. |
||
| ParameterName |
string |
The name of the input parameter in the node context. You can reference the parameter in the code by using the ${...} format. This parameter corresponds to the Parameter name setting in the Input parameters of current node section of the Node context tab in the Scheduling configuration tab for a data development node in the DataWorks console. |
input |
| ValueSource |
string |
The value source of the input parameter in the node context. This parameter corresponds to the Value source setting in the Input parameters of current node section of the Node context tab in the Scheduling configuration tab for a data development node in the DataWorks console. |
project_001.parent_node:outputs |
| OutputParameters |
array<object> |
The output parameters. |
|
|
object |
An output parameter. |
||
| ParameterName |
string |
The name of the output parameter in the node context. This parameter corresponds to the Parameter name setting in the Output parameters of current node section of the Node context tab in the Scheduling configuration tab for a data development node in the DataWorks console. |
output |
| Value |
string |
The expression of the output parameter in the node context. This parameter corresponds to the Value setting in the Output parameters of current node section of the Node context tab in the Scheduling configuration tab for a data development node in the DataWorks console. |
${bizdate} |
| Type |
string |
The type of the expression for the output parameter in the node context. Valid values:
This parameter corresponds to the Type setting in the Output parameters of current node section of the Node context tab in the Scheduling configuration tab for a data development node in the DataWorks console. |
1 |
| Description |
string |
The description of the output parameter in the node context. |
It's a context output parameter. |
| ApplyScheduleImmediately |
string |
Indicates whether the scheduling configuration takes effect immediately after the node is published. |
true |
| IgnoreParentSkipRunningProperty |
string |
Indicates whether to skip the dry-run property of upstream nodes in the previous cycle in the scheduling configuration. |
true |
| Timeout |
integer |
The timeout period defined in the scheduling configuration. |
1 |
| ImageId |
string |
The ID of the custom image. |
m-bp1h4b5a8ogkbll2f3tr |
| ResourceDownloadLink |
object |
The resource download URL. |
|
| downloadLink |
string |
The link to the resource download URL. |
http://xx |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"ErrorMessage": "The connection does not exist.",
"RequestId": "0000-ABCD-EFG****",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"File": {
"CommitStatus": 0,
"AutoParsing": true,
"Owner": "7775674356****",
"CreateTime": 1593879116000,
"FileType": 10,
"CurrentVersion": 3,
"BizId": 1000001,
"LastEditUser": "424732****\n",
"FileName": "ods_user_info_d",
"ConnectionName": "odps_source",
"UseType": "NORMAL",
"FileFolderId": "2735c2****",
"ParentId": -1,
"CreateUser": "424732****\n",
"IsMaxCompute": true,
"BusinessId": 1000001,
"FileDescription": "My first DataWorks file",
"DeletedStatus": "RECYCLE",
"LastEditTime": 1593879116000,
"Content": "SHOW TABLES;",
"NodeId": 300001,
"AdvancedSettings": "{\\\"priority\\\":\\\"1\\\",\\\"ENABLE_SPARKSQL_JDBC\\\":false,\\\"FLOW_SKIP_SQL_ANALYZE\\\":false,\\\"queue\\\":\\\"default\\\"}",
"FileId": 100000001
},
"NodeConfiguration": {
"RerunMode": "ALL_ALLOWED",
"SchedulerType": "NORMAL",
"Stop": false,
"ParaValue": "a=x b=y",
"StartEffectDate": 936923400000,
"EndEffectDate": 4155787800000,
"CycleType": "DAY",
"DependentNodeIdList": "5,10,15,20",
"ResourceGroupId": 375827434852437,
"DependentType": "USER_DEFINE",
"AutoRerunTimes": 3,
"AutoRerunIntervalMillis": 120000,
"CronExpress": "00 05 00 * * ?",
"InputList": [
{
"Input": "project.001_out",
"ParseType": "MANUAL"
}
],
"OutputList": [
{
"RefTableName": "ods_user_info_d",
"Output": "dw_project.002_out"
}
],
"StartImmediately": true,
"InputParameters": [
{
"ParameterName": "input",
"ValueSource": "project_001.parent_node:outputs"
}
],
"OutputParameters": [
{
"ParameterName": "output",
"Value": "${bizdate}",
"Type": "1",
"Description": "It's a context output parameter."
}
],
"ApplyScheduleImmediately": "true",
"IgnoreParentSkipRunningProperty": "true",
"Timeout": 1,
"ImageId": "m-bp1h4b5a8ogkbll2f3tr"
},
"ResourceDownloadLink": {
"downloadLink": "http://xx"
}
}
}
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. | |
| 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.