All Products
Search
Document Center

MaxCompute:Overview of MaxFrame APIs

Last Updated:Jul 22, 2024

MaxFrame APIs are classified into compatibility APIs and MaxFrame-specific APIs. Compatibility APIs integrate with various standard libraries, such as Pandas, to facilitate data processing. MaxFrame-specific APIs are introduced for distributed execution of tasks. When you use MaxFrame APIs to develop jobs, you can obtain data manipulation experience similar to that of standard databases and efficiently run large-scale data processing tasks on the MaxFrame platform.

MaxFrame-specific APIs

API type

API name

Description

Task session

new_session

Starts a MaxFrame job session. The new_session method is called at the beginning of the script to initialize the execution of the entire task. Subsequent data processing is performed based on the interaction between the session object constructed during initialization and the backend service.

Input/Output

read_odps_table

Builds a DataFrame object based on the data of an entire MaxCompute table, specific partitions of the table, or specific columns of the table.

read_odps_query

Builds a DataFrame object based on the query results of MaxCompute SQL statements.

to_odps_table

Writes DataFrame data to a MaxCompute table.

Task execution

execute

Executes a task. MaxFrame uses a delayed computing model. Task execution is triggered only when the execute method is called. This API allows data conversions to be delayed to the end of the pipeline. This way, multiple operations can be executed at the same time in a single task. This reduces the amount of data transmitted between the client and the database and improves performance.

Acquisition of task results

fetch

Obtains the computing result of a task. The computing result is not directly transmitted to the client. This can reduce the amount of transmitted data and the workload on the client. To check part of the result data, you can call the fetch method after the execute method to retrieve the result data.

MaxFrame for Pandas

Pandas APIs supported by MaxFrame