All Products
Search
Document Center

MaxCompute:Flag parameters

Last Updated:Mar 28, 2026

This topic lists the Flag parameters for MaxCompute. Search this page to find a parameter's scope, property name, and description.

Category

Scope

Parameter

Description

Value

Affected commands

Ecosystem

Session

console.sql.result.instancetunnel

Enables or disables InstanceTunnel. For more information about Tunnel commands, see Usage instructions.

  • True: Enabled.

  • False: Disabled.

SELECT

Scheduling

Session

odps.stage.mapper.mem

Sets the memory size for each map worker.

Range: 256 MiB to 12288 MiB. Default: 1024 MiB.

ALL

Scheduling

Session

odps.stage.reducer.mem

Sets the memory size for each reduce worker.

Range: 256 MiB to 12288 MiB. Default: 1024 MiB.

ALL

Scheduling

Session

odps.stage.joiner.mem

Sets the memory size for each join worker.

Range: 256 MiB to 12288 MiB. Default: 1024 MiB.

ALL

Scheduling

Session

odps.stage.mem

Sets the memory size for all workers in a specified MaxCompute task. This property has a lower priority than odps.stage.mapper.mem, odps.stage.reducer.mem, and odps.stage.joiner.mem.

Range: 256 MiB to 12288 MiB. No default value.

ALL

Scheduling

Session

odps.stage.mapper.split.size

Sets the input data size for each map worker, which corresponds to the split size of the input file. This indirectly controls the number of workers in each map stage.

Note
  • When you configure this item, avoid using Limit in SQL statements because Limit restricts a worker to a single concurrent operation.

  • You can use the Split size hint feature in MaxCompute to adjust the split size, control concurrency, and optimize computing performance.

Unit: MiB. Default: 256 MiB.

ALL

Scheduling

Session

odps.sql.split.size

Sets the size of a single data split for table-level parallel processing.

Unit: MiB.

Example: {"table1": 1024, "table2": 512}.

ALL

Scheduling

Session

odps.sql.split.row.count

Sets the number of rows in a single split for table-level parallel processing.

Note

Applies only to internal, non-transactional, and non-clustered tables.

An integer greater than 0.

Example: {"table1": 100, "table2": 500}.

ALL

Scheduling

Session

odps.sql.split.dop

Sets the table-level parallelism.

Note

Applies only to internal, non-transactional, and non-clustered tables.

An integer greater than 0.

Example: {"table1": 1, "table2": 5}.

ALL

Scheduling

Session

odps.stage.reducer.num

Sets the number of workers for each reduce stage.

Note

When you configure this setting, avoid using Limit in SQL statements because Limit restricts a worker to a single concurrent operation.

-

ALL

Scheduling

Session

odps.stage.joiner.num

Sets the number of workers for each join stage.

Note

When configuring this item, avoid using Limit in SQL statements because Limit limits the concurrency of a worker to one.

-

ALL

Scheduling

Session

odps.stage.num

Sets the concurrency (number of workers) for a specified MaxCompute task. This property has a lower priority than odps.stage.mapper.split.size, odps.stage.reducer.num, and odps.stage.joiner.num.

Note

When you configure this setting, you should avoid using Limit in SQL statements, because Limit restricts a worker to single-threaded execution.

-

ALL

Scheduling

Project

odps.instance.priority.enable

Enables or disables job priority for projects that use subscription resources. For more information about the job priority feature, see Job priority.

  • True: Enabled.

  • False: Disabled.

Note

Only the project owner or users who have the Super_Administrator role can enable this feature.

ALL

SQL

Session

odps.sql.reshuffle.dynamicpt

Enables or disables reshuffling for dynamic partitions to prevent the creation of too many small files.

  • True: Enabled.

  • False: Disabled.

Note

If only a few dynamic partitions are generated, set this property to False to prevent data skew.

  • INSERT INTO

  • INSERT OVERWRITE

SQL

Session

odps.sql.udf.getjsonobj.new

Specifies whether the GET_JSON_OBJECT function returns the original string without escaping special characters.

Note

