GetFile
Retrieves the details of a file.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
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 for the API operation. |
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 for the API operation. |
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 |
The response. |
||
| 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 call was successful. Valid values:
|
true |
| Data |
object |
The details of the file. |
|
| File |
object |
The basic information about the file. |
|
| CommitStatus |
integer |
The current commit status of the file. Valid values: 0 (the latest code is not committed) and 1 (the latest code is committed). |
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 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 committed version number of the file. |
3 |
BizId
deprecated
|
integer |
[Deprecated] The ID of the business flow to which the file belongs. Use the BusinessId parameter instead. |
1000001 |
| LastEditUser |
string |
The Alibaba Cloud user ID of the user who last edited the file. |
62465892**** |
| 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 executed. |
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 combo node file to which the current file belongs if the current file is an internal file of a combo 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 business flow 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 edited. 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 committed. |
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 configurations of the file. |
|
| RerunMode |
string |
The rerun policy. Valid values:
This parameter corresponds to the Rerun parameter in the Schedule section of the Properties 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 Schedule section of the Properties tab for a data development node in the DataWorks console. |
false |
| ParaValue |
string |
The scheduling parameters. This parameter corresponds to the Parameters section in the Properties 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 of the Effective Date setting in the Schedule section of the Properties 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 of the Effective Date setting in the Schedule section of the Properties tab for a data development node in the DataWorks console. |
4155787800000 |
| CycleType |
string |
The scheduling cycle type. Valid values: NOT_DAY (minute and hour) and DAY (day, week, and month). This parameter corresponds to the Scheduling Cycle setting in the Schedule section of the Properties 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 executed after the file is published. You can call the ListResourceGroups operation to query the available resource groups in the workspace. |
375827434852437 |
| DependentType |
string |
The dependency type for the previous cycle. Valid values:
|
USER_DEFINE |
| AutoRerunTimes |
integer |
The maximum number of automatic reruns allowed after an error occurs. |
3 |
| AutoRerunIntervalMillis |
integer |
The interval between automatic reruns after an error occurs. Unit: milliseconds. This parameter corresponds to the Rerun Interval setting in the Auto Rerun upon Error section of the Properties 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 outputs of the upstream files on which the file depends. |
|
|
object |
The output information of the dependent upstream file. |
||
| 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 Dependencies in the Scheduling Configuration section of a data development node in the DataWorks console. |
project.001_out |
| ParseType |
string |
The method used to configure dependencies for the file. Valid values:
|
MANUAL |
| OutputList |
array<object> |
The outputs of the file. This parameter corresponds to the Output Name of Current Node setting when you select Same Cycle for Dependencies in the Scheduling Configuration section of a data development node in the DataWorks console. |
|
|
object |
The output information of the file. |
||
| RefTableName |
string |
The output value of the file. This parameter corresponds to the value in the Output Table of Current Node column when you select Same Cycle for Dependencies in the Scheduling Configuration section of 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 value in the Output Name of Current Node column when you select Same Cycle for Dependencies in the Scheduling Configuration section of a data development node in the DataWorks console. |
dw_project.002_out |
| StartImmediately |
boolean |
Indicates whether the node starts immediately after it is published. This parameter corresponds to the Startup Method setting in the Configuration > Schedule section in the right-side navigation pane of the editing page for an EMR Spark Streaming or EMR Streaming SQL data development node in the DataWorks console. |
true |
| InputParameters |
array<object> |
The input parameters in the node context. This parameter corresponds to the Input Parameters of Current Node setting in the Node Context section of the Properties tab for a data development node in the DataWorks console. |
|
|
object |
The input parameter. |
||
| 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 Properties 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 Properties tab for a data development node in the DataWorks console. |
project_001.parent_node:outputs |
| OutputParameters |
array<object> |
The output parameters in the node context. This parameter corresponds to the Output Parameters of Current Node setting in the Node Context section of the Properties tab for a data development node in the DataWorks console. |
|
|
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 Properties 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 Properties 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 Properties 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 configurations take 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. |
true |
| Timeout |
integer |
The timeout period defined in the scheduling configurations. |
1 |
| ImageId |
string |
The ID of the custom image. |
m-bp1h4b5a8ogkbll2f3tr |
| ResourceDownloadLink |
object |
The resource download URL. |
|
| downloadLink |
string |
The URL for downloading the resource. |
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": "62465892****",
"FileName": "ods_user_info_d",
"ConnectionName": "odps_source",
"UseType": "NORMAL",
"FileFolderId": "2735c2****",
"ParentId": -1,
"CreateUser": "424732****",
"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.