File size: 2,063 Bytes
1cd137c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
contract:
  name: phase2_identity
  version: 1.0.0
  description: Build a standardized product identity representation from validated product data

input:
  dataset: validated_products
  required_columns:
    - external_id
    - source_retailer
    - brand
    - title

  optional_columns:
    - barcode
    - size_amount
    - size_unit
    - description
    - ingredients_text
    - nutrition_text
    - image_url
    - price
    - currency

output:
  dataset: standardized_products
  grain: one record per retailer product
  columns:
    - external_id
    - source_retailer
    - barcode
    - brand
    - title
    - product_name
    - identity_attributes
    - variant_attributes
    - size_amount
    - size_unit

processing:
  does:
    - standardize_product_fields
    - extract_product_name
    - identify_identity_attributes
    - separate_identity_attributes_from_variant_attributes
    - normalize_units
    - preserve_source_identifiers
    - generate_deterministic_identity_representation

  does_not:
    - classify_products
    - assign_taxonomy
    - create_product_groups
    - create_product_variants
    - merge_products
    - calculate_scores
    - invent_missing_values

quality:
  critical:
    - missing_external_id
    - missing_source_retailer
    - missing_product_identity

  warnings:
    - missing_brand
    - missing_barcode
    - missing_size
    - missing_optional_identity_attributes

  ambiguous:
    - ambiguous_identity
    - ambiguous_normalization

failure_handling:
  statuses:
    PASS: continue
    WARNING: continue_and_report
    AMBIGUOUS: quarantine_for_review
    FAIL: stop

ambiguity:
  signals:
    - missing_identity_evidence
    - conflicting_identity_attributes
    - competing_identity_candidates
    - semantic_uncertainty

  resume_from: phase_2

identifiers:
  primary_key:
    - source_retailer
    - external_id

  identity_hash:
    deterministic: true
    rules_versioned: true

versioning:
  schema_version: 1.0.0
  rules_version: 1.0.0

lineage:
  source: phase1_validation
  pipeline_version: 1.0.0