1pipeline security_master {
2 version "1.0"
3 intent "Resolve vendor instrument records into one golden security master"
4 schedule "0 5 * * *"
5 tags ["aldgate", "reference-data", "gold", "mdm", "entity-resolution"]
6
7 source conformed from connection://aldgate_warehouse/silver.security_conformed {
8 contract {
9 columns {
10 figi : string
11 isin : string
12 cusip : string
13 sedol : string
14 ticker : string
15 registry_name : string
16 vendor_a_name : string
17 issuer_name : string
18 issuer_lei : string
19 asset_class : string
20 currency : string
21 market_sector : string
22 security_type : string
23 }
24 }
25 }
26
27 # transform master_candidate { … } (18 lines elided)
28
29 spine security_spine {
30 entity security
31 identity {
32 figi
33 isin
34 cusip
35 sedol
36 }
37 match deterministic {
38 on isin
39 on cusip, sedol
40 }
41 survivorship {
42 priority: [REGISTRY, VENDOR_A, VENDOR_B, VENDOR_C]
43 rules {
44 security_name : longest
45 issuer_name : most_frequent
46 market_sector : most_frequent
47 currency : highest_priority
48 }
49 }
50 contract on_breach quarantine
51 }
52
53 quality master_checks {
54 on master_candidate
55 assert figi is not null
56 assert security_name is not null
57 expect isin is not null
58 expect issuer_lei is not null
59 on_failure: reason
60 }
61
62 sink gold_security_master to connection://aldgate_warehouse/gold.security_master {
63 materialization: incremental
64 merge_key: [figi]
65 }
66
67 flow conformed -> master_candidate -> gold_security_master
68
69 catalog gold.security_master {
70 description "Golden security master: one resolved record per instrument, survivorship applied across four vendors"
71 domain "reference-data"
72 tier gold
73 tags ["master-data", "mdm", "security-master", "golden-record"]
74 }
75}