Queries the details of a file.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetFile

The operation that you want to perform.

ProjectId Long Yes 10000

The ID of the DataWorks workspace. You can click the Workspace Manage icon in the upper-right corner of the DataStudio page to go to the Workspace Management page and view the workspace ID.

RegionId String Yes cn-zhangjiakou

The region ID.

ProjectIdentifier String No dw_project

The unique identifier of the DataWorks workspace. You can click the identifier in the upper-left corner of the DataStudio page to switch to another workspace.

You must specify either this parameter or ProjectId to determine the DataWorks workspace to which the operation is applied.

FileId Long No 100000001

The ID of the file. You can call the ListFiles operation to query the ID.

Response parameters

Parameter Type Example Description
Data Struct

The details of the file.

File Struct

The basic information of the file.

BizId Long 1000001

The ID of the workflow to which the file belongs.

CommitStatus Integer 0

Indicates whether the latest code is committed. Valid values: 0 and 1. The value 0 indicates that the latest code is not committed. The value 1 indicates that the latest code is committed.

ConnectionName String odps_first

The ID of the compute engine instance that is used to run the node that corresponds to the file.

Content String SHOW TABLES;

The code in the file.

CreateTime Long 1593879116000

The timestamp at which the instance was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

CreateUser String 424732****

The ID of the Alibaba Cloud account used to create the file.

CurrentVersion Integer 3

The latest version number of the file.

FileDescription String My first DataWorks file

The description of the file.

FileFolderId String 2735c2****

The ID of the folder to which the file belongs.

FileName String ods_user_info_d

The name of the file.

FileType Integer 10

The type of the code in the file. Valid values: 6 (Shell), 10 (MaxCompute SQL), 11 (MaxCompute MR), 23 (Data Integration), 24 (MaxCompute script), 99 (Virtual node), 221 (PyODPS 2), 225 (MaxCompute Spark), 227 (EMR Hive), 228 (EMR Spark), 229 (EMR Spark SQL), 230 (EMR MR), 239 (OSS object inspection), 257 (EMR Shell), 258 (EMR Spark Shell), 259 (EMR Presto), 260 (EMR Impala), 900 (Real-time synchronization), 1089 (Cross-tenant collaboration node), 1091 (Hologres development), 1093 (Hologres SQL), 1100 (Assignment node), and 1221 (PyODPS 3).

IsMaxCompute Boolean true

Indicates whether the file needs to be uploaded to MaxCompute.

This parameter is returned only if the file is a MaxCompute resource file.

LastEditTime Long 1593879116000

The timestamp at which the file was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

LastEditUser String 62465892****

The ID of the Alibaba Cloud account used to last modify the file.

NodeId Long 300001

The ID of the auto triggered node that is generated in the scheduling system after the file is committed.

Owner String 7775674356****

The ID of the Alibaba Cloud account used by the file owner.

ParentId Long -1

The ID of the node group file to which the current file belongs. This parameter is returned only if the current file is an inner file of the node group file.

UseType String 0

The functional module to which the file belongs. Valid values: NORMAL, MANUAL, MANUAL_BIZ, SKIP, ADHOCQUERY, and COMPONENT. The value SKIP indicates that the node corresponding to the file is run in dry-run mode.

NodeConfiguration Struct

The scheduling configurations of the file.

AutoRerunIntervalMillis Integer 120000

The interval between automatic reruns after an error occurs. Unit: milliseconds. The value is the same as the interval that you specify by using the Error automatic rerun interval parameter in the DataWorks console. You can specify the Error automatic rerun interval parameter in the Schedule section of the Properties panel. The interval that you specify in the DataWorks console is measured in minutes. Pay attention to the difference between the units of time when you call the operation.

AutoRerunTimes Integer 3

The maximum number of automatic reruns that are allowed after an error occurs.

CronExpress String 00 05 00 * * ?

The cron expression that represents the time-based scheduling policy of the node.

CycleType String DAY

The type of the scheduling cycle. Valid values: NOT_DAY and DAY. The value NOT_DAY indicates that the node is scheduled to run by minute or hour. The value DAY indicates that the node is scheduled to run by day, week, or month. The value is the same as the scheduling type that you specify by using the Instance Recurrence parameter in the DataWorks console. You can specify the Instance Recurrence parameter in the Schedule section of the Properties panel.

DependentNodeIdList String 5,10,15,20

The IDs of the auto triggered nodes on which the current node depends. The IDs are separated by commas (,). This parameter is returned when the DependentType parameter is set to USER_DEFINE. The values are the same as the IDs that you specify in the field that appears after Cross-Cycle Dependencies is selected and the Depend On parameter is set to Instances of Custom Nodes in the DataWorks console. You can specify the IDs in the Schedule section of the Properties panel.

DependentType String USER_DEFINE

