Skip to main content

Model Identity: Keys and Resolution Across the US Feeds

How the Audi US tiers identify a model, deduplicate on that identity, and match entities across feeds. Each source has its own page: public API, OneGraph, accessaudi, order guides.

Why the catalog id is not the identity​

An Audi catalog id is {model_code}{model_version}{extensions}_{catalog_model_year}, such as 4NL5SA1S0DWPS_2024. Two of its four parts are unstable. The version changes without a pattern, and the catalog model year changes too, less often. Two ids that differ in either part can still be the same model. accessaudi has no catalog id.

The feeds also count years differently. OneGraph's modelId.year is the year in the catalog id, stored as catalog_model_year. accessaudi, the carline name and the VIN all have the sales model year, which can be one year later: the "2027 Audi SQ6 e-tron" carline has modelId.year 2026. sales_model_year is therefore its own column on models, inventory and features. What the catalog year means beyond its place in the id is unknown. Downstream code uses it only to order catalog revisions.

The trim key​

At most one of a variant's extensions is its trim, and the set of trim codes is fixed: WPS is Premium Plus and WPT is Prestige. The ordering system uses the same trim codes as option codes, and changes them at a mid-year start of production. The 2026 A6 Sedan orders Premium Plus as WPS before CW 05/26 and as XPP from then on, and Prestige as WPT and then XPR. accessaudi orders and the order guides can have either form, and TRIM_NORMALIZE maps both to the public form. No other extension or option code identifies a trim. WPD (Convenience) and WPR (Technology) are ordinary packages with the same prefix.

A model's lowest trim has no code. An id or an order without a trim code is the model's default trim. Which trim that is depends on the model: usually Premium, but Premium Plus on a model that has no lower trim. trim_code is therefore the code itself, one of "", "WPS" or "WPT", and "" is a known value. When several codes are present, the highest-ranked in TRIM_RANK wins (ai_public_api.audi.common.trim_code). Which code a given model has comes from onegraph_models, as described below.

Keys​

  • (sales_model_year, model_code) is the model identity. It is the dedup key of every enriched models asset, the merge key of consolidated models, and the key that every foreign key into models joins on. base_model_id is the model code alone, except where base_model_id_aliases in ai_audi.defs.audi.us.template_vars maps a new model code onto the code it replaces from the previous model year.
  • A trim is not part of the identity. AccessAudi orders a trim as an option on the model code, and a guide prices it as an upgrade over the base trim. A higher trim is therefore a feature of its model, keyed by its trim code. Trims as features describes how each source's trims become one model row and its features.
  • Features dedup and merge on the identity plus (pr3_id, parent_package_code).
  • The other model extensions are not part of the identity either. model_catalog_id is a descriptive column: consolidated models keep the base trim's latest id.
  • Nothing is generated: a model only accessaudi lists has a null model_catalog_id until the carline feed lists it.

The public feeds' transformed tables keep one row per trim, keyed (sales_model_year, model_code, trim_code). The order guides' transformed tables have no trim key, because in them each higher trim section is a feature of the model.

A trimline can list one model code twice, because OneGraph sometimes nests the models of a higher trim under trimline_default. There, the first entry of a code is that code's default trim. Later entries keep the trim of their own extensions. Treating every model in the first trimline as the default would give those entries one key, and the transformed dedup would then drop one of them with its catalog id.

Trims as features​

consolidated/models has one row per model: its base trim's carline and guide section, with the base trim's price, catalog id and model_extensions. A model's base trim is the lowest trim its own rows have, by TRIM_RANK, usually "".

Each higher trim is a feature of the model, a package whose option_code is the trim code:

  • In the order guide records, each higher trim section is an option of the model, with feature_type trim. Consolidated classifies the option as a PACKAGE. Its price is the section's upgrade, net of the section's discount. Its ordering_code is the section's option code, such as XPP, and its contents are the STANDARD FEATURES lines it adds. Order guide assets describes the row.
  • ai_audi.ordering_codes translates a trim's XPP and XPR codes to WPS and WPT on every model, wherever an ordering code becomes a public code.
  • In the catalog, a code that is the trim of one of the model year's carlines is the trim's feature, an OPTION of subtype trim, which consolidated classifies as a PACKAGE whatever its PR7 class. A trim's page lists its own code as standard, but the feature is still an option. A catalog page takes its carline's trim, not the code in its id. 4NL5SA has no carline with WPT, so its WPT row, the Executive Plus Package, stays as the catalog lists it.
  • An accessaudi trim's feature keeps the code AccessAudi orders it by as its ordering_code.

