> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaantonio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Schema

> See the views, row types, and keys in the reporting schema.

The `reporting` schema has 22 business views. Each view has one defined row type, also called its
grain.

## Shipments

| View                                  | One row per               | Join key                   |
| ------------------------------------- | ------------------------- | -------------------------- |
| `shipments`                           | Shipment                  | `shipment_id`              |
| `shipment_charges`                    | Shipment charge           | `shipment_id`              |
| `shipment_charge_rating_bases`        | Charge rating basis       | `shipment_id`, `charge_id` |
| `shipment_dates`                      | Shipment date             | `shipment_id`              |
| `shipment_milestones`                 | Shipment milestone        | `shipment_id`              |
| `shipment_parties`                    | Shipment party            | `shipment_id`              |
| `shipment_party_registration_numbers` | Party registration number | `shipment_id`, `party_id`  |
| `shipment_packing_lines`              | Shipment packing line     | `shipment_id`              |
| `shipment_containers`                 | Shipment container        | `shipment_id`              |
| `shipment_emissions`                  | Shipment emission         | `shipment_id`              |
| `shipment_references`                 | Shipment reference        | `shipment_id`              |
| `shipment_custom_fields`              | Shipment custom field     | `shipment_id`              |

## One-off quotes

| View                  | One row per        | Join key   |
| --------------------- | ------------------ | ---------- |
| `one_off_quotes`      | One-off quote      | `quote_id` |
| `quote_charges`       | Quote charge       | `quote_id` |
| `quote_dates`         | Quote date         | `quote_id` |
| `quote_parties`       | Quote party        | `quote_id` |
| `quote_packing_lines` | Quote packing line | `quote_id` |
| `quote_references`    | Quote reference    | `quote_id` |
| `quote_custom_fields` | Quote custom field | `quote_id` |

## Relationships

| View               | One row per             | Endpoints                  |
| ------------------ | ----------------------- | -------------------------- |
| `shipment_consols` | Shipment-to-consol link | `shipment_id`, `consol_id` |
| `quote_shipments`  | Quote-to-shipment link  | `quote_id`, `shipment_id`  |
| `quote_bookings`   | Quote-to-booking link   | `quote_id`, `booking_id`   |

## Optional source fields

<Note>
  `source_fields` has one row per scalar XML node. Use it when the business views do not contain a
  field you need. It is not part of the default Power BI model.
</Note>

Open **Analytics > Schema** in Lambda to see the current columns and types for each view.
