-
Notifications
You must be signed in to change notification settings - Fork 277
Adding example for writhing to multiple keys #1675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
andy-stark-redis
merged 4 commits into
redis:main
from
ilianiliev-redis:RDSC-3627-writhing-to-multiple-keys
Jun 18, 2025
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
43b0929
Adding example for writhing to multiple keys
ilianiliev-redis 4b1f55b
Update content/integrate/redis-data-integration/data-pipelines/transf…
ilianiliev-redis 9ce4194
Update content/integrate/redis-data-integration/data-pipelines/transf…
ilianiliev-redis 24c2ee6
Update content/integrate/redis-data-integration/data-pipelines/transf…
ilianiliev-redis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...integration/data-pipelines/transform-examples/redis-writing-to-multiple-keys.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| Title: Writhing to multiple keys | ||
| alwaysopen: false | ||
| categories: | ||
| - docs | ||
| - integrate | ||
| - rs | ||
| - rdi | ||
| description: null | ||
| group: di | ||
| linkTitle: Writhing to multiple keys | ||
ilianiliev-redis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| summary: Redis Data Integration keeps Redis in sync with the primary database in near | ||
| real time. | ||
| type: integration | ||
| weight: 100 | ||
| --- | ||
|
|
||
| If you want to write the results to multiple keys, you can do that by defining multiple `redis.write` items `output` section of the job file. Each section can specify a different key, data format, and other parameters. For example, you can create two different keys for the same data, one with a default key format and another with a custom key format and mapping. | ||
ilianiliev-redis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```yaml | ||
| output: | ||
| - uses: redis.write | ||
| with: | ||
| # Setting data_type to JSON and using the default key format | ||
| data_type: json | ||
|
|
||
| - uses: redis.write | ||
| with: | ||
| data_type: json | ||
|
|
||
| # Defining a custom key format | ||
| key: | ||
| language: jmespath | ||
| expression: concat(['events-simplified:id:', id]) | ||
|
|
||
| # And defining a custom mapping | ||
| mapping: | ||
| - id: id | ||
| - name: name | ||
| - location: location | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.