Skip to content

Examples of Processes With SQL Node

Process With SQL Aggregation Node

$ cat sql_agg.strm

// Name process as sql_agg
name sql_agg

// read from the sql_agg.csv file
in sql_agg.csv -> input

// create a node that feeds into another node
SQL select *, (value*2.) as value2 from input into agg_table;

SQL select * from agg_table where value2 > 102604. into output;

// write out the results
out output -> outputsql_agg.csv

$ vor create process sql_agg

$ vor run process

Process With SQL Join Node

$ cat sql_join.strm

//Name process as sql_join
name sql_join

// read from the sql_join1.csv and sql_join2.csv files
in sql_join1.csv -> first_table_to_join
in sql_join2.csv -> second_table_to_join

// create a join node
SQL select * from first_table_to_join inner join second_table_to_join using (id) into inner_join_output;

// write out the results
out inner_join_output -> sql_join_output.csv

$ vor create process sql_join

$ vor run sql_join