Data Lake Analytics (DLA) allows you to query data from and write data to Tablestore by using standard SQL statements. Tablestore is a NoSQL database service developed by Alibaba Cloud. It uses a variety of data models and supports search index queries. DLA allows you to call a Tablestore API operation to query data, such as point query and range query. In addition, DLA can intelligently select a primary table, secondary index table, and search index table. This significantly improves query performance and reduces user costs.
- Database table concepts
Instance Schema or database Table table Primary key A column in the database table. Settings of related parameters: isPrimaryKey=true, isNullable=false Column A column in the database table. Settings of related parameters: isPrimaryKey=false, isNullable=<Defined in a DDL statement>
- Field description
INTEGER (eight bytes) BIGINT (eight bytes) STRING varchar BINARY varbinary DOUBLE double BOOLEAN boolean
Before you use DLA to read data from Tablestore, you must prepare test data in Tablestore. For more information, see Create instances.
This example demonstrates how to create a table named nation in Tablestore and insert 25 records into the table, as shown in the following figure.
- Click https://ram.console.aliyun.com/?spm=a2c4g.11186618.104.22.168e5d4713pCUxK5#/role/authorize?request=%7B%22Service%22:%22OpenAnalytics%22,%22ReturnUrl%22:%22https:%2F%2Fdatalakeanalytics.console.aliyun.com%22,%22Requests%22:%7B%22request1%22:%7B%22RoleName%22:%22AliyunOpenAnalyticsAccessingOTSRole%22,%22TemplateId%22:%22OTSRole%22%7D%7D%7D to authorize DLA to access the Tablestore data source.