turbot/csv

GitHub
steampipe plugin install csvsteampipe plugin install csv

CSV + Steampipe

A comma-separated values (CSV) file is a delimited text file that contains records of data.

Steampipe is an open source CLI to instantly query data using SQL.

Query data from the my_users.csv file:

select
first_name,
last_name
from
my_users;
+------------+-----------+
| first_name | last_name |
+------------+-----------+
| Michael | Scott |
| Dwight | Schrute |
+------------+-----------+

Documentation

Get started

Install

Download and install the latest CSV plugin:

steampipe plugin install csv

Credentials

No credentials are required.

Configuration

Installing the latest csv plugin will create a config file (~/.steampipe/config/csv.spc) with a single connection named csv:

connection "csv" {
plugin = "csv"
# Paths is a list of locations to search for CSV files
# All paths are resolved relative to the current working directory (CWD)
# Wildcard based searches are supported, including recursive searches
# For example:
# - "*.csv" matches all CSV files in the CWD
# - "**/*.csv" matches all CSV files in the CWD and all sub-directories
# - "../*.csv" matches all CSV files in the CWD's parent directory
# - "steampipe*.csv" matches all CSV files starting with "steampipe" in the CWD
# - "/path/to/dir/*.csv" matches all CSV files in a specific directory
# - "/path/to/dir/custom.csv" matches a specific file
# If paths includes "*", all files (including non-CSV files) in
# the CWD will be matched, which may cause errors if incompatible file types exist
# Defaults to CWD
paths = [ "*.csv" ]
# The field delimiter character when parsing CSV files. Must be a single
# character. Defaults to comma.
# separator = ","
# If set, then lines beginning with the comment character without preceding
# whitespace are ignored. Disabled by default.
# comment = "#"
}
  • paths - A list of directory paths to search for CSV files. Paths are resolved relative to the current working directory. Paths may include wildcards and also supports ** for recursive matching. Defaults to the current working directory.
  • separator - Field delimiter when parsing files. Defaults to ,.
  • comment - Lines starting with this comment character are ignored. Disabled by default.

Get involved