0
0
Redisquery~10 mins

Pipeline concept and behavior 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 Redis pipeline.

Redis
pipe = client.[1]()
Drag options to blanks, or click blank then click option'
Amulti
Btransaction
Cpipeline
Dbatch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'transaction' instead of 'pipeline'.
Trying to use 'multi' which is a Redis command but not the client method.
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_command
Bexecute
Csend_command
Dqueue_command
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'execute' which runs the pipeline immediately.
Using 'send_command' which is not a standard pipeline method.
3fill in blank
hard

Fix the error in the code to run the pipeline and get results.

Redis
results = pipe.[1]()
Drag options to blanks, or click blank then click option'
Asend
Brun
Ccommit
Dexecute
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' which is not a Redis pipeline method.
Using 'commit' which is a database term but not for Redis pipelines.
4fill in blank
hard

Fill both blanks to create a pipeline, add a command, and execute it.

Redis
pipe = client.[1]()
pipe.[2]('get', 'key')
results = pipe.execute()
Drag options to blanks, or click blank then click option'
Apipeline
Bexecute_command
Ctransaction
Dsend_command
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'transaction' instead of 'pipeline' to start.
Using 'send_command' instead of 'execute_command' to add commands.
5fill in blank
hard

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

Redis
pipe = client.[1]()
pipe.[2]('set', 'a', '1')
pipe.[3]('get', 'a')
results = pipe.execute()
Drag options to blanks, or click blank then click option'
Apipeline
Bexecute_command
Csend_command
Dtransaction
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'transaction' instead of 'pipeline' to start.
Using 'send_command' which is not the standard method to add commands.