Supported Databases
Wiretalk supports all Wirekite source and target databases:| Database | Type Flag |
|---|---|
| PostgreSQL | postgres or postgresql |
| MySQL | mysql |
| MariaDB | mariadb |
| SQL Server | sqlserver |
| Oracle | oracle |
| Snowflake | snowflake |
| Firebolt | firebolt |
| Google BigQuery | bigquery |
| Google Cloud Spanner | spanner |
| Databricks | databricks |
| SingleStore | singlestore |
Command Line Usage
Required Flags
| Flag | Description |
|---|---|
-d | Database type (required) - see supported databases above |
-c | Path to file containing the connection string |
-dsn | Connection string provided directly (alternative to -c) |
-c or -dsn must be provided.
Optional Flags
| Flag | Description |
|---|---|
-quiet | Suppress prompts, print only row numbers and column names |
-silent | Print only query results (no metadata) |
-csv | Output results in CSV format with headers |
-json | Output per-statement JSON results (for programmatic integration) |
Interactive Mode
When run interactively (connected to a terminal), Wiretalk provides a prompt-based interface with command history.Example Session
Escape Commands
Wiretalk provides several escape commands for controlling output and behavior:| Command | Description |
|---|---|
\h | Display help information |
\i <filename> | Load and execute SQL statements from a file |
\o [filename] | Redirect output to a file; \o alone disables file output |
\d csv|list | Change display format (default: list) |
\p <num> | Set number of rows per page; 0 disables paging |
\r true|false | Show or hide row numbers |
\t | Toggle elapsed time display |
\D | Print current display settings |
\c <enc> <sep> <row> <hdr> | Configure CSV format parameters |
CSV Format Configuration
The\c command configures CSV output format with four parameters:
QUOTE- single quote (')DOUBLEQUOTE- double quote (")COMMA- comma (,)SPACE- space characterTAB- tab characterPIPE- pipe (|)NONE- no characterNEWLINE- newline (\n)CRLF- carriage return + newline (\r\n)- Any other literal character
Non-Interactive Mode
Wiretalk can execute SQL from files or stdin in non-interactive mode:JSON Output Mode
For programmatic integration, use-json to get structured output:
index- statement number (1-based)sql- the executed SQLstatus-OKorFAILEDerror- error message (only if status isFAILED)lineNum- line number in input
Database-Specific Features
Oracle PL/SQL Blocks
Oracle PL/SQL blocks (starting withBEGIN or DECLARE) are terminated by a / on its own line:
Google Cloud Spanner Batch DDL
Spanner requires DDL statements to be batched together. Wiretalk supports this with special commands:Notes
- Command history is saved to
~/.linerhistory - Multi-line SQL statements are supported - statements are executed when a semicolon is encountered
- For PostgreSQL,
sslmode=disableis automatically added if not specified - SQL Server PRINT output from stored procedures is captured and displayed
