run.veric.devproof · read-only
Verifier output
Reconstructed from a content-addressed share link. The same SQL + schema replayed through the in-browser WASM verifier; no data leaves your tab.
model.sqlread-only
-- order_score.sql
-- Computes a simple order score. `bonus_points` is declared VARCHAR
-- upstream (loaded from a CSV that quoted everything), and is being
-- added directly to the INTEGER `base_score`. Most engines silently
-- coerce; some ('15' + 3) produce '153' as a string.
select
o.order_id,
o.customer_id,
o.base_score + o.bonus_points as final_score -- INT + VARCHAR
from {{ ref('stg_order_scores') }} o
where o.order_status = 'completed'
order by final_score desc
schema.yml
version: 2
models:
- name: stg_order_scores
description: Per-order score components. `bonus_points` is VARCHAR (CSV legacy).
columns:
- name: order_id
data_type: bigint
tests: [unique, not_null]
- name: customer_id
data_type: bigint
- name: base_score
data_type: integer
- name: bonus_points
description: Bonus points. VARCHAR for legacy CSV-loader reasons; SHOULD be cast before arithmetic.
data_type: varchar
- name: order_status
data_type: varchar
- name: order_score
columns:
- name: order_id
data_type: bigint
- name: customer_id
data_type: bigint
- name: final_score
description: Expected INTEGER. Currently the result of INT + VARCHAR with no cast.
data_type: integer
verdictidle
Hit Verify to check your SQL.
Findings will appear here as cards.