The way in which the node depends on last-cycle instances. Valid values: NONE, SELF, CHILD, and USER_DEFINE. The value NONE indicates that the node does not depend on last-cycle instances. The value SELF indicates that the node depends on its own last-cycle instance. The value CHILD indicates that the node depends on the last-cycle instances of its descendant nodes. The value USER_DEFINE indicates that the node depends on the last-cycle instances of specified nodes.

EndEffectDate Long 4155787800000

The time at which the automatic scheduling was ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. The value is the same as the time that you specify by using the Start and End Dates parameter in the DataWorks console. You can specify the Start and End Dates parameter in the Schedule section of the Properties panel.

InputList Array of NodeInputOutput

The output names of the ancestor files on which the current file depends. The values are the same as the output names of the ancestor nodes in the DataWorks console. The output names are displayed in the Parent Node Output Name column in the Dependencies section of the Properties panel.

Input String project.001_out

The output name of the ancestor file on which the current file depends. The value is the same as the output name of the ancestor node in the DataWorks console. The output name is displayed in the Parent Node Output Name column in the Dependencies section of the Properties panel.

OutputList Array of NodeInputOutput

The output names of the current file. The values are the same as the output names in the DataWorks console. The output names are displayed in the Output Name column in the Dependencies section of the Properties panel.

Output String dw_project.002_out

The output name of the current file. The value is the same as the output name in the DataWorks console. The output name is displayed in the Output Name column in the Dependencies section of the Properties panel.

RefTableName String ods_user_info_d

The output table names of the current file. The values are the same as the output table names in the DataWorks console. The output table names are displayed in the Output Table Name column in the Dependencies section of the Properties panel.

ParaValue String a=x b=y

The scheduling parameters of the node. The values are the same as the scheduling parameters that you specify by using the Arguments parameter. You can specify the Arguments parameter in the General section of the Properties panel.

RerunMode String ALL_ALLOWED

Indicates whether the node can be rerun. Valid values: ALL_ALLOWED, FAILURE_ALLOWED, and ALL_DENIED. The value ALL_ALLOWED indicates that the node can be rerun regardless of whether the last running is successful. The value FAILURE_ALLOWED indicates that the node can be rerun only if the last running fails. The value ALL_DENIED indicates that the node cannot be rerun regardless of whether the last running is successful. The value is the same as the setting of the Rerun parameter in the Schedule section of the Properties panel.

ResourceGroupId Long 375827434852437

The ID of the resource group that is used to run the node. You can call the ListResourceGroups operation to query the available resource groups in the workspace.

StartEffectDate Long 936923400000

The start time of automatic scheduling. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. The value is the same as the start time that you specify by using the Start and End Dates parameter in the DataWorks console. You can specify the Start and End Dates parameter in the Schedule section of the Properties panel.

Stop Boolean false

Indicates whether the scheduling for the node is suspended. The value is the same as the setting of the Skip Execution parameter in the DataWorks console. You can specify the Skip Execution parameter in the Schedule section of the Properties panel.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

ErrorMessage String The connection does not exist.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0000-ABCD-EFG****

