Verisyntax — User Manual (prototype 0.1)
Recipe: join customers and orders
The included <example-project> project turns two CSV files into typed SQLite tables and combines them with a type-checked join.
database local:
engine sqlite
path "customer_orders.sqlite"
source customers:
database local
table "customers"
column id: integer from "customer_id"
column name: text
column country: text
primary_key id
provenance row
source orders:
database local
table "orders"
column id: integer from "order_id"
column customer_id: integer
column total: real
column status: text
primary_key id
provenance row
dataset paid_customer_orders:
from customers as customer
inner join orders as order on customer.id = order.customer_id
select customer.name as customer_name
select customer.country as country
select order.total as order_total
where order.status = "paid"
- Open
<example-project>, opencustomer_orders.vsx, and click Check. - Initialize metadata for database
local. - Select source
customersand importcustomers.csvwithcreate; review three rows. - Select source
ordersand importorders.csvwithcreate; review four rows. - Select
paid_customer_orders, then click Compile C++, Build native, and Run.
The result contains Customer A with 125.5 and Customer C with 200.0. Customer B's order is pending, and Customer A's second order is refunded, so both are filtered out. Both sources use the same database; Verisyntax does not perform a hidden cross-database join.
