Redis Command

You can use this activity to create, read, update, and delete the data in different groups (data structures) like hashes, lists, sets, sorted sets, and strings.

Settings

The Settings tab has the following fields:

Field Description
Connection Lists all the connections created for connecting to the Redis server.
Group Lists the Redis command groups based on different data structures: Hashes, Lists, Sets, SortedSets, Strings, and JSON.
Command Lists all the commands provided for a selected Redis command group.

Groups and commands

The tables below list all the groups and their associated commands with a detailed description of each command.

Group Command Description
Hashes HDEL Deletes the specified fields, which exist within the stored hash.
HEXISTS

Determines whether a hash field exists.

HGET Returns the value associated with the specified hash field.
HGETALL Returns all the specified fields and their associated values stored in the hash.
HKEYS Returns all the field names in the hash stored at Key.
HLEN Returns the number of fields stored in a hash.
HMGET Returns the values associated with the specified hash fields.
HMSET Assigns the values to the specified fields in the hash.
HSET

Assigns the values to the specified fields in the hash.

HVALS Returns all the values associated with hash fields.
HINCRBY Increments the value stored at the field in the hash.
HINCRBYFLOAT Increments floating point value at the specified field of a hash.
HRANDFIELD Returns a random field from the hash.
HSCAN Incrementally iterates fields and associated values in the hash.
HSETNX Assigns the value to a field in the hash, if the field does not exist.
Group Command Description
Lists LINDEX Returns an element at a specified index from the list.
LINSERT Appends an element before or after the specified element in a list.
LPOP Deletes the first elements of the list provided in the count and returns the deleted elements.
LPUSH Appends the specified element at the head of the list.
LREM Removes the elements from the list using count as argument:

If count>0: Elements equal to the count value are removed moving from head to tail order of the list.

If count<0: Elements equal to the count value are removed moving from tail to head order of the list.

If count=0: Elements equal to count value are removed.

LSET Sets a value to the list element at the specified index.
RPOP Deletes the last elements of the list provided in the count and returns the deleted elements.
RPUSH Appends multiple elements at the tail of the list.
LRANGE Returns a range of elements from a list.
BLPOP Deletes and returns the first element of the non-empty list, or blocks until one element is available in a list.
BRPOP Deletes and returns the last element of the non-empty list, or blocks the connection until one element is available in the list.
RPUSHX Appends an element at the tail of the existing list.
LPUSHX Appends an element at the head of the existing list.
LLEN Returns the length of the list.
LPOS Returns the index of matching elements on a list.
BLMOVE Returns an element that is moved from one list to another, or blocks the connection until an element is available in the list.
LTRIM Trims a list to the specified range.
RPOPLPUSH Removes the last element from the tail of a list and pushes the element at the head of the list.
LMOVE Moves an element from one list to another.
BRPOPLPUSH Removes the last element from the tail of a list and pushes the element at the head of the list, or blocks the connection until an element is available.
Group Command Description
Sets SADD Adds the specified element to the set.
SCARD Returns the number of elements present in the set.
SMEMBERS Returns all the elements of the set.
SISMEMBER

Determines whether the specified element exists in the specified set.

SPOP Deletes the specified elements and returns the deleted elements from the set.
SREM Removes the specified element from the set.
SMOVE

Moves the specified element from the source set to the destination set.

SDIFF Returns elements obtained after subtracting multiple sets.
SDIFFSTORE Subtracts multiple sets and stores the result in a key.
SINTER Returns elements obtained from the intersection of all the sets.
SINTERSTORE Intersects multiple sets and stores the resulting set in a key.
SMISMEMBER Determines if the given element is a member of a set.
SRANDMEMBER Randomly returns one or more elements from a set.
SSCAN Incrementally iterates elements in the set.
SUNION Returns the members of the set resulting from the addition of multiple sets.
SUNIONSTORE Adds multiple sets and stores the resulting set in a key.
Group Command Description
SortedSets ZADD Appends one or more elements to the sorted set.
ZCARD Specifies the number of elements in the sorted set.
ZCOUNT Returns the number of elements from the sorted set within the specified range.
ZREM Removes the specified elements from the sorted set.
ZRANGE

Returns all the elements specified within a range.