A guide marks each code under each trim column. From the marks, the code gets these rows:

  • a row without a parent package, unless only higher trims include the code. Where the row is optional and some trim does not offer the code on its own, a rule limits the row to the trims that do;
  • a content row for each higher trim that includes the code, unless the code is a package. A trim's row lists the packages it includes.

Order guide assets describes the rows and the rule.

The catalog's rows of the other features are collapsed across trims to one row per key:

  • The row comes from the lowest trim that lists the code. It is standard on the model only where the base trim has it as standard.
  • A code that a higher trim has as standard, and the base trim does not, is also a content row of that trim's feature, with parent_package_code the trim code. A stealth item gets no such row where another code of the same PR family qualifies on that trim's page. A code qualifies where the page lists it as standard with no parent package, and where it is either not a stealth item or standard on the base trim.
  • A catalog row scoped to a trim, such as AI9_in_WPT, is a content row of that trim, whichever trim's catalog lists it.

A vehicle refers to its trim like a package: its feature_refs have its trim code, and the trim's contents are added to an order's refs as a package's are. A vehicle's seat type and fabric come only from its feature refs. A vehicle has no trim column.

A vehicle's trim​

An AccessAudi order lists its trim among its option codes, so its refs already have it.

Where the same day's carlines list a OneGraph vehicle's catalog id, the vehicle has that carline's trim. GHASE8's lowest trim is Premium Plus, and its base carline's id has WPS, so a vehicle on that carline is the default trim, "". Any other OneGraph vehicle's trim is the first trim code it names: catalog_trim_code, the code in its catalog id, then option_trim_code, the code among its own option codes. A model name gives no trim.

An empty id is missing data and does not mean the default trim. GHASE80_2027 has no trim code in its id, so a WPT among its features makes it a Prestige vehicle.

The vehicle's trim code is added to its refs, except the default trim, "". An XPP or XPR ref is written as WPS or WPT, so a trim code among the vehicle's own codes and the added trim code are one ref. A trim ref matches the feature of its code, whether the model has the code as a trim or as a package. A 4NL5SA vehicle with WPT refers to the Executive Plus Package.

A public model code that is a model plus options​

The public feeds list the 2026 A3 "Premium Plus S line plus" as a model code of its own, 8YMCUY. The ordering system has no such model. The order guide and AccessAudi list it as 8YMBUY in the Premium Plus trim section with the S line plus package: WPS plus XSY. Three facts show that the two are one model:

  • The two codes differ only in the body-style character that the guide's contents page builds them from.
  • The prices agree: 40,100 + 2,900 + 2,700 = 45,700.
  • The equipment that the public catalog adds to 8YMCUY over the Premium Plus A3 is the equipment the guide lists as XSY's contents.

The 2027 A3 has one trim. The public feeds list it with each of its two exterior packages under one model code, 8YVCUY, and the catalog id's extension names the package:

Catalog idPublic nameOrdering identity
8YVCUY0PPS_2027TFSI® quattro® Black optic plus S tronic®8YVBUY with PPS (Black optic plus package)
8YVCUY0PQX_2027TFSI® quattro® S line plus S tronic®8YVBUY with PQX (S line plus package)

The 2027 order guide lists 8YVBUY and both packages on page 5 of its 2026-09-08 and 2026-10-05 editions. The same three facts show that each id is 8YVBUY with its package:

  • 8YVCUY differs from 8YVBUY only in the body-style character.
  • The carline feed's prices agree with the guide's: 40,700 + 2,100 = 42,800 with PPS, and 40,700 + 3,000 = 43,700 with PQX.
  • The equipment that each id's catalog adds over 8YVBUY0_2027 is the equipment the guide lists as its package's contents. The PQX catalog offers only the EI interior, which the guide requires with PQX. Both catalogs offer the colors that the guide marks "req. PPS or PQX" and omit the colors it marks "n/a with PQX or PPS".

