0
0
Redisquery~10 mins

Pipeline in client libraries in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start a pipeline in Redis client.

Redis
pipe = client.[1]()
Drag options to blanks, or click blank then click option'
Aconnect
Bpipeline
Cexecute
Dflush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'connect' instead of 'pipeline' to start a pipeline.
Trying to execute commands without starting a pipeline.
2fill in blank
medium

Complete the code to add a command to the pipeline.

Redis
pipe.[1]('set', 'key', 'value')
Drag options to blanks, or click blank then click option'
Aexecute
Bflush
Csend_command
Dset
Attempts:
3 left
💡 Hint
Common Mistakes
Calling 'set' directly on the pipeline object instead of 'send_command'.
Using 'execute' before adding commands.
3fill in blank
hard

Fix the error in the code to execute the pipeline.

Redis
results = pipe.[1]()
Drag options to blanks, or click blank then click option'
Asend_command
Bflush
Cpipeline
Dexecute
Attempts:
3 left
💡 Hint
Common Mistakes
Calling 'send_command' instead of 'execute' to run the pipeline.
Trying to call 'pipeline' again instead of executing.
4fill in blank
hard

Fill both blanks to create a pipeline and add a GET command.

Redis
pipe = client.[1]()
pipe.[2]('get', 'mykey')
Drag options to blanks, or click blank then click option'
Apipeline
Bsend_command
Cexecute
Dconnect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'execute' to add commands instead of to run them.
Trying to connect instead of creating a pipeline.
5fill in blank
hard

Fill all three blanks to create a pipeline, add two commands, and execute it.

Redis
pipe = client.[1]()
pipe.[2]('set', 'a', '1')
pipe.[2]('get', 'a')
results = pipe.[3]()
Drag options to blanks, or click blank then click option'
Apipeline
Bsend_command
Cexecute
Dflush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'flush' instead of 'execute' to run the pipeline.
Adding commands with 'execute' instead of 'send_command'.