ZRANK Determines and returns the rank of the specified element in the sorted set.
ZREMRANGEBYRANK Removes all the elements within the range of specified indexes from the sorted set.
ZREMRANGEBYSCORE Removes all the elements within the specified scores from the sorted set.
ZUNION Returns the members of the set resulting from the addition of multiple sorted sets.
ZUNIONSTORE Adds multiple sorted sets and stores the resulting sorted set in a key.
ZSCORE Returns the score of the specified elements in the sorted set.
ZSCAN Incrementally iterates elements in the sorted set.
BZPOPMIN Removes and returns the lowest score element in a sorted set, or blocks connection until an element is available in the sorted set.
BZPOPMAX Removes and returns the highest score element in a sorted set, or blocks connection until an element is available in the sorted set.
ZDIFF Returns elements obtained after subtracting multiple sorted sets.
ZDIFFSTORE Subtracts multiple sorted sets and stores the resulting sorted set in a key.
ZINCRBY Increments the score of an element in a sorted set.
ZINTER Returns elements obtained from the intersection of multiple sorted sets.
ZINTERSTORE Intersects multiple sorted sets and stores the resulting sorted set in a key.
ZLEXCOUNT Returns a value between min and max from the sorted set of elements with the same score arranged in lexical order.
ZMSCORE Removes and returns the score of the specified element in the sorted set.
ZPOPMAX Removes and returns an element with the highest score from the sorted set
ZPOPMIN Removes and returns an element with the lowest score from the sorted set.
ZRANDMEMBER Randomly returns one or more elements from a sorted set.
ZRANGESTORE Stores a range of elements from a sorted set in the destination key.
ZREMRANGEBYLEX Removes all elements arranged in lexical order from a sorted set.
ZREVRANK Returns the rank of the element from a sorted set in which the elements are arranged with high to low scores.
ZRANGEBYLEX Returns range of elements by lexicographical range.
ZRANGEBYSCORE Returns range of elements by score.
ZREVRANGE Returns the range of elements from a sorted set in which the elements are arranged with high to low scores.
ZREVRANGEBYLEX Returns a range of elements arranged in lexical order from a sorted set from higher to lower strings.
ZREVRANGEBYSCORE Returns range of elements by score ordered from higher to lower.
Group Command Description
Strings APPEND Appends the value at the end of the string.
GET Returns the value of the specified key.
GETRANGE Returns the part of the string that is specified by the start and end offsets of the string.
GETSET Assigns a new value to the key and returns the old stored value.
MGET Returns the values assigned to specified keys.
MSET Assigns the specified keys to their respective values. This command can assign values to all the specified keys at once.
SET

Sets the key to store the string value.

SETRANGE Replaces a part of the string, which is specified within start and end offsets.
STRLEN Returns the length of the string set. An error is displayed when the key holds a value other than the string.
SETNX Sets the value of a key in absence of the key.
SETEX Sets the value and expiration of a key.
PSETEX Sets the value and expiration of a key, where the expiration time is specified in milliseconds.
GETDEL Deletes the returned value of a key.
INCR Increments the integer value of the key by one.
INCRBY Increments the integer value of a key by a specified number.
DECR Decrements the integer value of a key by one.
DECRBY Decrements the integer value of a key by a specified number.
INCRBYFLOAT Increments the float value of the key by a specified number.
MSETNX Assigns multiple keys to multiple values.
GETEX Returns the value and sets the expiration of the key.
Group Command Description
JSON JSON.ARRAPPEND Appends the JSON values into the array at path after the last element in it.
JSON.ARRINDEX Returns the index of the first occurrence of a JSON scaler value in an array at path.
JSON.ARRINSERT Inserts the JSON values into the array at path before the index (shifts to the right).
JSON.ARRLEN Returns the length of the JSON array at path in key.
JSON.ARRPOP Removes and returns an element from the index in the array.
JSON.ARRTRIM Trims an array so that it contains only the specified inclusive range of elements.
JSON.CLEAR Clears container values (arrays/objects) and set numeric values to 0.
JSON.DEL Deletes a value.
JSON.GET Returns the value at path in JSON serialized form.
JSON.MERGE Merges a given JSON value into matching paths. Consequently, JSON values at matching paths are updated, deleted, or expanded with new children.
JSON.MGET Returns the values at path from multiple key arguments.
JSON.MSET Sets or updates one or more JSON values according to the specified key-path-value triplets.
JSON.NUMINCRBY Increments the number value stored at path by number.
JSON.OBJKEYS Returns the keys in the object that's referenced by path.
JSON.OBJLEN Reports the number of keys in the JSON object at path in key.
JSON.SET Sets the JSON value at path in key.
JSON.STRAPPEND Appends the JSON string values to the string at path.
JSON.STRLEN Reports the length of the JSON String at path in key.
JSON.TOGGLE Toggles a Boolean value stored at path.
JSON.TYPE Returns the type of JSON value at path.

Input

The Input tab displays the input schema of the activity in a tree structure. The input displayed for this activity depends on the object that you select on the Settings tab. You can enter the input manually or map the input to the output from a preceding activity provided that the preceding activity has an output.

Field Command Description
Database Index All commands You can choose the Redis Database partition dynamically during run-time by mapping the database index from a previous activity or by hard-coding it.
Note: If the database index is not provided in the input schema then the value of the Default Database Index field is retained from the Redis Connector dialog box and commands are executed on that partition.

Output

The Output tab displays the output schema of the activity in a tree structure. The output value is "read-only". The information in the schema varies based on the fields selected on the Settings tab. The properties that are displayed in the schema correspond to the output of the activity and can be used as input by subsequent activities in the flow.

Loop

If you would like this activity to iterate multiple times within the flow, enter an expression that evaluates to the iteration details. Select a type of iteration from the Type menu. The default type is None, which means the activity does not iterate. Refer to the "Using the Loop Feature in an Activity" topic in the TIBCO Flogo® Enterprise documentation.

If you would like this activity to iterate multiple times within the flow, enter an expression that evaluates to the iteration details. Select a type of iteration from the Type menu. The default type is None, which means the activity does not iterate. Refer to the "Using the Loop Feature in an Activity" topic in the TIBCO Cloud ™ Integration documentation.