Joins
Spreadic supports cross-joins of models. For example, you can join the customers
model to the orders
model to supply additional information (i.e. from certain columns in the customers
model) about the customer associated to the order by adding the following to the YAML file:
models:
- name: orders
meta:
joins:
- model: customers
sql_on: "orders.customer_id = customers.customer_id"
columns: [gender, sign_up_country, created_at_month, number_of_customers]
Last updated