D.4 Using Clusters to Work with Spreadsheets
Sheerpower clusters allow you to work with spreadsheets as if they are
database tables. Clusters are very fast, processing millions of rows per
second. Any column can be treated as a lookup key. Lookup speeds of over 5
million per second are typical.
The cities dataset is 10,000 rows of the largest cities in the world. It
includes the city name, country code, and population for each one.
spreadsheet is input into a program using the cluster input
statement. You give the name of the spreadsheet CSV file, the number of
headers, and the name of the cluster you will be using.
cluster input name '@..\safe\safe_world_cities.csv', headers 1: cities
In the example code below, you can input data into the a$
then click run
to try different cities.
Note: The CLUSTER INPUT statement has many options and can input
JSON files, tab-separated-value (TSV) files, and even X12 files into clusters. For details see: