MaxCompute (formerly known as ODPS) is a fast and fully-hosted TB or PB-level data warehouse solution.
You can create a MaxCompute schema (mapping database) and a MaxCompute mapping table in Data Lake Analytics (DLA). Then, you can use the MySQL client or MySQL command-line interface (CLI) to connect to the MaxCompute schema in DLA and execute standard SQL statements to read data from MaxCompute.
Make the following preparations in DLA:
Make the following preparations in MaxCompute:
Use DataWorks to create a test table and prepare test data.
This example uses DDL statements to create the
bank_datatable. For more information, see Create a table called bank_data in Create a table and upload data.
CREATE TABLE IF NOT EXISTS bank_data
age BIGINT COMMENT 'age',
job STRING COMMENT 'job type',
marital STRING COMMENT 'marital status',
education STRING COMMENT 'education level',
default STRING COMMENT 'credit card ownership',
housing STRING COMMENT 'mortgage',
loan STRING COMMENT 'loan',
contact STRING COMMENT 'contact information',
month STRING COMMENT 'month',
day_of_week STRING COMMENT 'day of the week',
duration STRING COMMENT 'duration',
campaign BIGINT COMMENT 'contact times during the campaign',
pdays DOUBLE COMMENT 'interval from the last contact',
previous DOUBLE COMMENT 'previous contact times with the customer',
poutcome STRING COMMENT 'result of the previous marketing campaign',
emp_var_rate DOUBLE COMMENT 'employment change rate',
cons_price_idx DOUBLE COMMENT 'consumer price index',
cons_conf_idx DOUBLE COMMENT 'consumer confidence index',
euribor3m DOUBLE COMMENT 'euro deposit rate',
nr_employed DOUBLE COMMENT 'number of employees',
y BIGINT COMMENT 'whether time deposit is available'