Input pagination without caches #2077
-
Hello, I'm looking to implement a Redis scan input. I wrote an example that involved a cache (based on #752 (comment)), and that worked well. However, I do not prefer using a cache, so I rewrote it as follows. But the message to the processors after the input:
read_until:
restart_input: true
check: this.cursor == "0"
input:
generate:
interval: ""
mapping: root = (this|{})
processors:
- redis:
url: tcp://localhost:6379
command: scan
args_mapping: root = [ this.cursor, "match", "*" ]
- mapping: |
root.cursor = this.index(0)
root.items = this.index(1) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I just found #1986. Is there no way around using a cache? |
Beta Was this translation helpful? Give feedback.
Hey @kuthulas, you're welcome!
OK, fair enough.
That sucks... Unfortunately, you can't stream data from a processor.
In this case, I think the best thing to do is to write your own custom input similar to the examples that you can find here. You c…