Get the App
SLTechnology News&Howtos  ›  Database  › 

Redis imports text data in bulk

Shulou Source: shulou.com Published: 2022-06-01 05:05:14 10月04日 Update

# check the imported text file, which contains specific Redis commands

# cat 20180208.txt

Hdel user.user.base 317986

Hdel user.user.base 371149

Hdel user.user.base 370964

Hdel user.user.base 371291

Hdel user.user.base 370906

Hdel user.user.base 371035

Hdel user.user.base 371086

Hdel user.user.base 371042

Hdel user.user.base 370838

Hdel user.user.base 371347

Hdel user.user.base 371065

Hdel user.user.base 371280

Hdel user.user.base 371307

In the redis-cli client tool, there is a plumbing option

# redis-cli-help

-- pipe Transfer raw Redis protocol from stdin to server.

Perform data import

# cat 20180208.txt | / usr/bin/redis-cli-- pipe

All data transferred. Waiting for the last reply...

Last reply received from server.

Errors: 0, replies: 593

Tags: Data text commands customers clients tools files pipes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Microsoft Apple Linux Shulou Technology