Parameter | Description | Required | Default value |
expireTime | The expiration time of the values that are cached in Redis. Unit: seconds. If you do not configure this parameter, the default value 0 is used, which indicates that the values are permanently valid. You can specify the value of the expireTime parameter in one of the following modes: seconds: the relative period of time in seconds starting from the current point in time. It specifies the period during which the values are valid. unixtime: the number of seconds that have elapsed since 00:00:00 on January 1, 1970. It specifies the point in time when the values expire.
| No | 0 |
keyFieldDelimiter | The delimiter that you want to use to separate keys when Redis Writer writes data to Redis. Example: key=key1\u0001id. If multiple keys need to be concatenated, this parameter is required. If the data contains only one key, this parameter is not required. | No | \u0001 |
dateFormat | The format in which Redis Writer writes the data of the DATE type to Redis. Set the value to yyyy-MM-dd HH:mm:ss. | No | No default value |
datasource | The name of the data source. The name must be the same as the name of the data source that you added. | Yes | No default value |
selectDatabase | The database to which you want to write data. The first database in a Redis cluster is database 0. Data Integration does not allow you to select the database to which you want to write data in a Redis cluster. | No | database 0 |
writeMode | The mode in which Redis Writer writes data to Redis. Redis Writer can write values of the following types: STRING LIST SET ZSET (sorted set) HASH
The value of the writeMode parameter varies based on the data types of the values that you want to write to Redis. For more information, see Description of the writeMode parameter. Note When you configure Redis Writer, you can specify only one data type for the writeMode parameter. If you do not configure this parameter, the default value string is used. | No | string |
keyIndexes | The indexes of source columns that are used as the key. The indexes start from 0. This indicates that the index of the first column is 0, and the index of the second column is 1, and so on. If you want to specify a specific column of the source as the key, set this parameter to the index of the column. For example, if you want to specify the first column as the key, set this parameter to 0 . If you want to specify a range of contiguous columns of the source as the key, set this parameter to a closed interval that specifies the indexes of these columns. For example, if you want to specify the second, third, and fourth columns as the key, set this parameter to [1,3] .
Note After you configure the keyIndexes parameter, Redis Writer uses the remaining columns as the value. If you want to synchronize only some of the columns in the source, specify the names of the columns when you configure the related Reader. | Yes | No default value |
batchSize | The number of data records to write at a time. Set this parameter to an appropriate value based on your business requirements. This greatly reduces the interactions between Data Integration and Redis and increases throughput. If you set this parameter to an excessively large value, an out of memory (OOM) error may occur during data synchronization. | No | 1,000 |
timeout | The timeout period of the connection to Redis when data is written to Redis. Unit: milliseconds. | No | 30,000 |
redisMode | The deployment mode of Redis. Cluster mode: If you set the redisMode parameter to Cluster mode, the cluster mode takes effect. In this mode, when you synchronize data from another data source to a Redis cluster, Data Integration directly connects to and communicates with the Redis cluster. If you want to write data to a self-managed Redis cluster or an ApsaraDB for Redis cluster instance that uses the direct connection mode, you must set the redisMode parameter to this value. This mode does not support batch data write. Non-cluster mode: If you leave the redisMode parameter empty, the non-cluster mode takes effect. In most cases, if you want to write data to an ApsaraDB for Redis cluster instance that uses the proxy connection mode, an ApsaraDB for Redis read/write splitting instance, or an ApsaraDB for Redis standard master-replica instance, you must use the non-cluster mode. This mode supports batch data write.
Note Only exclusive resource groups for Data Integration are supported. | No | No default value |
column | The names of the columns to which you want to write data. If you set the type parameter to string and the mode parameter to set, take note of the following points: If the column parameter is not configured, the values stored in Redis are strings that are connected by delimiters. For example, in a CSV source file, the value of id is 1, the value of name is Bob, the value of age is 18, and the value of sex is male. In this case, the values to be written to Redis are "18::male". If the column parameter is configured in the "column": [{"index":"0", "name":"id"}, {"index":"1", "name":"name"}] format, the values are stored in Redis in the JSON format of {"id":"Value of a source column","name":"Value of a source column"}. For example, the value of id is 1, and the value of name is Bob. In this case, the values stored in Redis are {"id":1,"name":"Bob"}.
| No | No default value |