Interactive Query Shell

Tailpipe provides an interactive query shell that provides features like auto-complete, syntax highlighting, and command history to assist you in writing queries.

To open the query shell, run tailpipe query:

Notice that the prompt changes, indicating that you are in the Tailpipe shell.

If you've collected a lot of data and want to optimize your queries for a subset of it, you can pre-filter the database. You can restrict to the most recent 45 days:

Or to a range:

Or to a specific index in a partition:

You can exit the query shell by pressing Ctrl+d on a blank line, or using the .exit command.

Autocomplete

The query shell includes an autocomplete feature that will suggest words as you type. Type . (period). Notice that the autocomplete appears with a list of the Tailpipe meta-commands commands that start with .:

As you continue to type, the autocomplete will continue to narrow down the list of metacommands to only those that match. You can cycle forward through the list with the Tab key, or backward with Shift+Tab.

History

The query shell supports command history, allowing you to retrieve, run, and edit previous commands. The command history works like typical unix shell command history, and persists across query sessions. When on a new line, you can cycle back through the history with the Up Arrow or Ctrl+p and forward with Down Arrow or Ctrl+n.

Key bindings

The query shell supports standard emacs-style key bindings:

KeysDescription
Ctrl+aMove the cursor to the beginning of the line
Ctrl+eMove the cursor to the end of the line
Ctrl+fMove the cursor forward 1 character
Ctrl+bMove the cursor backward 1 character
Ctrl+wDelete a word backwards
Ctrl+dDelete a character forwards. On a blank line, Ctrl+d will exit the console
BackspaceDelete a character backwards
Ctrl+p, Up ArrowGo to the previous command in your history
Ctrl+n, Down ArrowGo to the next command in your history

Exploring Tables & Columns

Tailpipe tables provide an interface for querying log data using standard SQL. Tailpipe tables do not actually store data, they query the DuckDB views created over Parquet files collected by tailpipe collect. The details are hidden from you though - you just query them like any other table!

In the query shell, use .inspect to view tables.

Select a table to view its columns.