Keeping such a code as a model would create a model the ordering system does not have, and would lose the package's take rate on its model. PUBLIC_MODEL_CODE_ALIASES in ai_public_api.audi.common maps each public variant to its ordering identity. A variant is a model code with its catalog id's extensions, so 8YVCUY with PPS and 8YVCUY with PQX map to different packages. The OneGraph extractors apply the map at ingestion:

  • The carline feed's aliased variants produce no model row.
  • A 8YMCUY vehicle becomes a 8YMBUY vehicle whose feature refs gain WPS and XSY. Its trim code places it on Premium Plus, and the package is one of its features. Its model_catalog_id keeps the code the feed listed. A 8YVCUY vehicle becomes a 8YVBUY vehicle with its package among its refs in the same way.

The raw catalog fetch still requests each aliased id from the carline structure, because its catalog has the package's public contents. enriched/catalog_features assigns those rows to the ordering identity's model and trim:

  • A row that the model's own catalog lacks, and that is standard in the aliased catalog, becomes content of the package.
  • An optional row that the model's own catalog lacks becomes a row of the model without a parent package.
  • The aliased catalog's row of its own package, such as PPS on 8YVCUY0PPS_2027, is the package's row, an OPTION.
  • Where two variants of one model add the same row, such as Ascari Blue (9W9W) on the 2027 A3, the row of the variant whose package code sorts first is kept.

Source coverage​

The first and last partition of each US source, and where its data comes from:

SourcePartitionsData
OneGraph inventory (raw/onegraph_stockcarsearch)2025-02-18 onBigQuery inventory-audi-en-us (gen-1 vtp) through 2026-04-21, the live feed from 2026-04-22. 2026-04-08 to 2026-04-23 hold only about 200 vehicles a day.
Models from inventory (transformed/onegraph_inventory_models)2025-02-18 to 2026-01-26Extracted from the inventory above
OneGraph carlines (raw/onegraph_carlines)2026-01-27 onBigQuery products-audi-en-us through 2026-05-13, the live feed from 2026-05-14
Catalog (raw/catalog_for_model)2026-01-27 onBigQuery products-audi-en-us through 2026-05-13, the live feed from 2026-05-14
accessaudi2026-06-29 onBigQuery accessaudi tables
Order guides2026-09-10 onAccessAudi order guide PDFs
PSS dealers (raw/pss_dealers)2026-05-14 onThe live PSS dealersByMarket fetch
Dealers from inventory (transformed/onegraph_inventory_dealers)2025-02-18 to 2026-05-13Extracted from the inventory above: the dealer code, kvps_id, name, city, region, zip and position

The models and dealers from inventory fill the days that no other source of their entity covers. When another source is backfilled over any of those days, their end_date moves back to that source's first day.

A dealership that reappears under a new dealer code and kvps_id is a new dealer. Consolidated keeps the old and new codes as two dealers.

Per-source derivation​

Sourcemodel_code / sales_model_yeartrim
OneGraph carlinesmodelId.code; year in the carline nametrim_code from its trimline; "" for the first entry of a model code in the first trimline
order guidesthe model page's code; the year on the covernone. The model row is the base trim section, and each higher trim section is a feature
catalog featuresfrom the catalog id; the year of the id's carlinecatalog_trim_code from the id
OneGraph StockCarSearchmodel.id.code; model.salesModelyearcatalog_trim_code from the id; a trim ref in enriched
accessaudi ordersgiven directlyits option codes
accessaudi product modelsgiven directlynone

Enriched tier​

The enriched assets and their components:

  • ai_audi.components.AccessAudiEnrichmentComponent: enriched/accessaudi_{models,features,inventory}
  • ai_audi.components.OneGraphModelsEnrichmentComponent: enriched/onegraph_models and enriched/onegraph_inventory_models, one row per model, its base trim's carline
  • ai_audi.components.OneGraphInventoryEnrichmentComponent: enriched/onegraph_inventory and enriched/onegraph_inventory_features
  • ai_audi.components.CatalogEnrichmentComponent: enriched/catalog_features
  • ai_audi.components.OrderGuidesEnrichmentComponent: enriched/order_guides_models

enriched/order_guides_models needs no trim resolution, because a guide's model row is the base trim section. The order guide assets page describes it.

The enriched models assets are sources of consolidated/models and read only their own transformed table. Reading consolidated/models would create a cycle, which Dagster rejects with a CircularDependencyError when the global asset job is resolved, whatever partition mapping the dependency has.

