FAQ¶
What is Neovim + Tree-sitter, and why use them for Teradata?
Neovim is a modern, lightweight, keyboard-driven terminal text editor. Tree-sitter is its built-in incremental parsing system that compiles SQL into a concrete Abstract Syntax Tree (AST) in real time. Together, they provide instant startup (< 50ms), minimal memory footprint (< 50 MB), precise statement boundary extraction (so semicolons in strings or comments never break execution), and live syntax error diagnostics before queries hit the database server. See What is Neovim + Tree-sitter?.
How does the plugin execute queries via BTEQ under the hood?
When you run a query (:TDO, :TDV), the plugin extracts the statement via Tree-sitter, applies any parameter substitutions, and launches an asynchronous background bteq process via vim.system (or sends it over standard I/O pipes in a persistent session). The script logs on securely using tdwallet, applies session formatting directives (.SET RETLIMIT, .SET SEPARATOR, .SET NULL), executes the SQL, and streams results into a split table buffer without blocking Neovim. See How queries are executed via BTEQ.
How does vim-teradata compare to GUI tools like DBeaver, Teradata Studio, and SQL Assistant?
Unlike heavyweight Java/Eclipse GUIs (Teradata Studio, DBeaver) or retired 32-bit Windows tools (SQL Assistant), vim-teradata is keyboard-first, starts instantly, uses negligible RAM, and runs natively over SSH or inside WSL. It interfaces directly with Teradata's native TTU binaries (BTEQ, TPT FastExport, tdwallet) rather than generic JDBC drivers. For a complete feature matrix and trade-offs, see Comparison: vim-teradata vs. GUI tools.
Do I need Neovim 0.12+?
Yes. vim-teradata requires Neovim 0.12+ because it relies on modern Lua APIs including vim.system, vim.diagnostic, vim.pack.add, and Neovim 0.12 Tree-sitter and filetype APIs.
Can I use vim-teradata with vanilla Vim?
No. The plugin is built specifically for Neovim (using Lua, vim.system, vim.diagnostic, and the built-in Tree-sitter API).
Does vim-teradata store my password?
No. Passwords never touch disk or the plugin's data directory. Authentication is delegated to tdwallet using $tdwallet(<user>).
Which operating systems are supported?
Linux, macOS, and Windows (including WSL). The only platform-dependent component is the compiled Tree-sitter parser library (.so, .dylib, or .dll).
Which Teradata client versions are supported?
Confirmed with TTU 20 and compatible with TTU 17.10. Ensure bteq is on your $PATH.
Can I run multiple queries in parallel?
Yes. Every query run (:TDO, :TDV) spawns an independent, asynchronous BTEQ job. You can track all background jobs in real time with :TDJ. The exception is a buffer with a persistent session (:TDSession), where commands are queued and execute sequentially.
How do I run a BEGIN TRANSACTION ... COMMIT; block?
Use the multistatement commands :TDM or :TDMV so every statement is sent in the same BTEQ job, or open a persistent session with :TDSession and run the statements individually.
How do I use volatile tables?
Open a persistent session with :TDSession, then create and query your volatile tables using the standard query commands (:TDO, :TDV).
Does a persistent session need anything besides BTEQ?
No. It interacts with the standard bteq binary through system pipes (vim.system); no terminal emulator or extra tooling is required on Linux, macOS, or Windows.
Can I limit the scope of :TDSync?
Yes. Set the filter_db option in setup() with a Lua pattern (e.g. '^PROD_') to import only relevant databases.
Do I need to run a full sync when only a few tables change?
No. You can use incremental sync: run :TDSync update DB.Table (or simply :TDSync update with your cursor on the table name).
Does autocompletion support volatile or temporary tables?
Yes. Run :TDSync add <vt_name> to register a session-only volatile table from your buffer's CREATE VOLATILE TABLE statement, or :TDSync add! <vt_name> to inspect server-side column definitions.
How do I export the complete result of a large query?
Press F in any result grid or run :TDExport. The query is executed in the background using Teradata Parallel Transporter (TPT / tbuild) and saved to a delimited CSV file without overwhelming Neovim's memory.
Why does full export switch between EXPORT and SELECTOR operators?
By default (operator = "auto"), vim-teradata wraps queries and runs them through the high-throughput multi-session EXPORT operator. For queries with top-level ORDER BY, CTEs (WITH), or data types unsupported by FastExport (like LOB, JSON, XML, or UDT), it routes through or automatically falls back to the SELECTOR operator in report mode. See TPT Operator Routing.
Where is metadata and history stored?
Under vim.fn.stdpath('data') .. '/teradata' by default (configurable via data_dir, history_dir, and bookmarks_dir).
How do I change connection profiles for a single query?
Open the user manager with :TDU, select the desired user profile with <CR>, run your query, and switch back when done.
Why is the formatter marked experimental?
:TDF and :TDFF work reliably on standard DML and DDL statements, but they may reorder comments or format unusual syntax constructs unexpectedly. Always inspect diffs before committing formatted files.
Why does gD show a different total than gS?
Three reasons:
1. gS calculates client-side across rows currently loaded into the grid (capped by retlimit), whereas gD aggregates the full query across the entire database in Teradata.
2. In-grid <CR> cell filters apply to gS (when footer_scope = "displayed"), but are not pushed down to the server by gD (Σ db (unfiltered)).
3. gS uses 64-bit IEEE-754 floating-point arithmetic in Lua (~15 digits of precision), while gD leverages Teradata's native high-precision DECIMAL and BIGINT math. See Virtual answersets.