Dataset Viewer
Auto-converted to Parquet Duplicate
rule_1_product_has_one_variant
dict
rule_2_variant_belongs_to_one_group
dict
rule_3_no_product_multiple_variants
dict
rule_4_variant_count
dict
rule_5_all_products_have_group
dict
rule_6_all_products_have_variant
dict
overall
dict
{ "description": "Every product has exactly one variant_id", "products": 4440, "unique_variant_ids_per_product": 1, "pass": true }
{ "description": "Every variant belongs to exactly one group_id", "variants": 4299, "unique_groups_per_variant": 1, "pass": true }
{ "description": "No product maps to multiple variant_ids", "products_with_multiple_variants": 0, "pass": true }
{ "description": "Variant count in mapping equals variant table", "mapping_variants": 4299, "table_variants": 4299, "pass": true }
{ "description": "All products have group_id", "null_group_ids": 0, "pass": true }
{ "description": "All products have variant_id", "null_variant_ids": 0, "pass": true }
{ "result": "PASS" }

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Phase 4 — Variant Assignment

Input: Phase 3 mapping (product_group_mapping.csv, 4,440 × 28) + Phase 2 output (phase2_output.parquet, 4,440 × 38) Output: product_variant_mapping.parquet (4,440 × 11)

Input Contract

  • Phase 3 product_group_mapping.csv: provides external_id, group_id, core_title
  • Phase 2 phase2_output.parquet: provides variant_attributes (JSON parsed from size)

Transformation

  • Parse variant_attributes JSON → extract size/package info
  • Build variant_key from size attributes (amount, unit, qty, count)
  • Generate variant_id via UUID5 from group_id + variant_key
  • Products with same group_id and same size → same variant
  • Products with same group_id but different sizes → different variants

Output Contract

  • product_variant_mapping.parquet: 4,440 rows × 11 columns
    • external_id: product-level identifier
    • group_id: product family identifier
    • variant_id: size/package variant identifier
    • variant_key: parsed size key

Results

  • 4,299 unique variants
  • 4,440 products mapped (100%)
  • Max 4 products per variant (size duplicates within group)
  • All validation checks PASS

Downstream Usage

Phase 4 output is used by Phase 5 (nutrition merge) and Phase 6 (scoring).

Downloads last month
30