mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Improve redis table function documentation
This commit is contained in:
parent
02db6c6b2b
commit
741757634f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user