tunnel Verified current stable Not installed? Data Processing

Tunnel / Download Table To Local File

Download Table To Local File

Downloads a specified table to a local file, facilitating offline data access.

$
Terminal
tunnel download <table_name> <path/to/file>;

When To Use

When needing to analyze data offline or transfer it for backup purposes.

Pro Tip

Ensure sufficient local disk space and permissions when performing downloads to avoid partial data loss.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
tunnel download <table_name> <path/to/file>;

Anatomy of Output

Understanding the result

Query OK, 50 rows downloaded (0.40 sec) Operation Result

Indicates successful download of records.

TABLE 'table_name' downloaded to 'path/to/file'; Download Summary

Confirmation of table download status.

Troubleshooting

Common pitfalls

ERROR 1049 (42000): Unknown database 'xyz'

Solution: Ensure the correct database is targeted.

ERROR 1045 (28000): Access denied for user 'user'@'localhost'

Solution: Verify user permissions for downloading data.

ERROR 2006 (HY000): MySQL server has gone away

Solution: Increase `max_allowed_packet` size.

Command Breakdown

What each part is doing

tunnel
Base Command
The executable that performs this operation. Here it runs Tunnel before the shell applies any redirect operators.
<table_name>
table name
The value supplied for table name.
<path/to/file>
Input Files
The file path or paths supplied to this command.

Alternative Approaches

Comparable commands in other tools

Alternative data processing tools for the same job.