jeff-zou / flink-connector-redis

Asynchronous flink connector based on the Lettuce, supporting sql join and sink, query caching and debugging.
Apache License 2.0
220 stars 80 forks source link

How to use HSET with table format like this #22

Closed noomanee closed 2 years ago

noomanee commented 2 years ago
I have table structured like this, and i would like to use HSET on Table SQL. Do you support this or any suggestions key field1 field2 field3
1 'a' 1 'aa'
2 'b' 1 'bb'

What i am trying to do is to run this command

HSET 1 field1 'a' field2 1 field3 'aa'
HSET 2 field1 'b' field2 1 field3 'bb'
jeff-zou commented 2 years ago

Maybe u can use 'value.data.structure'='row', the command will be like: HSET 1 a "1\01a\011\01aa“

Maybe I should support json.

noomanee commented 2 years ago

Hm. I think that does not work. What i am trying to do is set multiple fields on single key. I think i miscommunicate. It should be

HMSET 1 field1 'a' field2 1 field3 'aa'
HMSET 2 field1 'b' field2 1 field3 'bb'
jeff-zou commented 2 years ago

u just do like: concat('field2',field2,'field3',field3)