tailpipe query

Query a Tailpipe table.

Usage

Execute SQL queries interactively, or by a query argument.

To open the interactive query shell, run tailpipe query with no arguments. The query shell provides a way to explore your data and run multiple queries.

If a query string is passed on the command line then it will be run immediately and the command will exit. Alternatively, you may specify one or more files containing SQL statements. You can run multiple SQL files by passing a glob or a space-separated list of file names.

Usage

Run Tailpipe interactive query shell:

Run a batch query:

Flags

ArgumentDescription
--from stringSpecify the start time
--header stringSpecify whether to include column headers in csv and table output (default true`)
--helpHelp for tailpipe query
--index stringsSpecify the index(es) to use
--output outputOne of: table, csv, json, line (default table)
--partition stringsSpecify the partition(s) to use
--separator stringSeparator string for csv output (default ",")
--to stringSpecify the end time

Global Flags

Flag Description
--config-path

Sets the search path for configuration files. This argument accepts a colon-separated list of directories. All configuration files (*.tpc) will be loaded from each path, with decreasing precedence. The default is .:$TAILPIPE_INSTALL_DIR/config (.:~/.tailpipe/config). This allows you to manage your workspaces and connections centrally in the ~/.tailpipe/config directory, but override them in the working directory / mod location if desired.

--workspace Sets the Tailpipe workspace profile. If not specified, the default workspace will be used if it exists. See workspace for details.

Examples

Open an interactive query console:

Run a specific query directly:

Query from a date:

Query within a range of dates:

Query a specific partition:

Query two partitions:

Query a specific index:

Run a query and save a snapshot:

Run a query and share a snapshot:

Run the SQL command in the my_queries/my_query.sql file:

Run a query and return output in CSV format:

Run a query and return output in pipe-separated format: