All Products
Search
Document Center

MaxCompute:Overview of SDK for Go

Last Updated:Oct 30, 2024

The Go SDK is a set of Go programming language interfaces provided by MaxCompute. Through these interfaces, you can use Go code to operate and manage MaxCompute services, through means such as accessing and managing projects, manipulating data tables, and performing data transfers.

Version information

You can visit GitHub to download the source code for the MaxCompute Go SDK. For detailed information about the Go SDK, see MaxCompute Go SDK API documentation.

User guide

Procedure

Description

Step 1: Install the Go SDK

The instructions in this step walk you through the MaxCompute Go SDK installation process.

Step 2: Configure access credentials of the Go SDK

You need to configure the access credentials for initializing the credential provider before sending MaxCompute requests by using the Go SDK. Alibaba Cloud services use these access credentials to authenticate identity and access privileges.

Step 3: Initialize the MaxCompute SDK

You need to create an ODPS object to initialize the MaxCompute SDK. The ODPS object serves as the entry point for the MaxCompute SDK. All object collections within the project space, such as projects, tables, and instances, are obtained through the ODPS object.

Step 4: Additional actions

Execute SQL

You can execute various MaxCompute SQL commands by using the run method of the SQLTask object or the MaxCompute SQL Driver.

Data upload and download

You can batch upload and download data for tables or partitions by using the Tunnel. Additionally, you can write data into tables or partitions by using the MaxCompute Streaming Tunnel. For more information, see Overview of streaming tunnel.

Table management, Partition management

You can use the Go SDK to manipulate tables or partitions, in ways such as retrieving information or deleting tables and partitions.

Instance management

This explains how to use the instance object, which is returned after SQL execution in MaxCompute, so that you can monitor the execution status and results.

Permission management

You can manage permissions by using the relevant commands for permission operations.

Logview

You can view and debug MaxCompute jobs that you have submitted by using Logview.