Procedure
Log on to the Data Lake Analytics console. In the endpoint list, locate the row that contains the target endpoint and click Log on in DMS in the Actions column to create a Table Store schema:
CREATE SCHEMA hangzhou_ots_test WITH DBPROPERTIES (
catalog = 'ots',
location = 'https://otsInstanceName.cn-hangzhou.ots-internal.aliyuncs.com',
instance = 'ots-instance-name'
);
A private network communication is provided between DLA and Table Store for you through VPC policies. You must use the private IP address of your Table Store instance when creating the connection.
catalog = 'ots'
: creates a connection between DLA and your Table Store instance.hangzhou_ots_test: indicates the name of the connection between DLA and your Table Store instance.
location: indicates the DLA endpoint or VPC endpoint in your Table Store instance, which are the same.
- instance: indicates the name of your Table Store instance.
View database and table information in DLA
After you created the connection, you can view the database and table information in DLA. Alternatively, you can connect to DLA through a MySQL client or MySQL CLI tool, and then view the database and table information in DLA. The following example describes how to use an MySQL CLI tool to view the schema and table information.
View database information
mysql> show databases;
+------------------------------+
| Database |
+------------------------------+
| hangzhou_ots_test |
+------------------------------+
1 rows in set (0.22 sec)
mysql> show create database hangzhou_ots_test;
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Database | Create Database |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hangzhou_ots_test | CREATE DATABASE `hangzhou_ots_test`
WITH DBPROPERTIES (
CATALOG = 'ots',
LOCATION = 'location = 'https://otsInstanceName.cn-hangzhou.ots-internal.aliyuncs.com',
INSTANCE = 'ots-instance-name'
) |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.31 sec)
View table information
mysql> use hangzhou_ots_test;
Database changed
mysql> show tables;
Empty set (0.30 sec)