enriched/catalog_features takes each catalog id's sales model year and trim from the carline that lists the id, in the same day's transformed/onegraph_models. The catalog fetch takes its ids from that day's carlines, so the day's carlines list every id. An id that the carlines list under two years or two trims takes neither value from them. Its year then comes from inventory with that id, and its trim is the code in the id. enriched/onegraph_inventory reads the same day's carlines for each vehicle's trim, as A vehicle's trim describes. Before carline data starts, no carline lists a vehicle's id. Neither asset reads consolidated/models.

Catalog features scoped to a trim​

A catalog can also scope features to a trimline as if it were a package, with the trim code as parent_package_code. Such a row is a content row of the trim's feature:

  • A content row of any other package that lists the same code on that trim is dropped where the trim's catalog has the code as standard.
  • Where no catalog page of the model has a row for the trim itself, the enriched tier builds the trim's feature row, as it does for a package without a row of its own.

Packages without a row of their own​

A row scoped to a package means that the package exists on the model. Some catalogs have the content rows but no row for the package itself: GHAAD8 lists N1X_in_PWE but no PWE. The enriched tier creates the missing row:

  • It takes the model identity and the price of its content rows, which all have the same price.
  • It is an OPTION of subtype package.
  • Its name is the content row's packageName, or else the text after (contained in in texts.ak_headline.

Where the missing package's code is one of the model's trims, the built row is the trim's feature, of subtype trim.

Configurable catalog features​

The catalog's eqp.type is STANDARD on a trim's default code even where the buyer can choose another code of the same PR7 family. On the 2027 A6, 6H4 (black contrast roof) is STANDARD and 6H0 (body-colored roof) is an OPTION. enriched/catalog_features therefore sets is_configurable from the family:

  • A row without a parent package is configurable if its type is not STANDARD, or if its family has more than one code on the trims of its model. Choosing a trim chooses among those codes, so a trim's standard code is configurable when another trim has a different code of the family. On the 2027 Q7, the base trim's 45X (20" wheels) is configurable because the WPS trim has C9S (21" wheels). Codes inside packages count, so a standard code whose only alternative is inside a package is configurable.
  • A package's content rows take the package's value.

The value is set on each trim's rows before the trims are collapsed. A trim's content rows are configurable in the catalog and in the order guides, as the contents of any optional package are. consolidated/features takes the catalog's is_configurable from this column.

Feature names from other model years​

enriched/catalog_features sets a catalog name of only M, the PR family and the code, such as MTKV4K7 for 4K7, to null. The feature catalog section describes these names. In enriched/catalog_features and enriched/onegraph_inventory_features, a code without a name takes the name it has on the newest model year of the same model code.

Configurable inventory features​

The OneGraph inventory feature rows do not state whether a code is standard or an option. A code is configurable on a model year if the buyer can get another code of its PR7 family instead. The buyer gets the other code by choosing it or by choosing a trim that includes it.

On each partition day, enriched/onegraph_inventory_features sets is_configurable on each row:

  • It is true on a package and on a trim code (WPS, WPT). A package is a code whose class is PACKAGE on any catalog or inventory row.
  • Otherwise it is true if the code's family has more than one code on the model identity that day. The codes counted are the codes of that day's vehicles and the catalog's codes, including the codes inside the catalog's packages.
  • It is null on a code that is neither a package nor a trim code and has no family.

A code has the same family on every row that has a family. A row from a vehicle's avpCode has none, so it takes the family of any catalog or inventory row of the same code. Colors have no stated family. Every four-character code is an exterior color, and every two-character code is an interior color. The exterior colors are one family, and the interior colors are another.

The onegraph_inventory source group of consolidated/features renames the enriched is_configurable to configurable_that_day and aggregates it into is_configurable with any over the source group's history window. A code whose enriched is_configurable was false or null on every day of the window is not configurable. A row from the catalog, the order guides or AccessAudi keeps that source's is_configurable.

OneGraph vehicles​

