File size: 2,790 Bytes
1ad1eea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# An ENTITY topic for Amazon's FBA fee estimates (one row per SKU per Amazon store per snapshot
# day). Charged fees are in ut_amzn_settlements. Amazon rows live in the connector store, not the
# DuckDB mirror, so this topic has no `store:` block and no validated measure yet.
key: amazon_fees
semantic:
  approved: [_snapshot_date, sku, asin, amazon_store, your_price, estimated_fee_total, estimated_referral_fee_per_unit, expected_fulfillment_fee_per_unit, currency]
  date_field: _snapshot_date
  scope: "Amazon's estimated fees per unit for each SKU, one snapshot per sync day. Use the latest _snapshot_date for current fees. Fees Amazon charged are in Amazon settlements."
  measure_not_yet:
    - key: estimated_fee_total
      cause: "Amazon fee estimates live in the connector store, not the semantic mirror, and no metric reconciles them yet."
      fix: "Add a fee metric in model/metrics with a validate method that ties the stored rows to the report row count, and register its validator in harness/semantic.py."
  purposes:
    _snapshot_date: "The sync day of the estimate. Use the latest one for current fees."
    estimated_fee_total: "Amazon's estimated total fee per unit."
    estimated_referral_fee_per_unit: "Amazon's estimated referral fee per unit."
    expected_fulfillment_fee_per_unit: "Amazon's expected FBA fulfillment fee per unit."
  synonyms:
    estimated_fee_total: [total fee, Amazon fee, fees]
    estimated_referral_fee_per_unit: [referral fee, commission]
    expected_fulfillment_fee_per_unit: [FBA fee, fulfillment fee, pick and pack fee]
    sku: [seller sku]
  choices: {}
label: "Amazon FBA fee estimates"
entity: amazon.fba_fee_estimate
grid: ut_amzn_fba_fee_estimates
subject: "amazon:fba_fee_estimate"
grain: "one row per SKU per Amazon store per snapshot day"
fields:
  - key: _snapshot_date
    label: "Snapshot date"
    type: date
    kind: data
  - key: sku
    label: "Sku"
    type: text
    kind: data
  - key: asin
    label: "Asin"
    type: text
    kind: data
  - key: amazon_store
    label: "Amazon store"
    type: text
    kind: data
  - key: your_price
    label: "Your price"
    type: currency
    kind: data
  - key: estimated_fee_total
    label: "Estimated fee total"
    type: currency
    kind: data
  - key: estimated_referral_fee_per_unit
    label: "Estimated referral fee per unit"
    type: currency
    kind: data
  - key: expected_fulfillment_fee_per_unit
    label: "Expected fulfillment fee per unit"
    type: currency
    kind: data
  - key: currency
    label: "Currency"
    type: text
    kind: data
ai_context: >
  Amazon's estimated fees per unit by SKU. Use the latest _snapshot_date. These are estimates, not
  charges: for fees Amazon charged, use Amazon settlements and sum the negative amount lines.