The ID of the request. You can troubleshoot issues based on the ID.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetFile
&ProjectId=10000
&RegionId=cn-zhangjiakou
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <File>
        <Owner>7775674356****</Owner>
        <TaskRerunIntervalMillis>120000</TaskRerunIntervalMillis>
        <CycleType>DAY</CycleType>
        <InputList>
            <Input>project.001_out</Input>
        </InputList>
        <InputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </InputList>
        <Stop>false</Stop>
        <FileName>ods_user_info_d</FileName>
        <CurrentVersion>3</CurrentVersion>
        <IsMaxCompute>true</IsMaxCompute>
        <CronExpress>00 05 00 * * ?</CronExpress>
        <ConnectionName>odps_first</ConnectionName>
        <StartEffectDate>936923400000</StartEffectDate>
        <CommitStatus>0</CommitStatus>
        <FileFolderId>2735c2c19d58</FileFolderId>
        <ParentId>-1</ParentId>
        <TaskRerunTime>3</TaskRerunTime>
        <CreateTime>1593879116000</CreateTime>
        <UseType>0</UseType>
        <DependentType>USER_DEFINE</DependentType>
        <CreateUser>424732742562</CreateUser>
        <LastEditTime>1593879116000</LastEditTime>
        <EndEffectDate>4155787800000</EndEffectDate>
        <FileDescription>My first DataWorks file</FileDescription>
        <DependentNodeIdList>5,10,15,20</DependentNodeIdList>
        <FileType>10</FileType>
        <Content>SHOW TABLES;</Content>
        <LastEditUser>624658926432862</LastEditUser>
        <NodeId>300001</NodeId>
        <RerunMode>ALL_ALLOWED</RerunMode>
        <ParaValue>a=x b=y</ParaValue>
        <BizId>1000001</BizId>
        <OutputList>
            <Input>project.001_out</Input>
        </OutputList>
        <OutputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </OutputList>
    </File>
    <NodeConfiguration>
        <Owner>7775674356****</Owner>
        <TaskRerunIntervalMillis>120000</TaskRerunIntervalMillis>
        <CycleType>DAY</CycleType>
        <InputList>
            <Input>project.001_out</Input>
        </InputList>
        <InputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </InputList>
        <Stop>false</Stop>
        <FileName>ods_user_info_d</FileName>
        <CurrentVersion>3</CurrentVersion>
        <IsMaxCompute>true</IsMaxCompute>
        <CronExpress>00 05 00 * * ?</CronExpress>
        <ConnectionName>odps_first</ConnectionName>
        <StartEffectDate>936923400000</StartEffectDate>
        <CommitStatus>0</CommitStatus>
        <FileFolderId>2735c2c19d58</FileFolderId>
        <ParentId>-1</ParentId>
        <TaskRerunTime>3</TaskRerunTime>
        <CreateTime>1593879116000</CreateTime>
        <UseType>0</UseType>
        <DependentType>USER_DEFINE</DependentType>
        <CreateUser>424732742562</CreateUser>
        <LastEditTime>1593879116000</LastEditTime>
        <EndEffectDate>4155787800000</EndEffectDate>
        <FileDescription>My first DataWorks file</FileDescription>
        <DependentNodeIdList>5,10,15,20</DependentNodeIdList>
        <FileType>10</FileType>
        <Content>SHOW TABLES;</Content>
        <LastEditUser>624658926432862</LastEditUser>
        <NodeId>300001</NodeId>
        <RerunMode>ALL_ALLOWED</RerunMode>
        <ParaValue>a=x b=y</ParaValue>
        <BizId>1000001</BizId>
        <OutputList>
            <Input>project.001_out</Input>
        </OutputList>
        <OutputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </OutputList>
    </NodeConfiguration>
</Data>
<ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
<ErrorMessage>The connection does not exist.</ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG****",
    "HttpStatusCode": 200,
    "Data": {
        "File": {
            "Owner": "7775674356****",
            "TaskRerunIntervalMillis": 120000,
            "CycleType": "DAY",
            "InputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ],
            "Stop": false,
            "FileName": "ods_user_info_d",
            "CurrentVersion": 3,
            "IsMaxCompute": true,
            "CronExpress": "00 05 00 * * ?",
            "ConnectionName": "odps_first",
            "StartEffectDate": 936923400000,
            "CommitStatus": 0,
            "FileFolderId": "2735c2c19d58",
            "ParentId": -1,
            "TaskRerunTime": 3,
            "CreateTime": 1593879116000,
            "UseType": 0,
            "DependentType": "USER_DEFINE",
            "CreateUser": 424732742562,
            "LastEditTime": 1593879116000,
            "EndEffectDate": 4155787800000,
            "FileDescription": "My first DataWorks file",
            "DependentNodeIdList": "5,10,15,20",
            "FileType": 10,
            "Content": "SHOW TABLES;",
            "LastEditUser": 624658926432862,
            "NodeId": 300001,
            "RerunMode": "ALL_ALLOWED",
            "ParaValue": "a=x b=y",
            "BizId": 1000001,
            "OutputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ]
        },
        "NodeConfiguration": {
            "Owner": "7775674356****",
            "TaskRerunIntervalMillis": 120000,
            "CycleType": "DAY",
            "InputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ],
            "Stop": false,
            "FileName": "ods_user_info_d",
            "CurrentVersion": 3,
            "IsMaxCompute": true,
            "CronExpress": "00 05 00 * * ?",
            "ConnectionName": "odps_first",
            "StartEffectDate": 936923400000,
            "CommitStatus": 0,
            "FileFolderId": "2735c2c19d58",
            "ParentId": -1,
            "TaskRerunTime": 3,
            "CreateTime": 1593879116000,
            "UseType": 0,
            "DependentType": "USER_DEFINE",
            "CreateUser": 424732742562,
            "LastEditTime": 1593879116000,
            "EndEffectDate": 4155787800000,
            "FileDescription": "My first DataWorks file",
            "DependentNodeIdList": "5,10,15,20",
            "FileType": 10,
            "Content": "SHOW TABLES;",
            "LastEditUser": 624658926432862,
            "NodeId": 300001,
            "RerunMode": "ALL_ALLOWED",
            "ParaValue": "a=x b=y",
            "BizId": 1000001,
            "OutputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ]
        }
    },
    "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
    "ErrorMessage": "The connection does not exist.",
    "Success": true
}

Error codes

Http status code Error code Error message Description
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal system error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal system error has occurred. Try again later.
403 ResourceNotAuthorized.Api You are not authorized to access the resources. The error message returned because you are not authorized to access the resources.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted in a short period of time. Try again later.

For a list of error codes, visit the API Error Center.