fulcrum-query-cli

0.0.5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i fulcrum-query-cli

Weekly Downloads

0

Version

0.0.5

License

BSD

Unpacked Size

108 kB

Total Files

9

Last publish

Collaborators

  • zhm