A vehicle's feature_refs has every PR code of its avpCode as well as its features[] entries, because features[] omits some of a vehicle's codes on some days (see avpCode). transformed/onegraph_inventory_features is keyed on (model_catalog_id, sales_model_year, pr3_id). It has no trim column. It has a row for each PR code of a vehicle's avpCode that its features[] omits. That row's stock_car_field is avpCode. It has no name, family or class. When another vehicle of the same catalog id has a row with a name for the code, the transformed tiebreak keeps that row. enriched/onegraph_inventory_features keeps a row with a name in the same way across the catalog ids of one model identity.

A OneGraph vehicle lists its packages and their contents in one flat list of codes, without parents. A content code's feature row is under its package, so the foreign key alone would not match the contents. enriched/onegraph_inventory therefore also reads consolidated/features:

  • A ref without a parent package, whose code is content of exactly one package among the vehicle's own codes, takes that package as its parent. This applies even when the code also has a row of its own, because the vehicle has the code through the package. An order for the same car would also list that package.
  • A code that is content of several of the vehicle's packages keeps no parent. So does a code that the vehicle lists without any package that contains it. Both match the code's own row where the catalog has one. Examples are soft-closing doors ordered on their own, and a headliner included with an interior.

A code the catalog lists only inside packages has only its content rows in the catalog. A vehicle that has such a code without any of those packages resolves it to the code's row from enriched/onegraph_inventory_features. ai_public_api.audi.catalog builds no row without a parent package for such a code, for two reasons:

  • The catalog does not state that the code exists on the model outside a package.
  • On the Q7, AI9_in_WPT is a content row of the Prestige trim's feature. A row built from it without a parent would make AI9 an option of the model, which it is not on the Premium trim.

A vehicle's exterior ref is the four-character paint code in its avpCode: the body color, then the roof color, as in 6YA2. The catalog and the guide use the same code for the paint. A vehicle whose avpCode has no paint code gets its body color twice as its ref, 6Y6Y. The vehicle's ext_color_code is the same code. enriched/onegraph_inventory replaces such a ref with the option_code of the one exterior color row of the vehicle's identity that starts with that body color, and sets ext_color_code to that code. It searches the rows that the catalog, the order guide or accessaudi lists. When none of those rows starts with the body color, it searches the rows that only OneGraph inventory reports. An identity with no such row, or with several, keeps the doubled code.

The catalog's first day is 2026-01-27. Before that day, no paint row existed for a doubled ref to resolve to, so the doubled code became an exterior color row of its own, such as 6Y6Y beside the catalog's later 6YA2. consolidated/features keeps that row for its history window. A search over all rows at once would find two rows for each later doubled ref of that body color.

accessaudi orders​

An accessaudi order lists the orderable codes that the dealer selected, without the equipment each selection includes. A public listing has every code of the built car. enriched/accessaudi_inventory reads consolidated/features and extends the order's refs to the codes of the built car:

  • A listed package or option adds the codes of its content rows, with itself as their parent.
  • A listed interior adds the codes of its content rows without a parent.
  • The model's STANDARD rows are added without a parent.
  • A listed trim is a package, and its XPP or XPR form is written as WPS or WPT.
  • Within one PR7 family, only the codes with the highest precedence stay, because a car has one member of each family, as described in At most one member per PR family. A package's or trim's headliner takes precedence over the interior's, and the interior's over the model's standard one. A code without a family stays, whichever selection added it.

accessory_refs has the order's refs whose code is an accessory of the order's model. A code is an accessory of a model when consolidated/features has a row of that model for the code whose feature_type is ACCESSORY. accessory_refs is null on an order that has no accessory.

The asset's order_codes_match_the_public_listing check compares the result with the public listing of every order whose VIN the public feed also lists. It never blocks a downstream asset.

The check counts only the codes that the catalog, the order guides or accessaudi list for the vehicle's model in consolidated/features. A listing's avpCode has every PR code of the built car, and most of those codes have no feature in any of those sources. If the check counted those codes, every order would miss them.

The check scores the feature codes and the accessory codes separately. A code is an accessory when any of its rows from those sources has the feature_type ACCESSORY. An order lists port-installed accessories, and no public listing has them. The accessory scores therefore do not measure the extension. The check fails when the median recall of the feature codes is below the component's min_median_recall, 0.95 for audi/us.

The check's missed_by_cause metadata counts the missed feature codes and the missed accessory codes separately, each under the first cause that applies:

  • the order has another member of the code's PR family, and a car has one member of each family;
  • every row of the code from those sources is a content row of a package or trim, and the order has none of those packages or trims;
  • the order lacks the code.

