All Products
Search
Document Center

Create a Redis schema

Last Updated: Apr 24, 2019

Procedure

  1. Log on to the Data Lake Analytics console.

  2. In the left-side navigation pane, click Endpoint. In the endpoint list, locate the row that contains the target endpoint and click Log on in DMS in the Actions column. Run the following statement to create an ApsaraDB for Redis (Redis) schema in DLA:

    1. CREATE DATABASE `redis_test`
    2. WITH DBPROPERTIES (
    3. catalog = 'redis',
    4. location = 'r-xxxxx.redis.rds.aliyuncs.com:6379/hello_',
    5. password = 'xxxxx',
    6. vpc_id = 'vpc-xxxxx',
    7. instance_id = 'r-xxxxxx'
    8. )

    Description

    • location: indicates the URL of your Redis instance, which is composed of the private IP address and port number of your Redis instance.

      hello_ is the prefix you added.

    • password: indicates the password used to connect to your Redis instance.

    • vpc_id: indicates the ID of the VPC where your Redis instance is located.

    • instance_id: indicates the ID of the your Redis instance.

      1

Next step

Create a Redis table and read data from the table