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.

RegionId String Yes cn-zhangjiakou

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

ProjectId Long No 10000

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the ID. You must specify either this parameter or ProjectIdentifier to determine the DataWorks workspace to which the operation is applied.

ProjectIdentifier String No dw_project

The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Settings panel to obtain the name. 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.

AutoParsing Boolean true

Indicates whether the automatic parsing feature is enabled for the file. This parameter corresponds to the Auto Parse parameter in the Dependencies section of the Properties tab in the DataWorks console.

BizId Long 1000001

The ID of the workflow to which the file belongs. This parameter is deprecated and replaced by the BusinessId parameter.

BusinessId Long 1000001

The ID of the workflow to which the file belongs.

CommitStatus Integer 0

Indicates whether the latest code in the file is committed. Valid values: 0 and 1. The value 0 indicates that the latest code in the file is not committed. The value 1 indicates that the latest code in the file 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 time when the file 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.

DeletedStatus String RECYCLE

The status of the file.

  • NORMAL: The file is not deleted.
  • RECYCLE_BIN: The file is stored in the recycle bin.
  • DELETED: The file is deleted.
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 (ODPS SQL), 11 (ODPS MR), 23 (Data Integration), 24 (ODPS Script), 99 (zero load), 221 (PyODPS 2), 225 (ODPS 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), 1091 (Hologres development), 1093 (Hologres SQL), 1100 (assignment), 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 time when the file was last modified. 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.

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 NORMAL

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.

This parameter corresponds to the Auto Rerun Interval upon Error parameter in the Schedule section of the Properties tab in the DataWorks console. The interval that you specify in the DataWorks console is measured in minutes. Pay attention to the conversion 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. This parameter corresponds to the Scheduling Cycle parameter in the Schedule section of the Properties tab in the DataWorks console.

DependentNodeIdList String 5,10,15,20

The IDs of the nodes on which the node corresponding to the file depends when the DependentType parameter is set to USER_DEFINE. Multiple IDs are separated by commas (,). This parameter corresponds to the field that appears after Dependency on Last Cycle is selected and the Depend On parameter is set to Instances of Custom Nodes in the Schedule section of the Properties tab in the DataWorks console.

DependentType String USER_DEFINE

The way in which the node that corresponds to the file 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 specific nodes.

EndEffectDate Long 4155787800000

The end 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. This parameter corresponds to the Validity Period parameter in the Schedule section of the Properties tab in the DataWorks console.

InputList Array of NodeInputOutput

The output names of the parent files on which the current file depends. This parameter corresponds to the Parent Node Output Name parameter in the Dependencies section of the Properties tab in the DataWorks console.

Input String project.001_out

The output name of the parent file on which the current file depends. This parameter corresponds to the Parent Node Output Name parameter in the Dependencies section of the Properties tab in the DataWorks console.

ParseType String MANUAL
OutputList Array of NodeInputOutput

The output names of the current file. This parameter corresponds to the Output Name parameter in the Dependencies section of the Properties tab in the DataWorks console.

Output String dw_project.002_out

The output name of the current file. This parameter corresponds to the Output Name parameter in the Dependencies section of the Properties tab in the DataWorks console.

RefTableName String ods_user_info_d

The output name of the current file. This parameter corresponds to the Output Table Name parameter in the Dependencies section of the Properties tab in the DataWorks console.

ParaValue String a=x b=y

The scheduling parameters. This parameter corresponds to the Parameters parameter in the General section of the Properties tab in the DataWorks console.

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.

This parameter corresponds to the Rerun parameter in the Schedule section of the Properties tab in the DataWorks console.

ResourceGroupId Long 375827434852437

The ID of the resource group that is used to run the node after the file is committed and deployed. 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. This parameter corresponds to the Validity Period parameter in the Schedule section of the Properties tab in the DataWorks console.

Stop Boolean false

Indicates whether the scheduling for the node that corresponds to the file is suspended. This parameter corresponds to the Skip Execution parameter in the Schedule section of the Properties tab in the DataWorks console.

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 use the ID to troubleshoot issues.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

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

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <File>
        <ParentId>-1</ParentId>
        <Owner>7775674356****</Owner>
        <CurrentVersion>3</CurrentVersion>
        <UseType>0</UseType>
        <FileName>ods_user_info_d</FileName>
        <CreateTime>1593879116000</CreateTime>
        <CreateUser>424732****</CreateUser>
        <IsMaxCompute>true</IsMaxCompute>
        <ConnectionName>odps_first</ConnectionName>
        <LastEditTime>1593879116000</LastEditTime>
        <FileDescription>My first DataWorks file</FileDescription>
        <FileType>10</FileType>
        <LastEditUser>62465892****</LastEditUser>
        <Content>SHOW TABLES;</Content>
        <CommitStatus>0</CommitStatus>
        <NodeId>300001</NodeId>
        <FileFolderId>2735c2****</FileFolderId>
        <BizId>1000001</BizId>
    </File>
    <NodeConfiguration>
        <EndEffectDate>4155787800000</EndEffectDate>
        <CycleType>DAY</CycleType>
        <ResourceGroupId>375827434852437</ResourceGroupId>
        <DependentNodeIdList>5,10,15,20</DependentNodeIdList>
        <AutoRerunIntervalMillis>120000</AutoRerunIntervalMillis>
        <StartEffectDate>936923400000</StartEffectDate>
        <Stop>false</Stop>
        <DependentType>USER_DEFINE</DependentType>
        <AutoRerunTimes>3</AutoRerunTimes>
        <RerunMode>ALL_ALLOWED</RerunMode>
        <ParaValue>a=x b=y</ParaValue>
        <CronExpress>00 05 00 * * ?</CronExpress>
        <InputList>
            <Input>project.001_out</Input>
        </InputList>
        <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":{"ParentId":"-1","Owner":"7775674356****","CurrentVersion":"3","UseType":"0","FileName":"ods_user_info_d","CreateTime":"1593879116000","CreateUser":"424732****","IsMaxCompute":"true","ConnectionName":"odps_first","LastEditTime":"1593879116000","FileDescription":"My first DataWorks file","FileType":"10","LastEditUser":"62465892****","Content":"SHOW TABLES;","DeletedStatus":"","CommitStatus":"0","NodeId":"300001","AutoParsing":"true","FileFolderId":"2735c2****","BizId":"1000001","BusinessId":"1000001"},"NodeConfiguration":{"EndEffectDate":"4155787800000","CycleType":"DAY","ResourceGroupId":"375827434852437","DependentNodeIdList":"5,10,15,20","AutoRerunIntervalMillis":"120000","StartEffectDate":"936923400000","Stop":"false","DependentType":"USER_DEFINE","AutoRerunTimes":"3","RerunMode":"ALL_ALLOWED","ParaValue":"a=x b=y","CronExpress":"00 05 00 * * ?","InputList":[{"ParseType":"","Input":"project.001_out"}],"OutputList":[{"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 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 error has occurred. Try again later.
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 within a short period of time. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or Ultimate Edition.

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