Catalog revisions​

enriched/catalog_features (ai_audi.components.CatalogEnrichmentComponent) reduces catalog revisions to one row. The transformed tier keys catalog features on the id, one row per fetch. Of the revisions of one trim with the same key, only the newest catalog year, and within it the newest version, is kept, before the trims are collapsed. The catalog_revisions_agree check warns about what was dropped and does not block.

The carline partitions before 2026-05-14 were rebuilt from the same BigQuery products-audi-en-us rows as the catalog partitions of those days, so the carlines of those days also list every catalog id.

Audi sources state two model years for a model: sales_model_year, the year it is sold as, and catalog_model_year, the year in its catalog id. sales_model_year is the canonical model_year, because catalog_model_year lags it by one on a carline sold as the next model year.

A catalog feature takes its sales_model_year from the first of these that dates its catalog id:

  1. consolidated/models. Its onegraph_models rows have the year where the carline name includes it.
  2. onegraph_inventory: the earliest sales_model_year of the vehicles with that catalog id. A vehicle has its own sales model year, and where its feed has none, VIN position 10 has it.
  3. For a probed next-year id, its catalog_model_year, if consolidated/models lists that model year and no model has a catalog id for it.

If none of these sources identifies the year, it stays null. If additionally the catalog id is a probed one, its rows are dropped instead.

Consolidated​

Consolidated reads the enriched assets for every source of models and features, and the transformed assets for PSS. It merges models and features on the identity above.

Models rank the order guides first, OneGraph second and accessaudi third. The guide is the ordering system's own record of a model:

  • its name, its drivetrain and its engine;
  • what its base trim costs to order: msrp, invoice, and the destination and metallic-paint charges;
  • each higher trim's ordering code and upgrade price, on the trim's feature;
  • whether it is open for ordering (is_orderable).

Where the guide has a value, that value is kept. The merge uses coalesce, so where the guide has null, the next source's value is used. Only the carline feed has model_catalog_id, model_extensions and the carline columns. A model only the guides list has null in all of them, as does a model only accessaudi lists. The public feed updates a trim's price some weeks after a mid-year start of production, so msrp differs between the two feeds for that period. The guide's price is the price an order pays.

No carline data exists before 2026-01-27. For those days, transformed/onegraph_inventory_models has the models extracted from inventory, and it is the fourth and lowest-ranked source of models. Its last partition is 2026-01-26, the day before carline data starts.

A model row there takes the first trim code its vehicle has: the code in the vehicle's catalog id, then the code among its option codes. A vehicle with neither is the default trim. Of the carline columns, only the carline id and name are present. Consolidated keeps each source's rows for 365 days, so these rows stay in consolidated/models through 2027-01-26.

model_group_id is a hash of model_group, the carline group of a model. The carline feed has it as carline_group_id. The accessaudi and inventory feeds have only a carline name, and model_group_from_carline_name in ai_public_api.audi.common derives the group from that name.

The group is the nameplate's letter and digit. The S or RS prefix and the body style are removed, so the A3, S3 and RS 3 are all in a3. Three cases follow the carline feed's own grouping:

  • An e-tron A model is a group of its own, such as a6etron.
  • An e-tron Q model belongs to its nameplate's group, such as q4.
  • The e-tron GT is etrongt.

A nameplate that the carline feed does not list is a group of its own: a4, etron, r8 and tt. The order guides have no carline, so a model only the guides list has no group.

The carline feed can list a carline under two groups. Since 2026-07-15 it lists the MY2026 Q7 and SQ7 under q7 ("All-new Audi Q7") and again under a1 ("Audi Q7"). On the days the a1 copies list models, they are identical to the q7 copies. On the other days they list no models. parse_model_entities drops a group when another group lists an identical copy of each of its carlines and at least one more carline. The MY2026 Q7 and SQ7 are therefore only in q7. Two groups that share a carline are otherwise both kept, for example in these cases:

  • The two groups list the same carlines.
  • Each group lists a carline that the other does not.
  • One group lists all of the other's carlines and at least one more, but the two groups' copies of a carline differ.

Where a row of one group shares a key with a row of the other, the two rows differ in carline_group_id. The discrepancies check of transformed/onegraph_models then fails.