For more information about the GET_JSON_OBJECT function, see String functions.

  • For MaxCompute projects created on or after January 21, 2021, the GET_JSON_OBJECT function returns the original string by default.

  • For MaxCompute projects created before January 21, 2021, the GET_JSON_OBJECT function escapes reserved JSON characters by default to avoid affecting existing jobs.

  • True: Enabled.

  • False: Disabled.

UDF

SQL

Session

odps.sql.udf.jvm.memory

An out-of-memory (OOM) error can occur if a UDF processes large amounts of data for in-memory computing or sorting. If this happens, you can increase this property's value. However, this is only a temporary solution, and optimizing the UDF code is the recommended long-term fix.

Range: 256 MiB to 12288 MiB. Default: 1024 MiB.

UDF

SQL

Session

odps.function.timeout

Sets the timeout duration for a UDF.

Range: 0s to 3600s. Default: 600s.

UDF

SQL

Session

odps.sql.session.resources

Specifies the resources referenced by a UDT. You can specify multiple resources, separated by commas (,).

For more information about referenced resources, see UDT overview.

Uploaded resources.

UDT

SQL

Session

odps.sql.udt.display.tostring

Specifies whether to wrap all columns whose final output type is a UDT with java.util.Objects.toString(...).

  • True: Enabled.

  • False: Disabled.

UDT

SQL

Session

odps.sql.session.java.imports

Specifies the Java packages referenced by a UDT. You can specify multiple packages, separated by commas (,). For more information about Java packages, see UDT overview.

Uploaded Java packages.

UDT

SQL

Session

odps.sql.skewjoin

Enables or disables the SKEWJOIN feature to mitigate data skew.

  • True: Enabled.

  • False: Disabled.

  • SELECT

  • JOIN

SQL

Session

odps.sql.skewinfo

Specifies the skewed keys and their corresponding values for a SKEWJOIN operation. For more information, see Optimize data skew.

-

  • SELECT

  • JOIN

SQL

Session

odps.sql.udf.ppr.deterministic

Specifies whether to enable partition pruning in UDFs. For more information about partition pruning, see WHERE clause (WHERE_condition).

  • True: Enabled.

  • False: Disabled.

UDF

SQL

Session

odps.sql.udf.ppr.to.subquery

Specifies whether to ignore errors when partition pruning information cannot be backfilled. For more information about partition pruning, see WHERE clause (WHERE_condition).

  • True: Enabled.

  • False: Disabled.

UDF

SQL

Session

odps.optimizer.enable.range.partial.repartitioning

Specifies whether to enable the shuffle remove mechanism for range-clustered tables.

  • True: Enabled.

  • False: Disabled.

  • INSERT OVERWRITE

  • CREATE TABLE

SQL

Session

odps.optimizer.merge.partitioned.table

When a query repeatedly uses the same partitioned table, enable this property to merge partitions. This action minimizes I/O on the table and improves performance.

  • True: Enabled.

  • False: Disabled.

SELECT

SQL

Session

odps.optimizer.skew.join.topk.num

Sets the number of hot keys that the optimizer collects when it runs an aggregate operation. For more information, see SKEWJOIN HINT.

-

SKEWJOIN HINT

SQL

Session

odps.optimizer.stat.collect.auto

Specifies whether to enable the Freeride feature, which automatically collects column statistics for tables. For more information about optimizer statistics collection, see Optimizer.

  • True: Enabled.

  • False: Disabled.

  • CREATE TABLE

  • INSERT INTO

  • INSERT OVERWRITE

SQL

Session

odps.optimizer.stat.collect.plan

Specifies a collection plan to collect statistics on specific columns. For more information about optimizer statistics collection, see Optimizer.

-

  • CREATE TABLE

  • INSERT INTO

  • INSERT OVERWRITE

SQL

Session

odps.sql.external.net.vpc

Specifies whether to enable VPC support for external tables. For more information, see Hologres external tables.

  • True: Enabled.

  • False: Disabled.

CREATE TABLE

SQL

Session

odps.sql.groupby.position.alias

Specifies whether to treat integer constants in a GROUP BY clause as column ordinals from the SELECT list.

  • True: Enabled.

  • False: Disabled.

  • SELECT

  • GROUP BY

SQL

Session

odps.sql.groupby.skewindata

Specifies whether to enable the anti-skew mechanism for GROUP BY operations.

  • True: Enabled.

  • False: Disabled.

