This article introduces you to command operations for entering the project and setting space properties ( permissions and whitelist functions, etc. ).
Enter the workspce
- Enter the specified workspce. After entering the workspce, all objects in this workspce can be operated by the user.
- If the workspce does not exist or the current user is not in this workspce, an exception is returned.
odps:my_project>use my_project; --my_project is a workspce the user has privilege to access.
The preceding examples uses the MaxCompute client. All MaxCompute command keywords, workspce names, table names, column names are case insensitive.
Creating a project is creating a MaxCompute project
odps:my_project>select * from test_src;
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 workspce. You can use the MaxCompute console for additional configurations and operations as needed.For details, see project list
Used to view the list of items created by the primary account.
- Use setproject command to set workspce 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 workspce 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 workspce.||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
- 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 workspce.
- 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.
- IP address: For example, 220.127.116.11.
- Subnet mask: For example, 100.116.0.0/16.
- Network segment: For example, 18.104.22.168-22.214.171.124.