0.0.5 • Published 6 years ago

fulcrum-query-cli v0.0.5

Weekly downloads
3
License
BSD
Repository
github
Last release
6 years ago

fq

Fulcrum query CLI

Installation

npm install fulcrum-query-cli -g

Setup

Create a file at ~/.fulcrumrc with your API token in it.

Usage

fq QUERY -f [format] -t [API token]

Supported formats are csv, geojson, and json .

Example

Output a CSV to the console

fq 'SELECT feature_type, COUNT(1) FROM "Park Inventory/park_features" GROUP BY feature_type ORDER BY COUNT(1) DESC' -f csv

Output a CSV file

fq 'SELECT feature_type, COUNT(1) FROM "Park Inventory/park_features" GROUP BY feature_type ORDER BY COUNT(1) DESC' -f csv > park-features-by-type.csv

View GeoJSON features in geojson.io (requires geojsonio-cli package)

fq 'SELECT * FROM "Park Inventory"' -f geojson | geojsonio

Fetch records matching a column value. Here we use double quotes on the query and backslash escape the table name.

fq "SELECT * FROM \"Fire Hydrant Inventory\" WHERE hydrant_type = 'Pillar / Aboveground'" -f geojson | geojsonio
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

8 years ago

0.0.1

8 years ago