This topic provides examples on how to perform operations on configurations in typical scenarios by using the SDK for Python.

Configuration

PyODPS provides a series of configuration options, which can be obtained by using odps.options The following table describes configurable MaxCompute options.
  • General configurations
    Option Description Default value
    end_point The MaxCompute endpoint. None
    default_project The default project. None
    log_view_host The hostname in the Logview URL. None
    log_view_hours The holding time of Logview. Unit: hours. 24
    local_timezone The time zone that is used. True indicates the local time, and False indicates UTC. The time zone pytz can also be used. 1
    lifecycle The lifecycle of all tables. None
    temp_lifecycle The lifecycle of temporary tables. 1
    biz_id The ID of a user. None
    verbose Specifies whether to display logs. False
    verbose_log The log receiver. None
    chunk_size The size of the write buffer. 1496
    retry_times The number of request retries. 4
    pool_connections The number of cached connections in the connection pool. 10
    pool_maxsize The maximum capacity of the connection pool. 10
    connect_timeout The connection timeout. 5
    read_timeout The time to wait before the read operation times out. 120
    completion_size The limit on the number of object completion listing items. 10
    notebook_repr_widget Specifies whether to use interactive graphs. True
    sql.settings MaxCompute SQL runs global hints. None
    sql.use_odps2_extension Specifies whether to enable MaxCompute 2.0 language extension. False
  • Data upload or download configurations
    Option Description Default value
    tunnel.endpoint The Tunnel endpoint. None
    tunnel.use_instance_tunnel Specifies whether to use Instance Tunnel to obtain the upload or download results. True
    tunnel.limited_instance_tunnel Specifies whether to limit the number of data records obtained by using Instance Tunnel. True
    tunnel.string_as_binary Specifies whether to use bytes instead of unicode for data of the STRING type. False
  • DataFrame configurations
    Option Description Default value
    interactive Specifies whether DataFrame is used in an interactive environment. Based on the measured value
    df.analyze Specifies whether to enable non-MaxCompute built-in functions. True
    df.optimize Specifies whether to enable full DataFrame optimization. True
    df.optimizes.pp Specifies whether to enable DataFrame predicate push optimization. True
    df.optimizes.cp Specifies whether to enable DataFrame column pruning optimization. True
    df.optimizes.tunnel Specifies whether to enable DataFrame tunnel optimization. True
    df.quote Specifies whether to use a pair of grave accents (``) to mark fields and table names in the backend of MaxCompute SQL. True
    df.libraries The resource name of the third-party library that is used for the DataFrame operation. None
  • PyODPS ML configurations
    Option Description Default value
    ml.xflow_project The default name of the XFlow project. algo_public
    ml.use_model_transfer Specifies whether to use ModelTransfer to obtain the PMML model. True
    ml.model_volume The volume name used when ModelTransfer is used. pyodps_volume