All functions of MaxCompute can be accessed through Console. Next how to install and configure the console will be introduced.
First, download MaxCompute console. You can click Download. Since Console is developed in Java, make sure there is JRE 1.6 on your machine. Then decompress it into a folder. After decompression, there are four folders:
bin/ conf/ lib/ plugins/
In the folder ‘conf’, there is a file named ‘odps_config.ini’. Edit it by filling in corresponding information:
#Access ID and Access Key correspond to your cloud account information. You can apply it on official website.
# Specify the project you want to use.
# Access URL of the MaxCompute service.
# Access URL of the MaxCompute Tunnel service.
# Agter a user execute a task, the Console returns the LogView address of this task. You can view the detailed execution information of this task at this address.
#Determine whether to enable HTTPS access
- end_point and tunnel_endpoint. The access URLs differ for different regions. For details, refer to Access domians and data centers.
- For more details of Console, please refer to MaxCompute Console.
- MaxCompute provides two service addresses separately on public network and private network. Different address corresponds to different price.
- MaxCompute client does not support comments, but “—” is used as a comment in the document for the convenience of readers.
After the configuration file has been modified, run ‘odpscmd’ in bin directory. (If the OS is Linux, run ‘./bin/odpscmd’; if the OS is Windows, run ‘./bin/odpscmd.bat’.)
Now run several SQL sentences:
create table tbl1(id bigint);
insert overwrite table tbl1 select count(*) from tbl1;
select 'welcome to MaxCompute!' from tbl1;
For more SQL sentences, refer to SQL.