Features rank the order guides first, the catalog second, accessaudi third and the codes the vehicles list fourth. A guide row has the code an order uses, in both ordering_code and option_code. A catalog row has the public code in option_code and no ordering_code.

The ordering system and the public catalog sometimes list one feature under different codes, such as the A6 Sedan's Convenience package as XCP and PPD. ai_audi.ordering_codes lists such pairs per model line. The guide row and the accessaudi feature row arrive with the public code in option_code and the guide's code in ordering_code, and an order's ref is rewritten the same way, so both sources resolve to one row. A code that an earlier production window used under another name, such as WPD before CW 05/26 where XCP is used from then on, maps to the same public code. The two windows are then one row, with the code of the window in effect, and a vehicle built earlier resolves to it. A pair the table does not list stays two rows. A pair can apply to some model years only. On GHASE8, the ordering system writes PAH as XB1 in MY2027, but lists XB1 and PAH as separate packages in MY2025. The pair therefore applies to MY2027 only, and in MY2025 the two codes stay two rows. A seat trim's content rows come from the guide, and a package's or trim's from the guide and the catalog.

The guide can also offer one feature under several codes at once, one per interior. The MY2027 A5's guide lists the Executive package as XBL with the qualifier req. FW, XBR with req. NK and XBE with req. II, and the catalog lists it as WPS. The MY2027 S5, Q5, Q5 Sportback, SQ5 and SQ5 Sportback list their Executive packages the same way. INTERIOR_ORDERING_CODES in ai_audi.ordering_codes lists such features per model and model year, as {"WPS": {"FW": "XBL", "NK": "XBR", "II": "XBE"}}. Each code maps to the public code, and the codes become one row:

  • ordering_code is null;
  • ordering_codes_by_interior lists each code with its interior, as a seat-trim code;
  • the row's rule requires one of those interiors;
  • qualifier lists each code with the qualifier the guide prints for it.

The enriched guide assets fail where the guide disagrees with the table:

  • a listed code's row does not require its interior;
  • a trim section lists only some of a feature's codes;
  • the codes of one trim section differ in anything but their interior;
  • a rule names only some of a feature's codes, so that it holds for some interiors only. An interior's own row may name the code for that interior: the S5's OR requires XRE, and with OR the Executive package is XRE.

AccessAudi lists such a feature under the same codes, without the interiors. Its enriched row gets the same ordering_codes_by_interior and no ordering_code. An AccessAudi order lists the code for its interior, such as XBR, and its ref is rewritten to WPS like any other pair.

The table is listed per model year. Where a later year's guide offers the codes again, they stay separate features until that year is added.

The fourth source is the codes the vehicles themselves list, through enriched/onegraph_inventory_features. A stockCar's feature entry describes one build, not what the model offers. The catalog is the source for what a model offers, so a code that the catalog lists for the model without a parent package produces no row here. A code the catalog lists only inside packages does produce a row, because each of the catalog's rows for that code has a parent package. A vehicle's ref without a parent package matches only a row without one. A code from a features[] entry or a color has a name. A color also has the catalog's feature_type. A code that appears only in vehicles' avpCode has no name. The feed has no description of a feature, so description repeats the name. It has no price, no package containment and no ordering code.

Inventory matches on vin first and order_number second, and is keyed on both. OneGraph inventory has no order number, so enriched/onegraph_inventory drops a row without a VIN. A pre-production order has no VIN, so it is identified by its order number until it gets one. From then on the row matches OneGraph on the VIN, and its inventory_id changes, because the id is a hash of the first key field that has a value. Only accessaudi sets order_number. OneGraph's factory commission number is a different identifier and stays in commission_number. The second match set therefore never pairs rows across the two feeds, and accessaudi's number is kept through the merge that gives the order its VIN.

Model years the carline feed does not list yet​

The catalog can publish a model code's next catalog year before the carline feed lists it. For the US, audi/us/raw/catalog_for_model therefore also requests that year (probe_next_catalog_year). It tries only the version digits a new catalog year starts at, and only from January of the calendar year before it, the earliest a catalog year is published.

enriched/catalog_features keeps such a catalog only for a model year that consolidated/models lists and no carline has a catalog id for. It drops the rest, which would resolve no model. Its rows have is_probed_catalog set, through consolidated/features, until the carline feed lists the id, since the catalog may not be final before then.