Enter the project

Command format:
use <project_name>;
  • Enter the specified project.  After entering the project, all objects in this project can be operated by the user.
  • If the project does not exist or the current user is not in this project, an exception is returned.
odps:my_project>use my_project; --my_project is a project the user has privilege to access.
Note The preceding examples uses the MaxCompute client.  All  MaxCompute command keywords, project names, table names, column names are case insensitive.
After running the command, you can access the objects of this project. In the following example, assume that test_src exists in the project ‘my_project’. Run the following command:
odps:my_project>select * from test_src;
MaxCompute automatically searches the table in my_project. If the table exists, it returns the data of this table. If the table does not exist, an exception is thrown. To access the table test_src in another project, such as ‘my_project2’, through the project ‘my_project’, you must first specify the project name as follows:
odps:my_project>select * from my_project2.test_src;

The returned data is the data in my_project2, not the initial data of test_src in my_project.

MaxCompute does not support commands to create or delete projects. You can use the MaxCompute console for additional configurations and operations as needed.


Command format:
setproject [<KEY>=<VALUE>];


  • Use setproject command to set project attributes.
    The following example sets the method that allows a full table scan.
    setproject odps.sql.allow.fullscan = true;
  • If the value of <KEY>=<VALUE> is not specified, the current project attribute configuration is displayed. Command format:
    setproject;  --Display the parameters set by the setproject command.
Property name Configured permission Description Value range
odps.sql.allow.fullscan ProjectOwner Determines whether to allow a full table scan. True (permitted) /false (prohibited)
odps.table.drop.ignorenonexistent All users Whether to report an error when deleting a table that does not exist. When the value is true, no error is reported. True (no error reported)/false
odps.security.ip.whitelist ProjectOwner Specify an IP whitelist to access the project. IP list separated by commas (,)
odps.instance.remain.days ProjectOwner Determines the duration of the retention of the instance information. [3- 30]
READ_TABLE_MAX_ROW ProjectOwner The number of data entries returned by running the Select statement in the client. [1-10000]

Examples for odps.security.ip.whitelist

MaxCompute supports a project level IP whitelist.
  • If the IP whitelist is configured, only the IP (console IP or IP of exit where SDK is located) in the whitelist can access this project.
  • After setting the IP white list, wait for at least five minutes to let the changes take effect.
  • For further assistance, open a ticket to contact Alibaba Cloud technical support team.
The following are the three formats for an IP list in the whitelist, which can appear in the same command. Use commas (,) to separate these commands.
  • IP address: For example,
  • Subnet mask: For example,
  • Network segment: For example,
Example of the command line tool set the IP white list:
setproject odps.security.ip.whitelist=,,;
If no IP address is added in the whitelist, then the whitelist function is disabled.
setproject odps.security.ip.whitelist=;