Skip to content
agershun edited this page Dec 13, 2014 · 6 revisions

You can use Alasql and Alacon for simple ETL procedures.

Load data from CSV file with headers

If you have a CSV file, you can process it directly in Alasql:

    alasql('select * from csv("cities.csv",{headers:true}) where population > 100000 order by city', [],
      function(data) {
         console.log(data);
    });

You can do the same query with Alacon command-line utility and prepare file to stdout:

    node alacon "select * from csv('cities.csv',{headers:true}) where population > 100000 order by city" >city.txt

Prepare data from XLSX and XLS file

    alasql('select * from xlsx("cities.xlsx",{headers:true, range:"A1:E100"})\
      where population > 100000 order by city', [], function(data) {
         console.log(data);
    });
Clone this wiki locally