from odps import options
# Set the lifecycle for all output tables
options.lifecycle = 30
# Use bytes instead of Unicode for STRING data
options.tunnel.string_as_binary = True
# Increase the sort limit for PyODPS DataFrame operations
options.df.odps.sort.limit = 100000000
General configurations
| Option |
Type |
Description |
Default |
end_point |
String |
The endpoint of MaxCompute. |
None |
default_project |
String |
The default project. |
None |
log_view_host |
String |
The hostname of Logview. |
None |
log_view_hours |
Integer |
The retention period of Logview. Unit: hours. |
24 |
local_timezone |
None/Boolean/String |
The time zone used for datetime values. True uses the local system time zone. False uses UTC. A pytz time zone string is also accepted. |
None |
lifecycle |
Integer |
The lifecycle of all tables. |
None |
temp_lifecycle |
Integer |
The lifecycle of temporary tables. |
1 |
biz_id |
String |
The user ID. |
None |
verbose |
Boolean |
Whether to print logs. |
False |
verbose_log |
Object |
The log receiver. |
None |
chunk_size |
Integer |
The size of the write buffer. |
1496 |
retry_times |
Integer |
The number of request retries. |
4 |
pool_connections |
Integer |
The number of cached connections in the connection pool. |
10 |
pool_maxsize |
Integer |
The maximum capacity of the connection pool. |
10 |
connect_timeout |
Integer |
The connection timeout period. |
5 |
read_timeout |
Integer |
The read timeout period. |
120 |
api_proxy |
String |
The API proxy server. |
None |
data_proxy |
String |
The data proxy server. |
None |
completion_size |
Integer |
The maximum number of items returned for object name completion. |
10 |
notebook_repr_widget |
Boolean |
Whether to use interactive graphs in Notebook environments. |
True |
sql.settings |
Dictionary |
Global hints for MaxCompute SQL. |
None |
sql.use_odps2_extension |
Boolean |
Whether to enable the MaxCompute 2.0 language extension. |
False |
Data upload and download configurations
| Option |
Type |
Description |
Default |
tunnel.endpoint |
String |
The endpoint of MaxCompute Tunnel. |
None |
tunnel.use_instance_tunnel |
Boolean |
Whether to use InstanceTunnel to retrieve execution results. |
True |
tunnel.limit_instance_tunnel |
None/Boolean |
Whether to limit the number of records retrieved by InstanceTunnel. |
None |
tunnel.string_as_binary |
Boolean |
Whether to use bytes instead of Unicode for STRING data. |
False |
DataFrame configurations
| Option |
Type |
Description |
Default |
interactive |
Boolean |
Whether DataFrames are running in an interactive environment. Detected automatically. |
Depends on the detection value. |
df.analyze |
Boolean |
Whether to enable functions not built into MaxCompute. |
True |
df.optimize |
Boolean |
Whether to enable full DataFrame optimization. |
True |
df.optimizes.pp |
Boolean |
Whether to enable predicate pushdown optimization. |
True |
df.optimizes.cp |
Boolean |
Whether to enable column pruning optimization. |
True |
df.optimizes.tunnel |
Boolean |
Whether to enable tunnel optimization. |
True |
df.quote |
Boolean |
Whether to wrap field and table names with grave accents (``) in MaxCompute SQL. |
True |
df.libraries |
String |
The resource name of the third-party library used for DataFrame operations. |
None |
df.supersede_libraries |
Boolean |
Whether to use a self-uploaded NumPy version instead of the one bundled with the service. |
False |
df.odps.sort.limit |
Integer |
The default limit on the number of items added during a sort operation of DataFrames. |
10000 |
Machine learning configurations
| Option |
Type |
Description |
Default |
ml.xflow_settings |
Dictionary |
The XFlow execution configuration. |
None |
ml.xflow_project |
String |
The default XFlow project name. |
algo_public |
ml.use_model_transfer |
Boolean |
Whether to use ModelTransfer to retrieve Predictive Model Markup Language (PMML) files. |
False |
ml.model_volume |
String |
The name of the volume used by ModelTransfer. |
pyodps_volume |