All Products
Search
Document Center

MaxCompute:InstanceTunnel

Last Updated:Nov 02, 2023

This topic describes how to use InstanceTunnel to download the execution results of a SELECT statement.

Description

The following code snippet describes InstanceTunnel. For more information, visit Java-sdk-doc.

public class InstanceTunnel{
 public DownloadSession createDownloadSession(String projectName, String instanceID);
 public DownloadSession createDownloadSession(String projectName, String instanceID, boolean limitEnabled);
 public DownloadSession getDownloadSession(String projectName, String id);
 }

Parameters:

  • projectName: the name of a project.

  • instanceID: the ID of an instance. For more information about how to view instance IDs, see View instance information.

Limits

InstanceTunnel provides an easy way to obtain instance execution results. However, it is subject to the following permission limits to ensure data security:

  • If the number of records does not exceed 10,000, all users who have read permissions on the specific instance can use InstanceTunnel to download the data. The same rule applies to data queries by calling a RESTful API.

  • If the number of records exceeds 10,000, only users who have read permissions on all the source tables in the SQL query statement can use InstanceTunnel to download the data.

  • If the endpoint that is used to access the MaxCompute service is a public endpoint, the users are charged for data downloads. For more information about public endpoints, see Endpoints.

  • If the download control feature is enabled, users who use public endpoints to download data must have the related download permissions. For more information about the authorization, see Download control.