Skip to main content

Simulated Ordering Run

The Dagster DAG starts the Mercedes simulated ordering run daily, one run with 5 dealers sampled at random. Simulated Runs describes the behavior that every OEM's simulated run shares. The Mercedes run is configured in projects/ai_mercedes/src/ai_mercedes/defs/mercedes/us/simulation/defs.yaml.

The file is under mercedes/us because the ordering service names the Mercedes market us. The tables the run reads are under mercedes/mbusa. The warehouse_market field of the ordering profile maps us to mbusa.

Dealer set​

The job selects each dealer_code in the job's partition of mercedes/mbusa/enriched/netstar_sales_inventory. That dealer_code is the suffix of the NetSTAR sales_* table, the dealer whose user collected it, and so the same dealer as the inventory_* table the run reads. The inventory table's dealer_code is the order's ship-to dealer, which can differ.

The sales partition holds only the collections loaded on the partition date and the 2 days before. That window is the only age limit: last_collected_column is _partition_date, which equals the partition date on every row, so max_collection_age_days: 0 excludes no dealer. A dealer whose last collection is older is absent from the partition and is not listed as stale.

dealer_sample_size: 5 limits the runs to a random sample of 5 of those dealers each day.

Targets​

The run sets target_filter.extended_targets, so it considers every order that NetSTAR allows to be changed, whether or not the order is sold, priority one or already modified. A simulated run leaves target_filter.skip_pilot_model_list unset, so it does not limit targets to the pilot model list. dealer_assignment_lookback_days: 30 keeps only orders assigned to the dealer in the 30 days before the partition date.

Monitored assets​

The sensor waits until every asset the run reads has a materialization of the partition. These are the candidate-selection tables and the NetSTAR sales table, listed in monitored_assets in the defs.yaml above.