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. |
| 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
| 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: | 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: | 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: | ALL |
Scheduling | Session | odps.stage.reducer.num | Sets the number of workers for each reduce stage. Note When you configure this setting, avoid using | - | ALL |
Scheduling | Session | odps.stage.joiner.num | Sets the number of workers for each join stage. Note When configuring this item, avoid using | - | 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 | - | 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. |
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. |
Note If only a few dynamic partitions are generated, set this property to False to prevent data skew. |
|
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.
|
| 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(...). |
| 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. |
|
|
SQL | Session | odps.sql.skewinfo | Specifies the skewed keys and their corresponding values for a SKEWJOIN operation. For more information, see Optimize data skew. | - |
|
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). |
| 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). |
| UDF |
SQL | Session | odps.optimizer.enable.range.partial.repartitioning | Specifies whether to enable the shuffle remove mechanism for range-clustered tables. |
|
|
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. |
| 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. |
|
|
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. | - |
|
SQL | Session | odps.sql.external.net.vpc | Specifies whether to enable VPC support for external tables. For more information, see Hologres external tables. |
| 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. |
|
|
SQL | Session | odps.sql.groupby.skewindata | Specifies whether to enable the anti-skew mechanism for GROUP BY operations. |
| 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. |
|
|
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 | 取值范围: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. |
|
|
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). |
| 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. |
| 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 |
| 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. |
| 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 | Value: | 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. |
| SELECT |
SQL | Project | odps.table.lifecycle | Specifies whether tables in a project must have a lifecycle configured. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
|
|
SQL | Session/Project | odps.ext.oss.orc.native | Specifies whether to use the native ORC reader to read tables. |
| 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. 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. |
| ALL |
Security | Project | LabelSecurity | Specifies whether to enable the LabelSecurity mechanism. For more information about the LabelSecurity mechanism, see Label-based access control. |
| 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. |
| 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. |
| ALL |
Security | Project | ObjectCreatorHasAccessPermission | Specifies whether an object creator has access permissions on the object by default. |
| ALL |
Security | Project | ObjectCreatorHasGrantPermission | Specifies whether an object creator has grant permissions on the object 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. |
| 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. |
| 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. |
| 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.