All Products
Search
Document Center

MaxCompute:SETPROJECT

Last Updated:Mar 27, 2026

SETPROJECT views and sets project-level properties in MaxCompute. Use it to inspect all configurable parameters or update project and session settings such as scheduling resources, SQL behavior, security policies, and data types.

Platforms

Run SETPROJECT on the MaxCompute client (odpscmd) or the ODPS SQL node of DataWorks.

Usage notes

View project properties

Returns all project-level properties and their current values.

For session-level properties, use the SHOW FLAGS command instead. See the "SHOW FLAGS" section in SET operations.

Syntax

setproject;

Properties

The following table lists common project properties.

The Scope column indicates whether a property takes effect for the current session only (Session) or for the entire project (Project). Session-scoped properties apply only for the duration of the current connection and are lost when the session ends. Project-scoped changes apply globally to all sessions.
CategoryScopeParameterDescriptionValid valuesAffected statements
EcosystemSessionconsole.sql.result.instancetunnelEnables or disables InstanceTunnel. See Usage notes for details on Tunnel commands.True: enabled. False: disabled.SELECT
SchedulingSessionodps.stage.mapper.memMemory allocated to each Map worker.256 MiB–12288 MiB. Default: 1024 MiB.ALL
SchedulingSessionodps.stage.reducer.memMemory allocated to each Reduce worker.256 MiB–12288 MiB. Default: 1024 MiB.ALL
SchedulingSessionodps.stage.joiner.memMemory allocated to each Join worker.256 MiB–12288 MiB. Default: 1024 MiB.ALL
SchedulingSessionodps.stage.memTotal memory for all workers in a job. Lower priority than odps.stage.mapper.mem, odps.stage.reducer.mem, and odps.stage.joiner.mem.256 MiB–12288 MiB. No default.ALL
SchedulingSessionodps.stage.mapper.split.sizeInput data size per Map worker (split size). Controls the number of workers at the Map stage. If the SQL statement uses LIMIT, concurrent workers are capped at 1; avoid using LIMIT when setting this parameter.Default: 256 MiB.ALL
SchedulingSessionodps.sql.split.sizeShard size for table-level parallel processing. Example: {"table1": 1024, "table2": 512}Unit: MiB.ALL
SchedulingSessionodps.sql.split.row.countRow count per shard for table-level parallel processing. Applies only to internal, non-transactional, non-clustered tables. Example: {"table1": 100, "table2": 500}Positive integer.ALL
SchedulingSessionodps.sql.split.dopParallelism level for table-level processing. Applies only to internal, non-transactional, non-clustered tables. Example: {"table1": 1, "table2": 5}Positive integer.ALL
SchedulingSessionodps.stage.reducer.numNumber of workers at each Reduce stage. If the SQL statement uses LIMIT, concurrent workers are capped at 1.ALL
SchedulingSessionodps.stage.joiner.numNumber of workers at each Join stage. If the SQL statement uses LIMIT, concurrent workers are capped at 1.ALL
SchedulingSessionodps.stage.numTotal concurrent workers in a job. Lower priority than odps.stage.mapper.split.size, odps.stage.reducer.num, and odps.stage.joiner.num. If the SQL statement uses LIMIT, concurrent workers are capped at 1.ALL
SchedulingProjectodps.instance.priority.enableEnables job priority for projects that use subscription computing resources. See Job priority. Only the project owner or a user with the Super_Administrator role can run this command.True: enabled. False: disabled.ALL
SQLSessionodps.sql.reshuffle.dynamicptEnables dynamic partitioning to prevent excessive small files. If only a small number of dynamic partitions are generated, set this to False to avoid data skew.True: enabled. False: disabled.INSERT INTO, INSERT OVERWRITE
SQLSessionodps.sql.udf.getjsonobj.newControls whether GET_JSON_OBJECT retains the original string in its return value. Projects created on or after January 21, 2021 return original strings by default. Earlier projects return JSON reserved characters as escape characters by default. See String functions.True: enabled. False: disabled.UDF
SQLSessionodps.sql.udf.jvm.memoryMaximum Java Virtual Machine (JVM) heap memory for a user-defined function (UDF). Increase this value if large in-memory sorts cause out-of-memory (OOM) errors, but optimize UDF code to address the root cause.256 MiB–12288 MiB. Default: 1024 MiB.UDF
SQLSessionodps.function.timeoutTimeout period for a UDF.0s–3600s. Default: 600s.UDF
SQLSessionodps.sql.session.resourcesResources referenced by a user-defined type (UDT). Separate multiple resources with commas. See Overview.Uploaded resources.UDT
SQLSessionodps.sql.udt.display.tostringEnables the java.util.Objects.toString(...) mechanism on the Wrap for all UDT output columns.True: enabled. False: disabled.UDT
SQLSessionodps.sql.session.java.importsJava packages referenced by UDTs. Separate multiple packages with commas. See Overview.Uploaded Java packages.UDT
SQLSessionodps.sql.skewjoinEnables SKEWJOIN to prevent long tail issues.True: enabled. False: disabled.SELECT, JOIN
SQLSessionodps.sql.skewinfoThe key and value on which SKEWJOIN operates. See Data skew tuning.SELECT, JOIN
SQLSessionodps.sql.udf.ppr.deterministicEnables partition pruning for UDFs. See WHERE clause.True: enabled. False: disabled.UDF
SQLSessionodps.sql.udf.ppr.to.subqueryIgnores errors during result backfilling when performing partition pruning. See SELECT syntax.True: enabled. False: disabled.UDF
SQLSessionodps.optimizer.enable.range.partial.repartitioningEnables the Shuffle Remove feature for range-clustered tables.True: enabled. False: disabled.INSERT OVERWRITE, CREATE TABLE
SQLSessionodps.optimizer.merge.partitioned.tableWhen a query uses the same partitioned table multiple times, merges the table reads to minimize IO and improve performance.True: enabled. False: disabled.SELECT
SQLSessionodps.optimizer.skew.join.topk.numNumber of hot key values the optimizer fetches when performing aggregate operations. See SKEWJOIN HINT.SKEWJOIN HINT
SQLSessionodps.optimizer.stat.collect.autoEnables the Freeride feature, which automatically collects column statistics. See Optimizer.True: enabled. False: disabled.CREATE TABLE, INSERT INTO, INSERT OVERWRITE
SQLSessionodps.optimizer.stat.collect.planA collection plan that specifies which column statistics to gather. See Optimizer.CREATE TABLE, INSERT INTO, INSERT OVERWRITE
SQLSessionodps.sql.external.net.vpcEnables virtual private cloud (VPC) access for external tables. See Hologres foreign tables.True: enabled. False: disabled.CREATE TABLE
SQLSessionodps.sql.groupby.position.aliasAllows integer constants in GROUP BY to reference column positions in SELECT.True: enabled. False: disabled.SELECT, GROUP BY
SQLSessionodps.sql.groupby.skewindataEnables the anti-skew feature for GROUP BY.True: enabled. False: disabled.GROUP BY
SQLSessionodps.sql.orderby.position.aliasAllows integer constants in ORDER BY to reference column positions in SELECT.True: enabled. False: disabled.ORDER BY, SELECT
SQLSessionodps.sql.mapjoin.memory.maxMemory size for small tables loaded into memory during MAPJOIN. The total global limit across all small tables in a task equals std::min(8G, odps.sql.mapjoin.memory.max × number of small tables).0 MiB–8192 MiB.JOIN
SQLSessionodps.sql.distributed.map.join.memory.maxMemory per HashTableBuilder instance during MAPJOIN. Default: 2048 MiB.0 MiB–8192 MiB.JOIN
SQLSessionodps.sql.python.versionPython version used when executing SQL statements.cp27, cp37UDTF, UDAF
SQLSessionodps.sql.select.output.formatControls whether the MaxCompute client displays column headers in SELECT results. See MaxCompute client (odpscmd).{"needHeader":false,"fieldDelim":""}: no headers. {"needHeader":true,"fieldDelim":""}: with headers.ALL
SQLSessionodps.sql.unstructured.data.oss.use.httpsEnables HTTPS when accessing external tables at the underlying layer. See Create an OSS external table.True: enabled. False: disabled.ALL
SQLSessionodps.sql.decimal.tostring.trimzeroRemoves trailing zeros after the decimal point for the DECIMAL type. Default: True.True: trailing zeros removed. False: trailing zeros retained.CAST
SQLSessionodps.sql.unstructured.tablestore.put.rowCalls the PutRow operation to write data to a Tablestore external table. See PutRow.True: enabled. False: disabled.ALL
SQLSessionodps.sql.unstructured.external.max.dopMaximum concurrency of workers accessing an external table.Positive integer.External table queries and writes
SQLSession/Projectodps.sql.unstructured.file.pattern.black.listIgnores files matching a pattern when reading external tables in Object Storage Service (OSS) or Hadoop Distributed File System (HDFS). Use this to skip _SUCCESS files written by Spark. Example at session level: SET odps.sql.unstructured.file.pattern.black.list=.*_SUCCESS$;.*_SUCCESS$External table queries
SQLSessionodps.meta.exttable.stats.onlinecollectEnables the optimizer to collect statistics on external tables temporarily during query execution. This helps the optimizer discover small tables, apply Hash Join, optimize join order, and reduce shuffle operations. Default: False.True: enabled. False (default): disabled.External table queries
SQLProjectodps.sql.allow.fullscanEnables full table scans on the project. Full table scans consume significant resources and reduce processing efficiency. Disable this in production unless required.True: enabled. False: disabled.SELECT
SQLProjectodps.table.lifecycleSets the lifecycle requirement for tables created in the project.Optional: the LIFECYCLE clause is optional. Mandatory: the LIFECYCLE clause is required. Inherit: tables without an explicit lifecycle inherit the value of odps.table.lifecycle.value.CREATE TABLE
SQLProjectodps.table.lifecycle.valueDefault lifecycle for tables, in days. Applies when odps.table.lifecycle is set to Inherit.1–37231. Default: 37231.CREATE TABLE
SQLProjectREAD_TABLE_MAX_ROWMaximum number of rows returned by a SELECT statement.1–10000. Default: 10000.SELECT
SQLProjectodps.output.field.formatterDynamic data masking rules applied to SQL query results. See Dynamic data masking.Custom masking rules.SELECT
SQLProjectodps.sql.acid.table.enableEnables the atomicity, consistency, isolation, and durability (ACID) mechanism. See ACID semantics.True: enabled. False: disabled.ALL
SQLSession/Projectodps.io.oss.use.vipserverRoutes OSS access through VIPServer instead of Server Load Balancer (SLB). VIPServer supports higher throughput with flow control, but may introduce query failures. Evaluate stability tradeoffs before enabling. Default: False.True: enabled. False (default): disabled.External table queries
SQLSession/Projectodps.sql.executionengine.enable.string.to.date.full.formatEnables conversion of date strings that include hour, minute, and second parts. Default: False.True: enabled. False: disabled.CAST
SQLSession/Projectodps.sql.executionengine.enable.rand.time.seedControls the seed used by the RAND function. False (default): uses the instance ID as the seed, ensuring idempotence. True: uses system time, making the result non-idempotent and variable across calls.True: enabled. False: disabled.RAND
SQLSession/Projectodps.sql.type.system.odps2Enables the MaxCompute V2.0 data type edition. See MaxCompute V2.0 data type edition.True: enabled. False: disabled.MaxCompute V2.0 additional functions
SQLSession/Projectodps.sql.type.json.enableEnables JSON data types. See Instructions for using JSON data types in MaxCompute.True: enabled. False: disabled.MaxCompute JSON data types
SQLSession/Projectodps.sql.hive.compatibleEnables the Hive-compatible data type edition. Required for Hive syntaxes such as inputRecordReader, outputRecordReader, and Serde. See Hive-compatible data type edition.True: enabled. False: disabled.ALL
SQLSession/Projectodps.sql.metering.value.maxUpper limit on resources consumed by a single SQL statement. See Consumption control.ALL
SQLSession/Projectodps.sql.timezoneTime zone of the MaxCompute project. See Time zone configuration operations.ALL
SQLSession/Projectodps.sql.unstructured.oss.commit.modeEnables OSS multipart upload when writing data to OSS external tables. See Write data to OSS.True: enabled. False: disabled.INSERT OVERWRITE
SQLSession/Projectodps.sql.groupby.orderby.position.aliasAllows integer constants in GROUP BY and ORDER BY to reference column positions in SELECT. Setting this to True for an existing project may break existing data parsing logic. Test thoroughly before enabling at the project level.True: enabled. False: disabled.GROUP BY, ORDER BY, SELECT
SQLSession/Projectodps.ext.oss.orc.nativeUses a native Optimized Row Columnar (ORC) reader to read table data.True: enabled. False: disabled.SELECT
SQLSessionodps.sql.job.max.time.hoursMaximum duration for a single job, in hours.1–72. Default: 24.SQL jobs
BillingSessionodps.task.quota.preference.tagQuota group assigned to a job. The job is scheduled to the quota group whose tag matches. If no match is found, the project's default quota group is used. Applies to SQL jobs only. Example: set odps.task.quota.preference.tag = payasyougo; The tag name can contain letters, digits, and underscores.Tag name of a quota group configured in MaxCompute Management. You can configure the tag name only for quota groups in the region where the project of your job belongs. The tag name can contain letters, digits, and underscores (_).ALL
BillingSessionodps.task.wlm.quotaName of the quota used to run jobs in a session.ALL
Security and permissionsProjectodps.forbid.fetch.result.by.bearertokenControls whether job results appear on the Result tab of LogView.True: results are hidden. False: results are displayed.ALL
Security and permissionsProjectLabelSecurityEnables label-based access control (LabelSecurity). See Label-based access control.True: enabled. False: disabled.ALL
Security and permissionsProjectCheckPermissionUsingACLEnables ACL-based access control. See MaxCompute permissions.True: enabled. False: disabled.ALL
Security and permissionsProjectCheckPermissionUsingPolicyEnables policy-based access control. See Policy-based access control.True: enabled. False: disabled.ALL
Security and permissionsProjectObjectCreatorHasAccessPermissionGrants object creators access to the objects they create.True: enabled. False: disabled.ALL
Security and permissionsProjectObjectCreatorHasGrantPermissionGrants object creators the ability to authorize other users to access the objects they create.True: enabled. False: disabled.ALL
Security and permissionsProjectProjectProtectionEnables project data protection. See Project data protection.True: enabled. False: disabled.ALL
Security and permissionsProjectodps.output.field.formatterDynamic data masking rules applied to SQL query results. See Dynamic data masking.Custom masking rules.SELECT
Security and permissionsProjectodps.security.ip.whitelistIP address whitelist for accessing the project over the cloud product interconnection network. Separate IP addresses with commas. See Manage IP address whitelists.Comma-separated IP addresses.ALL
Security and permissionsProjectodps.security.vpc.whitelistIP address whitelist for accessing the project over a specific VPC. See Manage IP address whitelists.RegionID_VPCID[IP Address]ALL
Data typeProjectodps.sql.decimal.odps2Enables DECIMAL(precision,scale) in the MaxCompute V2.0 data type edition. See MaxCompute V2.0 data type edition.True: enabled. False: disabled.ALL
Data storageProjectodps.timemachine.retention.daysRetention period for backup data, in days. See Backup and restoration.0–30. Default: 1.ALL
MetadataProjectodps.schema.evolution.enableEnables schema evolution. Default: False.True: enabled. False (default): disabled.Schema evolution

Set project properties

Sets project-level properties. Changes take effect within 5 minutes; check results after 5 minutes.

To set session-level properties instead, use the SET statement. See the "SET" section in SET operations.

Permissions

Only the project owner or a user assigned the Super_Administrator or Admin project-level role can set project-level properties. See Assign a built-in administrator role to a user.

Syntax

setproject <KEY>=<VALUE>;

Parameters

ParameterDescription
KEYThe property name.
VALUEThe property value. For valid values, see View project properties.

Example

Enable full table scans for a project:

setproject odps.sql.allow.fullscan=true;

What's next