version: 1
tests:
- name: crosses jobs x compensation into one row per pair
pipeline:
transforms:
- type: cross_join
config:
arrays: [jobs, compensation]
input:
- employee_id: 1
jobs:
- { title: "Engineer" }
- { title: "Manager" }
compensation:
- { amount: 100 }
- { amount: 200 }
expect:
records_written: 4
match: subset
unordered: true
records:
- { employee_id: 1, title: "Engineer", amount: 100 }
- { employee_id: 1, title: "Engineer", amount: 200 }
- { employee_id: 1, title: "Manager", amount: 100 }
- { employee_id: 1, title: "Manager", amount: 200 }
- name: empty crossed array skips the record (CROSS JOIN semantics)
pipeline:
transforms:
- type: cross_join
config:
arrays: [jobs, compensation]
on_empty: skip
input:
- { employee_id: 2, jobs: [ { title: "Analyst" } ], compensation: [] }
expect:
records_written: 0