Improve redis table function documentation

This commit is contained in:
Aliaksei Khatskevich 2023-12-04 18:05:13 +01:00
parent 02db6c6b2b
commit 741757634f
No known key found for this signature in database
GPG Key ID: 425671209BCA14C0

View File

@ -41,17 +41,7 @@ A table object with key as Redis key, other columns packaged together as Redis v
## Usage Example {#usage-example}
Create a table in ClickHouse which allows to read data from Redis:
``` sql
CREATE TABLE redis_table
(
`k` String,
`m` String,
`n` UInt32
)
ENGINE = Redis('redis1:6379') PRIMARY KEY(k);
```
Read from Redis:
```sql
SELECT * FROM redis(
@ -61,6 +51,15 @@ SELECT * FROM redis(
)
```
Insert into Redis:
```sql
INSERT INTO TABLE FUNCTION redis(
'redis1:6379',
'key',
'key String, v1 String, v2 UInt32') values ('1', '1', 1);
```
**See Also**
- [The `Redis` table engine](/docs/en/engines/table-engines/integrations/redis.md)