GROUP BY

SQL

Session

odps.sql.orderby.position.alias

Specifies whether to treat integer constants in an ORDER BY clause as column ordinals from the SELECT list.

  • True: Enabled.

  • False: Disabled.

  • ORDER BY

  • SELECT

SQL

Session

odps.sql.mapjoin.memory.max

Sets the memory size for a small table loaded into memory during a MAPJOIN operation. Unit: MiB.

Note

This parameter is also subject to the global total memory limit at the Task level. The global upper limit on the total memory for multiple small tables within the same Task is std::min(8G, odps.sql.mapjoin.memory.max * number of small tables in the task).

取值范围:0 MiB~8192 MiB

JOIN

SQL

Session

odps.sql.distributed.map.join.memory.max

Sets the memory size for each HashTableBuilder instance during a MAPJOIN operation. The default value is 2048. Unit: MiB.

Range: 0 MiB to 8192 MiB

JOIN

SQL

Session

odps.sql.python.version

Sets the Python version for running SQL statements.

  • cp27

  • cp37

  • UDTF

  • UDAF

SQL

Session

odps.sql.select.output.format

Specifies whether to display the header row in results from the MaxCompute client. For more information about how to use the MaxCompute client, see Connect by using the client (odpscmd).

  • {""needHeader"":false,""fieldDelim"":""""}: Does not display the header information.

  • {""needHeader"":true,""fieldDelim"":""""}: Displays the header information.

ALL

SQL

Session

odps.sql.unstructured.data.oss.use.https

Specifies whether to retrieve data over HTTPS when you access an external table. For more information about OSS external tables, see ORC external tables.

  • True: Enabled.

  • False: Disabled.

ALL

SQL

Session

odps.sql.decimal.tostring.trimzero

Specifies whether to remove trailing zeros after the decimal point for the Decimal data type. The default value is True, which means that trailing zeros are removed by default.

  • True: Removes trailing zeros after the decimal point.

  • False: Keeps trailing zeros after the decimal point.

CAST

SQL

Session

odps.sql.unstructured.tablestore.put.row

Specifies whether to use the PutRow write mode for Tablestore external tables.

Note

For more information about PutRow, see PutRow.

  • True: Enabled.

  • False: Disabled.

ALL

SQL

Session

odps.sql.unstructured.external.max.dop

Sets the maximum concurrency for workers that access external tables.

An integer greater than 0.

External table queries and writes

SQL

Session/Project

odps.sql.unstructured.file.pattern.black.list

When MaxCompute SQL reads an external table from an OSS or HDFS location, it can automatically ignore the _SUCCESS file written by Spark to prevent read failures. For example, at the Session level:

CREATE EXTERNAL TABLE IF NOT EXISTS test_oss_pt( 
  t_id INT,
  t_string STRING)
PARTITIONED BY (pt1 INT,pt2 INT)
STORED BY 'com.aliyun.odps.CsvStorageHandler' 
WITH serdeproperties (
 'odps.properties.rolearn'='acs:ram::xxxxxx:role/aliyunodpsdefaultrole'
) 
LOCATION 'oss://oss-cn-hangzhou-internal.aliyuncs.com/oss-mc-test/Demo3/';

SET odps.sql.unstructured.file.pattern.black.list=.*_SUCCESS$;
INSERT INTO test_oss_pt PARTITION (pt1=8,pt2=8) VALUES (1,'tree');
SELECT t_id, t_string FROM test_oss_pt WHERE pt1=8 AND pt2=8;

Value: .*_SUCCESS$.

External table queries

SQL

Session

odps.meta.exttable.stats.onlinecollect

Data from external tables resides in data lakes. Because these are open, MaxCompute cannot manage their metadata locally. Without statistics, the optimizer often generates a conservative execution plan, resulting in poor performance.

When this feature is enabled, the optimizer can collect table statistics during query execution to identify small tables. This allows the optimizer to improve the query plan by using techniques such as hash joins, join order optimization, shuffle reduction, and shorter execution pipelines.

True: Enabled.

False (default): Disabled.

External table queries

SQL

Project

odps.sql.allow.fullscan

Specifies whether to allow full table scans in a project. Full table scans are resource-intensive. Disabling this feature is recommended for better performance.

  • True: Allows full table scans.

  • False: Prohibits full table scans.

SELECT

SQL

Project

odps.table.lifecycle

Specifies whether tables in a project must have a lifecycle configured.

  • Optional: The Lifecycle clause is optional when you create a table. If you do not configure a lifecycle for the table, the table never expires.

  • Mandatory: The Lifecycle clause is required. You must configure a lifecycle for the table.

  • Inherit: If a table is created without a specified lifecycle, its lifecycle is the value of odps.table.lifecycle.value.

CREATE TABLE

SQL

Project

odps.table.lifecycle.value

Sets the lifecycle of a table in days.

Range: 1 to 37231. Default: 37231.

CREATE TABLE

SQL

Project

READ_TABLE_MAX_ROW

Sets the number of rows that a SELECT statement returns.

Range: 1 to 10000. Default: 10000.

SELECT

SQL

Project

odps.output.field.formatter

Sets dynamic data masking rules for SQL query results. For more information about dynamic data masking in MaxCompute, see Dynamic data masking.

Custom dynamic data masking rules.

SELECT

SQL

Project

odps.sql.acid.table.enable

Specifies whether to enable the ACID mechanism. For more information about ACID, see ACID semantics.

  • True: Enabled.

  • False: Disabled.

ALL

SQL

Session/Project

odps.io.oss.use.vipserver

Specifies whether to use VIPServer to access OSS for external tables. If this property is not enabled, SLB is used. VIPServer provides higher traffic limits and supports traffic control, but it introduces stability risks, such as query failures. Assess these risks before enabling this property.

  • True: Enabled

  • False (default): Disabled

External table queries

SQL

Session/Project

odps.sql.executionengine.enable.string.to.date.full.format

To convert a date string that includes hours, minutes, and seconds, set this property to True. The default value is False.

  • True: Enabled.

  • False: Disabled.

CAST

SQL

Session/Project

odps.sql.executionengine.enable.rand.time.seed

If this property is set to False, the Rand function uses the current instance ID as the seed to initialize random numbers. This ensures function idempotence.

If this property is set to True, the Rand function uses the current system time as the seed. In this case, the Rand function is not idempotent and cannot be used as a shuffle key. Rerunning the job will produce different results.

The default value is False.

  • True: Enabled.

  • False: Disabled.

RAND

SQL

Session/Project

odps.sql.type.system.odps2

Enables or disables data type 2.0. For more information about data type 2.0, see Data type version 2.0.

  • True: Enabled.

  • False: Disabled.

MaxCompute 2.0 extended functions

SQL

Session/Project

odps.sql.type.json.enable

Enables or disables the JSON data type. For more information about the JSON data type, see JSON data type.

  • True: Enabled.

  • False: Disabled.

MaxCompute JSON data type

SQL

Session/Project

odps.sql.hive.compatible

Enables or disables Hive-compatible mode. When enabled, MaxCompute supports various Hive-specific syntax, such as inputRecordReader, outputRecordReader, and Serde. For more information about compatible data types, see Hive-compatible data type version.

  • True: Enabled.

  • False: Disabled.

ALL

SQL

Session/Project

odps.sql.metering.value.max

Sets a consumption limit for a single SQL query. For more information about consumption monitoring, see Consumption monitoring, alerting, and control.

-

ALL

SQL

Session/Project

odps.sql.timezone

Sets the time zone for a MaxCompute project. For more information about time zones, see Time zone configuration operations.

-

ALL

SQL

Session/Project

odps.sql.unstructured.oss.commit.mode

Specifies whether to enable multipart upload to write data to an OSS external table. For more information, see Write data to OSS.

  • True: Enabled.

  • False: Disabled.

INSERT OVERWRITE

SQL

Session/Project

odps.sql.groupby.orderby.position.alias

Specifies whether to treat integer constants in GROUP BY and ORDER BY clauses as column ordinals from the SELECT list.

Note

For existing projects, enabling this property at the project level might affect existing jobs. Before modifying this property, verify that existing jobs still run correctly. Otherwise, set this property at the session level.

  • True: Enabled.

  • False: Disabled.

  • GROUP BY

  • ORDER BY

  • SELECT

SQL

Session/Project

odps.ext.oss.orc.native

Specifies whether to use the native ORC reader to read tables.

  • True: Enabled.

  • False: Disabled.

SELECT

SQL

Session/Project

odps.sql.job.max.time.hours

Sets the maximum execution duration for a single job.

Note

To set this property at the project level, contact MaxCompute technical support by joining the DingTalk developer community (Group ID: 11782920 or use the application link).

Range: 1 to 72. Default: 24.

SQL jobs

Billing

Session

odps.task.quota.preference.tag

In projects that use subscription resources, this property assigns a job to a specific secondary quota group. If a job's quota tag matches a quota group's tag, the job is scheduled to that group with priority. Otherwise, the job is scheduled to the project's default quota group.

Run the following statement to set the property.

set odps.task.quota.preference.tag = payasyougo
Note

This property applies only to SQL jobs.

tag_name is the tag of a quota group in MaxCompute Housekeeper. The quota group must be in the same region as the owner of the project to which the job belongs. tag_name can contain only letters, numbers, and underscores (_).

ALL

Billing

Session

odps.task.wlm.quota

Specifies the quota group (by name) to use for running tasks in the current session.

-

ALL

Security

Project

odps.forbid.fetch.result.by.bearertoken

Specifies whether to prevent the Result tab in Logview from displaying job results. Use this property to protect data.

  • True: Prevents the display of job results.

  • False: Allows the display of job results.

ALL

Security

Project

LabelSecurity

Specifies whether to enable the LabelSecurity mechanism. For more information about the LabelSecurity mechanism, see Label-based access control.

  • True: Enabled.

  • False: Disabled.

ALL

Security

Project

CheckPermissionUsingACL

Specifies whether to enable the access control list (ACL) authorization mechanism. For more information about ACL-based authorization, see MaxCompute permissions.

  • True: Enabled.

  • False: Disabled.

ALL

Security

Project

CheckPermissionUsingPolicy

Specifies whether to enable the policy-based authorization mechanism. For more information about policy-based authorization, see Policy-based access control.

  • True: Enabled.

  • False: Disabled.

ALL

Security

Project

ObjectCreatorHasAccessPermission

Specifies whether an object creator has access permissions on the object by default.

  • True: The object creator has access permissions by default.

  • False: The object creator does not have access permissions by default.

ALL

Security

Project

ObjectCreatorHasGrantPermission

Specifies whether an object creator has grant permissions on the object by default.

  • True: The object creator has grant permissions by default.

  • False: The object creator does not have grant permissions by default.

ALL

Security

Project

ProjectProtection

Specifies whether to enable the data protection mechanism. For more information about the data protection mechanism, see Data protection mechanism.

  • True: Enabled.

  • False: Disabled.

ALL

Security

Project

odps.output.field.formatter

Sets dynamic data masking rules for SQL query results. For more information about dynamic data masking, see Dynamic data masking.

Custom dynamic data masking rules.

SELECT

Security

Project

odps.security.ip.whitelist

Sets the IP whitelist for clients that access the project over the public internet, which is typically used for cloud service integrations. For more information about IP whitelists, see Manage IP whitelists.

A list of IP addresses, separated by commas (,).

ALL

Security

Project

odps.security.vpc.whitelist

Specifies the IP whitelist for accessing a project from a VPC. For more information about IP whitelists, see Manage IP whitelists.

Format: RegionID_VPCID[IP Address]

ALL

Data types

Project

odps.sql.decimal.odps2

Enables or disables the DECIMAL(precision, scale) data type of data type 2.0. For more information about data types, see Data type version 2.0.

  • True: Enabled.

  • False: Disabled.

ALL

Data storage

Project

odps.timemachine.retention.days

Sets the retention period for backup data. For more information about data backup, see Local backup.

Range in days: 0 to 30. Default: 1.

ALL

Metadata

Project

odps.schema.evolution.enable

Enables schema evolution.

  • True: Enabled.

  • False (default): Disabled.

Schema evolution.

Querying flag parameters

You can query flag parameters at the project or session level.

  • Project level: In the MaxCompute client (odpscmd), run setproject; to list all flag parameters for the project.

  • Session level: View session-level parameters in Logview.