I\'ve read mass-insert provided at redis.io, but it really confused me. I tried to make a file then use \"cat data.txt | redis-cli --pipe\" to insert:
I was able to work with the SET Key0 Value0
form.
Please have a look at https://stackoverflow.com/a/30511742/2613942
The reply is about the LPUSH
command. It also works fine with SET
.
To summarize, double-quote the parameters
SET "mykey" "myval"
Change the format of the file from unix to windows with unix2dos
:
unix2dos myfile.txt
Then import using
cat myfile.txt | src/redis-cli --pipe
That worked for me.