[{"data":1,"prerenderedAt":1875},["ShallowReactive",2],{"article-alternates":3,"article-\u002Fit\u002Fdata\u002Fdbt-bigquery-modern-marketing-data-stack":13},{"i18nKey":4,"paths":5},"data-002-2026-05",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Fdata\u002Fdbt-bigquery-moderne-marketing-data-stack","\u002Fen\u002Fdata\u002Fmodern-marketing-data-stack-with-dbt-bigquery","\u002Fes\u002Fdata\u002Fdbt-bigquery-modern-data-stack-marketing","\u002Ffr\u002Fdata\u002Fdbt-bigquery-modern-marketing-data-stack","\u002Fit\u002Fdata\u002Fdbt-bigquery-modern-marketing-data-stack","\u002Fru\u002Fdata\u002Fdbt-bigquery-sovremennyi-stack-marketingovyh-dannyh","\u002Ftr\u002Fdata\u002Fdbt-bigquery-ile-modern-pazarlama-data-stack",{"_path":10,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":1869,"_id":1870,"_source":1871,"_file":1872,"_stem":1873,"_extension":1874},"data",false,"","dbt + BigQuery: il Modern Stack di Analytics per il Marketing","Source mapping, modeling layer, semantic layer, exposures — un'architettura a quattro livelli che connette i dati di marketing al decision-making.","2026-05-10",[21,22,23,24,25],"dbt","bigquery","data-modeling","semantic-layer","marketing-analytics",9,"Roibase",{"type":29,"children":30,"toc":1861},"root",[31,39,46,60,81,391,397,426,461,1199,1205,1241,1265,1553,1559,1586,1591,1696,1702,1707,1755,1818,1824,1829,1850,1855],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","I team di marketing hanno accesso a più dati che mai, eppure le decisioni rimangono basate su ipotesi. Report assemblati su fogli di calcolo, metriche che cambiano da una dashboard all'altra, tre risposte diverse alla domanda \"qual è il vero CAC?\". Il problema non è la scarsità di dati — è la perdita lungo il percorso dalla fonte all'insight. L'architettura dbt + BigQuery elimina questa perdita: con lo source mapping raccogli i dati grezzi, con il modeling layer li trasformi in logica aziendale, con il semantic layer crei un linguaggio comune per il team, e con gli exposures li rendi disponibili in produzione.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"source-mapping-dai-dati-grezzi-alla-fonte-affidabile",[44],{"type":37,"value":45},"Source Mapping: dai Dati Grezzi alla Fonte Affidabile",{"type":32,"tag":33,"props":47,"children":48},{},[49,51,58],{"type":37,"value":50},"Lo source mapping è il primo strato di dbt — la trasformazione iniziale dopo aver importato i dati di marketing in BigQuery. Gli event grezzi provenienti da Google Ads API, Meta Ads, Shopify vengono standardizzati nel livello staging. Nel modello ",{"type":32,"tag":52,"props":53,"children":55},"code",{"className":54},[],[56],{"type":37,"value":57},"stg_google_ads__campaign_performance",{"type":37,"value":59}," ci sono 127 colonne, ma ne usi 12. Lo source mapping seleziona queste 12, converte i timestamp in UTC, trasforma il campaign_id in stringa, gestisce i null e crea una tabella pulita.",{"type":32,"tag":33,"props":61,"children":62},{},[63,65,71,73,79],{"type":37,"value":64},"In BigQuery, le sorgenti si definiscono nel file ",{"type":32,"tag":52,"props":66,"children":68},{"className":67},[],[69],{"type":37,"value":70},"sources.yml",{"type":37,"value":72},". Qui configuri i freshness check — se i dati da Google Ads non arrivano entro 2 ore, la dbt run fallisce. È un contratto imposto: il data pipeline diventa affidabile. Invece di scrivere select diretto dalla raw table, usi la macro ",{"type":32,"tag":52,"props":74,"children":76},{"className":75},[],[77],{"type":37,"value":78},"{{ source('google_ads', 'campaign_stats') }}",{"type":37,"value":80}," — nel grafo di lineage dbt mostri quale raw table alimenta quale modello.",{"type":32,"tag":82,"props":83,"children":87},"pre",{"className":84,"code":85,"language":86,"meta":16,"style":16},"language-yaml shiki shiki-themes github-dark","sources:\n  - name: google_ads\n    database: production\n    schema: raw_google_ads\n    tables:\n      - name: campaign_stats\n        freshness:\n          warn_after: {count: 2, period: hour}\n          error_after: {count: 6, period: hour}\n        columns:\n          - name: campaign_id\n            tests:\n              - not_null\n              - unique\n","yaml",[88],{"type":32,"tag":52,"props":89,"children":90},{"__ignoreMap":16},[91,109,134,152,170,183,205,218,271,316,329,351,364,378],{"type":32,"tag":92,"props":93,"children":96},"span",{"class":94,"line":95},"line",1,[97,103],{"type":32,"tag":92,"props":98,"children":100},{"style":99},"--shiki-default:#85E89D",[101],{"type":37,"value":102},"sources",{"type":32,"tag":92,"props":104,"children":106},{"style":105},"--shiki-default:#E1E4E8",[107],{"type":37,"value":108},":\n",{"type":32,"tag":92,"props":110,"children":112},{"class":94,"line":111},2,[113,118,123,128],{"type":32,"tag":92,"props":114,"children":115},{"style":105},[116],{"type":37,"value":117},"  - ",{"type":32,"tag":92,"props":119,"children":120},{"style":99},[121],{"type":37,"value":122},"name",{"type":32,"tag":92,"props":124,"children":125},{"style":105},[126],{"type":37,"value":127},": ",{"type":32,"tag":92,"props":129,"children":131},{"style":130},"--shiki-default:#9ECBFF",[132],{"type":37,"value":133},"google_ads\n",{"type":32,"tag":92,"props":135,"children":137},{"class":94,"line":136},3,[138,143,147],{"type":32,"tag":92,"props":139,"children":140},{"style":99},[141],{"type":37,"value":142},"    database",{"type":32,"tag":92,"props":144,"children":145},{"style":105},[146],{"type":37,"value":127},{"type":32,"tag":92,"props":148,"children":149},{"style":130},[150],{"type":37,"value":151},"production\n",{"type":32,"tag":92,"props":153,"children":155},{"class":94,"line":154},4,[156,161,165],{"type":32,"tag":92,"props":157,"children":158},{"style":99},[159],{"type":37,"value":160},"    schema",{"type":32,"tag":92,"props":162,"children":163},{"style":105},[164],{"type":37,"value":127},{"type":32,"tag":92,"props":166,"children":167},{"style":130},[168],{"type":37,"value":169},"raw_google_ads\n",{"type":32,"tag":92,"props":171,"children":173},{"class":94,"line":172},5,[174,179],{"type":32,"tag":92,"props":175,"children":176},{"style":99},[177],{"type":37,"value":178},"    tables",{"type":32,"tag":92,"props":180,"children":181},{"style":105},[182],{"type":37,"value":108},{"type":32,"tag":92,"props":184,"children":186},{"class":94,"line":185},6,[187,192,196,200],{"type":32,"tag":92,"props":188,"children":189},{"style":105},[190],{"type":37,"value":191},"      - ",{"type":32,"tag":92,"props":193,"children":194},{"style":99},[195],{"type":37,"value":122},{"type":32,"tag":92,"props":197,"children":198},{"style":105},[199],{"type":37,"value":127},{"type":32,"tag":92,"props":201,"children":202},{"style":130},[203],{"type":37,"value":204},"campaign_stats\n",{"type":32,"tag":92,"props":206,"children":208},{"class":94,"line":207},7,[209,214],{"type":32,"tag":92,"props":210,"children":211},{"style":99},[212],{"type":37,"value":213},"        freshness",{"type":32,"tag":92,"props":215,"children":216},{"style":105},[217],{"type":37,"value":108},{"type":32,"tag":92,"props":219,"children":221},{"class":94,"line":220},8,[222,227,232,237,241,247,252,257,261,266],{"type":32,"tag":92,"props":223,"children":224},{"style":99},[225],{"type":37,"value":226},"          warn_after",{"type":32,"tag":92,"props":228,"children":229},{"style":105},[230],{"type":37,"value":231},": {",{"type":32,"tag":92,"props":233,"children":234},{"style":99},[235],{"type":37,"value":236},"count",{"type":32,"tag":92,"props":238,"children":239},{"style":105},[240],{"type":37,"value":127},{"type":32,"tag":92,"props":242,"children":244},{"style":243},"--shiki-default:#79B8FF",[245],{"type":37,"value":246},"2",{"type":32,"tag":92,"props":248,"children":249},{"style":105},[250],{"type":37,"value":251},", ",{"type":32,"tag":92,"props":253,"children":254},{"style":99},[255],{"type":37,"value":256},"period",{"type":32,"tag":92,"props":258,"children":259},{"style":105},[260],{"type":37,"value":127},{"type":32,"tag":92,"props":262,"children":263},{"style":130},[264],{"type":37,"value":265},"hour",{"type":32,"tag":92,"props":267,"children":268},{"style":105},[269],{"type":37,"value":270},"}\n",{"type":32,"tag":92,"props":272,"children":273},{"class":94,"line":26},[274,279,283,287,291,296,300,304,308,312],{"type":32,"tag":92,"props":275,"children":276},{"style":99},[277],{"type":37,"value":278},"          error_after",{"type":32,"tag":92,"props":280,"children":281},{"style":105},[282],{"type":37,"value":231},{"type":32,"tag":92,"props":284,"children":285},{"style":99},[286],{"type":37,"value":236},{"type":32,"tag":92,"props":288,"children":289},{"style":105},[290],{"type":37,"value":127},{"type":32,"tag":92,"props":292,"children":293},{"style":243},[294],{"type":37,"value":295},"6",{"type":32,"tag":92,"props":297,"children":298},{"style":105},[299],{"type":37,"value":251},{"type":32,"tag":92,"props":301,"children":302},{"style":99},[303],{"type":37,"value":256},{"type":32,"tag":92,"props":305,"children":306},{"style":105},[307],{"type":37,"value":127},{"type":32,"tag":92,"props":309,"children":310},{"style":130},[311],{"type":37,"value":265},{"type":32,"tag":92,"props":313,"children":314},{"style":105},[315],{"type":37,"value":270},{"type":32,"tag":92,"props":317,"children":319},{"class":94,"line":318},10,[320,325],{"type":32,"tag":92,"props":321,"children":322},{"style":99},[323],{"type":37,"value":324},"        columns",{"type":32,"tag":92,"props":326,"children":327},{"style":105},[328],{"type":37,"value":108},{"type":32,"tag":92,"props":330,"children":332},{"class":94,"line":331},11,[333,338,342,346],{"type":32,"tag":92,"props":334,"children":335},{"style":105},[336],{"type":37,"value":337},"          - ",{"type":32,"tag":92,"props":339,"children":340},{"style":99},[341],{"type":37,"value":122},{"type":32,"tag":92,"props":343,"children":344},{"style":105},[345],{"type":37,"value":127},{"type":32,"tag":92,"props":347,"children":348},{"style":130},[349],{"type":37,"value":350},"campaign_id\n",{"type":32,"tag":92,"props":352,"children":354},{"class":94,"line":353},12,[355,360],{"type":32,"tag":92,"props":356,"children":357},{"style":99},[358],{"type":37,"value":359},"            tests",{"type":32,"tag":92,"props":361,"children":362},{"style":105},[363],{"type":37,"value":108},{"type":32,"tag":92,"props":365,"children":367},{"class":94,"line":366},13,[368,373],{"type":32,"tag":92,"props":369,"children":370},{"style":105},[371],{"type":37,"value":372},"              - ",{"type":32,"tag":92,"props":374,"children":375},{"style":130},[376],{"type":37,"value":377},"not_null\n",{"type":32,"tag":92,"props":379,"children":381},{"class":94,"line":380},14,[382,386],{"type":32,"tag":92,"props":383,"children":384},{"style":105},[385],{"type":37,"value":372},{"type":32,"tag":92,"props":387,"children":388},{"style":130},[389],{"type":37,"value":390},"unique\n",{"type":32,"tag":40,"props":392,"children":394},{"id":393},"modeling-layer-trasformare-la-logica-aziendale-in-codice",[395],{"type":37,"value":396},"Modeling Layer: Trasformare la Logica Aziendale in Codice",{"type":32,"tag":33,"props":398,"children":399},{},[400,402,408,410,416,418,424],{"type":37,"value":401},"Dopo lo staging arrivano i livelli intermediate e mart — qui applichi la logica aziendale ai dati di marketing. Nel modello ",{"type":32,"tag":52,"props":403,"children":405},{"className":404},[],[406],{"type":37,"value":407},"int_campaign_attribution",{"type":37,"value":409}," calcoli l'attribuzione first-touch e last-touch. In ",{"type":32,"tag":52,"props":411,"children":413},{"className":412},[],[414],{"type":37,"value":415},"fct_customer_lifetime_value",{"type":37,"value":417}," analizzi l'LTV per cohort. Questi modelli usano la materializzazione incremental di dbt — ogni run elabora solo gli ultimi 3 giorni, i vecchi record rimangono intatti. Se la tabella ",{"type":32,"tag":52,"props":419,"children":421},{"className":420},[],[422],{"type":37,"value":423},"customer_event",{"type":37,"value":425}," in BigQuery ha 40 milioni di righe, dbt con la strategia incremental mantiene il tempo di esecuzione sotto i 2 minuti.",{"type":32,"tag":33,"props":427,"children":428},{},[429,431,437,438,444,445,451,453,459],{"type":37,"value":430},"Nel livello mart crei tabelle specializzate per ogni business unit: ",{"type":32,"tag":52,"props":432,"children":434},{"className":433},[],[435],{"type":37,"value":436},"mart_paid_media__daily_performance",{"type":37,"value":251},{"type":32,"tag":52,"props":439,"children":441},{"className":440},[],[442],{"type":37,"value":443},"mart_crm__email_engagement",{"type":37,"value":251},{"type":32,"tag":52,"props":446,"children":448},{"className":447},[],[449],{"type":37,"value":450},"mart_finance__revenue_attribution",{"type":37,"value":452},". Questi si collegano direttamente a Looker Studio, Tableau, Amplitude — ognuno estrae la metrica dal suo dominio dalla stessa fonte. Il calcolo del CAC non è più un dibattito: la formula ",{"type":32,"tag":52,"props":454,"children":456},{"className":455},[],[457],{"type":37,"value":458},"paid_media_spend \u002F new_customers",{"type":37,"value":460}," è definita nel modello dbt, passa dalla code review, è testata e versionata in Git.",{"type":32,"tag":82,"props":462,"children":466},{"className":463,"code":464,"language":465,"meta":16,"style":16},"language-sql shiki shiki-themes github-dark","-- models\u002Fmarts\u002Fpaid_media\u002Fmart_paid_media__daily_performance.sql\n{{ config(materialized='incremental', unique_key='date_campaign_id') }}\n\nwith campaign_spend as (\n  select\n    date,\n    campaign_id,\n    sum(cost_micros) \u002F 1e6 as spend\n  from {{ ref('stg_google_ads__campaign_performance') }}\n  {% if is_incremental() %}\n    where date >= date_sub(current_date(), interval 3 day)\n  {% endif %}\n  group by 1, 2\n),\n\nconversions as (\n  select\n    date(timestamp) as date,\n    campaign_id,\n    count(distinct user_id) as conversions\n  from {{ ref('stg_ga4__conversions') }}\n  {% if is_incremental() %}\n    where date(timestamp) >= date_sub(current_date(), interval 3 day)\n  {% endif %}\n  group by 1, 2\n)\n\nselect\n  c.date,\n  c.campaign_id,\n  c.spend,\n  coalesce(cv.conversions, 0) as conversions,\n  safe_divide(c.spend, nullif(cv.conversions, 0)) as cpa\nfrom campaign_spend c\nleft join conversions cv using (date, campaign_id)\n","sql",[467],{"type":32,"tag":52,"props":468,"children":469},{"__ignoreMap":16},[470,479,517,526,549,557,570,578,610,632,650,688,696,718,726,734,751,759,794,802,834,855,871,916,924,944,952,960,969,992,1013,1034,1083,1152,1166],{"type":32,"tag":92,"props":471,"children":472},{"class":94,"line":95},[473],{"type":32,"tag":92,"props":474,"children":476},{"style":475},"--shiki-default:#6A737D",[477],{"type":37,"value":478},"-- models\u002Fmarts\u002Fpaid_media\u002Fmart_paid_media__daily_performance.sql\n",{"type":32,"tag":92,"props":480,"children":481},{"class":94,"line":111},[482,487,493,498,503,507,512],{"type":32,"tag":92,"props":483,"children":484},{"style":105},[485],{"type":37,"value":486},"{{ config(materialized",{"type":32,"tag":92,"props":488,"children":490},{"style":489},"--shiki-default:#F97583",[491],{"type":37,"value":492},"=",{"type":32,"tag":92,"props":494,"children":495},{"style":130},[496],{"type":37,"value":497},"'incremental'",{"type":32,"tag":92,"props":499,"children":500},{"style":105},[501],{"type":37,"value":502},", unique_key",{"type":32,"tag":92,"props":504,"children":505},{"style":489},[506],{"type":37,"value":492},{"type":32,"tag":92,"props":508,"children":509},{"style":130},[510],{"type":37,"value":511},"'date_campaign_id'",{"type":32,"tag":92,"props":513,"children":514},{"style":105},[515],{"type":37,"value":516},") }}\n",{"type":32,"tag":92,"props":518,"children":519},{"class":94,"line":136},[520],{"type":32,"tag":92,"props":521,"children":523},{"emptyLinePlaceholder":522},true,[524],{"type":37,"value":525},"\n",{"type":32,"tag":92,"props":527,"children":528},{"class":94,"line":154},[529,534,539,544],{"type":32,"tag":92,"props":530,"children":531},{"style":489},[532],{"type":37,"value":533},"with",{"type":32,"tag":92,"props":535,"children":536},{"style":105},[537],{"type":37,"value":538}," campaign_spend ",{"type":32,"tag":92,"props":540,"children":541},{"style":489},[542],{"type":37,"value":543},"as",{"type":32,"tag":92,"props":545,"children":546},{"style":105},[547],{"type":37,"value":548}," (\n",{"type":32,"tag":92,"props":550,"children":551},{"class":94,"line":172},[552],{"type":32,"tag":92,"props":553,"children":554},{"style":489},[555],{"type":37,"value":556},"  select\n",{"type":32,"tag":92,"props":558,"children":559},{"class":94,"line":185},[560,565],{"type":32,"tag":92,"props":561,"children":562},{"style":489},[563],{"type":37,"value":564},"    date",{"type":32,"tag":92,"props":566,"children":567},{"style":105},[568],{"type":37,"value":569},",\n",{"type":32,"tag":92,"props":571,"children":572},{"class":94,"line":207},[573],{"type":32,"tag":92,"props":574,"children":575},{"style":105},[576],{"type":37,"value":577},"    campaign_id,\n",{"type":32,"tag":92,"props":579,"children":580},{"class":94,"line":220},[581,586,591,596,601,605],{"type":32,"tag":92,"props":582,"children":583},{"style":243},[584],{"type":37,"value":585},"    sum",{"type":32,"tag":92,"props":587,"children":588},{"style":105},[589],{"type":37,"value":590},"(cost_micros) ",{"type":32,"tag":92,"props":592,"children":593},{"style":489},[594],{"type":37,"value":595},"\u002F",{"type":32,"tag":92,"props":597,"children":598},{"style":105},[599],{"type":37,"value":600}," 1e6 ",{"type":32,"tag":92,"props":602,"children":603},{"style":489},[604],{"type":37,"value":543},{"type":32,"tag":92,"props":606,"children":607},{"style":105},[608],{"type":37,"value":609}," spend\n",{"type":32,"tag":92,"props":611,"children":612},{"class":94,"line":26},[613,618,623,628],{"type":32,"tag":92,"props":614,"children":615},{"style":489},[616],{"type":37,"value":617},"  from",{"type":32,"tag":92,"props":619,"children":620},{"style":105},[621],{"type":37,"value":622}," {{ ref(",{"type":32,"tag":92,"props":624,"children":625},{"style":130},[626],{"type":37,"value":627},"'stg_google_ads__campaign_performance'",{"type":32,"tag":92,"props":629,"children":630},{"style":105},[631],{"type":37,"value":516},{"type":32,"tag":92,"props":633,"children":634},{"class":94,"line":318},[635,640,645],{"type":32,"tag":92,"props":636,"children":637},{"style":105},[638],{"type":37,"value":639},"  {% ",{"type":32,"tag":92,"props":641,"children":642},{"style":489},[643],{"type":37,"value":644},"if",{"type":32,"tag":92,"props":646,"children":647},{"style":105},[648],{"type":37,"value":649}," is_incremental() %}\n",{"type":32,"tag":92,"props":651,"children":652},{"class":94,"line":331},[653,658,663,668,673,678,683],{"type":32,"tag":92,"props":654,"children":655},{"style":489},[656],{"type":37,"value":657},"    where",{"type":32,"tag":92,"props":659,"children":660},{"style":489},[661],{"type":37,"value":662}," date",{"type":32,"tag":92,"props":664,"children":665},{"style":489},[666],{"type":37,"value":667}," >=",{"type":32,"tag":92,"props":669,"children":670},{"style":105},[671],{"type":37,"value":672}," date_sub(current_date(), interval ",{"type":32,"tag":92,"props":674,"children":675},{"style":243},[676],{"type":37,"value":677},"3",{"type":32,"tag":92,"props":679,"children":680},{"style":489},[681],{"type":37,"value":682}," day",{"type":32,"tag":92,"props":684,"children":685},{"style":105},[686],{"type":37,"value":687},")\n",{"type":32,"tag":92,"props":689,"children":690},{"class":94,"line":353},[691],{"type":32,"tag":92,"props":692,"children":693},{"style":105},[694],{"type":37,"value":695},"  {% endif %}\n",{"type":32,"tag":92,"props":697,"children":698},{"class":94,"line":366},[699,704,709,713],{"type":32,"tag":92,"props":700,"children":701},{"style":489},[702],{"type":37,"value":703},"  group by",{"type":32,"tag":92,"props":705,"children":706},{"style":243},[707],{"type":37,"value":708}," 1",{"type":32,"tag":92,"props":710,"children":711},{"style":105},[712],{"type":37,"value":251},{"type":32,"tag":92,"props":714,"children":715},{"style":243},[716],{"type":37,"value":717},"2\n",{"type":32,"tag":92,"props":719,"children":720},{"class":94,"line":380},[721],{"type":32,"tag":92,"props":722,"children":723},{"style":105},[724],{"type":37,"value":725},"),\n",{"type":32,"tag":92,"props":727,"children":729},{"class":94,"line":728},15,[730],{"type":32,"tag":92,"props":731,"children":732},{"emptyLinePlaceholder":522},[733],{"type":37,"value":525},{"type":32,"tag":92,"props":735,"children":737},{"class":94,"line":736},16,[738,743,747],{"type":32,"tag":92,"props":739,"children":740},{"style":105},[741],{"type":37,"value":742},"conversions ",{"type":32,"tag":92,"props":744,"children":745},{"style":489},[746],{"type":37,"value":543},{"type":32,"tag":92,"props":748,"children":749},{"style":105},[750],{"type":37,"value":548},{"type":32,"tag":92,"props":752,"children":754},{"class":94,"line":753},17,[755],{"type":32,"tag":92,"props":756,"children":757},{"style":489},[758],{"type":37,"value":556},{"type":32,"tag":92,"props":760,"children":762},{"class":94,"line":761},18,[763,767,772,777,782,786,790],{"type":32,"tag":92,"props":764,"children":765},{"style":489},[766],{"type":37,"value":564},{"type":32,"tag":92,"props":768,"children":769},{"style":105},[770],{"type":37,"value":771},"(",{"type":32,"tag":92,"props":773,"children":774},{"style":489},[775],{"type":37,"value":776},"timestamp",{"type":32,"tag":92,"props":778,"children":779},{"style":105},[780],{"type":37,"value":781},") ",{"type":32,"tag":92,"props":783,"children":784},{"style":489},[785],{"type":37,"value":543},{"type":32,"tag":92,"props":787,"children":788},{"style":489},[789],{"type":37,"value":662},{"type":32,"tag":92,"props":791,"children":792},{"style":105},[793],{"type":37,"value":569},{"type":32,"tag":92,"props":795,"children":797},{"class":94,"line":796},19,[798],{"type":32,"tag":92,"props":799,"children":800},{"style":105},[801],{"type":37,"value":577},{"type":32,"tag":92,"props":803,"children":805},{"class":94,"line":804},20,[806,811,815,820,825,829],{"type":32,"tag":92,"props":807,"children":808},{"style":243},[809],{"type":37,"value":810},"    count",{"type":32,"tag":92,"props":812,"children":813},{"style":105},[814],{"type":37,"value":771},{"type":32,"tag":92,"props":816,"children":817},{"style":489},[818],{"type":37,"value":819},"distinct",{"type":32,"tag":92,"props":821,"children":822},{"style":105},[823],{"type":37,"value":824}," user_id) ",{"type":32,"tag":92,"props":826,"children":827},{"style":489},[828],{"type":37,"value":543},{"type":32,"tag":92,"props":830,"children":831},{"style":105},[832],{"type":37,"value":833}," conversions\n",{"type":32,"tag":92,"props":835,"children":837},{"class":94,"line":836},21,[838,842,846,851],{"type":32,"tag":92,"props":839,"children":840},{"style":489},[841],{"type":37,"value":617},{"type":32,"tag":92,"props":843,"children":844},{"style":105},[845],{"type":37,"value":622},{"type":32,"tag":92,"props":847,"children":848},{"style":130},[849],{"type":37,"value":850},"'stg_ga4__conversions'",{"type":32,"tag":92,"props":852,"children":853},{"style":105},[854],{"type":37,"value":516},{"type":32,"tag":92,"props":856,"children":858},{"class":94,"line":857},22,[859,863,867],{"type":32,"tag":92,"props":860,"children":861},{"style":105},[862],{"type":37,"value":639},{"type":32,"tag":92,"props":864,"children":865},{"style":489},[866],{"type":37,"value":644},{"type":32,"tag":92,"props":868,"children":869},{"style":105},[870],{"type":37,"value":649},{"type":32,"tag":92,"props":872,"children":874},{"class":94,"line":873},23,[875,879,883,887,891,895,900,904,908,912],{"type":32,"tag":92,"props":876,"children":877},{"style":489},[878],{"type":37,"value":657},{"type":32,"tag":92,"props":880,"children":881},{"style":489},[882],{"type":37,"value":662},{"type":32,"tag":92,"props":884,"children":885},{"style":105},[886],{"type":37,"value":771},{"type":32,"tag":92,"props":888,"children":889},{"style":489},[890],{"type":37,"value":776},{"type":32,"tag":92,"props":892,"children":893},{"style":105},[894],{"type":37,"value":781},{"type":32,"tag":92,"props":896,"children":897},{"style":489},[898],{"type":37,"value":899},">=",{"type":32,"tag":92,"props":901,"children":902},{"style":105},[903],{"type":37,"value":672},{"type":32,"tag":92,"props":905,"children":906},{"style":243},[907],{"type":37,"value":677},{"type":32,"tag":92,"props":909,"children":910},{"style":489},[911],{"type":37,"value":682},{"type":32,"tag":92,"props":913,"children":914},{"style":105},[915],{"type":37,"value":687},{"type":32,"tag":92,"props":917,"children":919},{"class":94,"line":918},24,[920],{"type":32,"tag":92,"props":921,"children":922},{"style":105},[923],{"type":37,"value":695},{"type":32,"tag":92,"props":925,"children":927},{"class":94,"line":926},25,[928,932,936,940],{"type":32,"tag":92,"props":929,"children":930},{"style":489},[931],{"type":37,"value":703},{"type":32,"tag":92,"props":933,"children":934},{"style":243},[935],{"type":37,"value":708},{"type":32,"tag":92,"props":937,"children":938},{"style":105},[939],{"type":37,"value":251},{"type":32,"tag":92,"props":941,"children":942},{"style":243},[943],{"type":37,"value":717},{"type":32,"tag":92,"props":945,"children":947},{"class":94,"line":946},26,[948],{"type":32,"tag":92,"props":949,"children":950},{"style":105},[951],{"type":37,"value":687},{"type":32,"tag":92,"props":953,"children":955},{"class":94,"line":954},27,[956],{"type":32,"tag":92,"props":957,"children":958},{"emptyLinePlaceholder":522},[959],{"type":37,"value":525},{"type":32,"tag":92,"props":961,"children":963},{"class":94,"line":962},28,[964],{"type":32,"tag":92,"props":965,"children":966},{"style":489},[967],{"type":37,"value":968},"select\n",{"type":32,"tag":92,"props":970,"children":972},{"class":94,"line":971},29,[973,978,983,988],{"type":32,"tag":92,"props":974,"children":975},{"style":243},[976],{"type":37,"value":977},"  c",{"type":32,"tag":92,"props":979,"children":980},{"style":105},[981],{"type":37,"value":982},".",{"type":32,"tag":92,"props":984,"children":985},{"style":243},[986],{"type":37,"value":987},"date",{"type":32,"tag":92,"props":989,"children":990},{"style":105},[991],{"type":37,"value":569},{"type":32,"tag":92,"props":993,"children":995},{"class":94,"line":994},30,[996,1000,1004,1009],{"type":32,"tag":92,"props":997,"children":998},{"style":243},[999],{"type":37,"value":977},{"type":32,"tag":92,"props":1001,"children":1002},{"style":105},[1003],{"type":37,"value":982},{"type":32,"tag":92,"props":1005,"children":1006},{"style":243},[1007],{"type":37,"value":1008},"campaign_id",{"type":32,"tag":92,"props":1010,"children":1011},{"style":105},[1012],{"type":37,"value":569},{"type":32,"tag":92,"props":1014,"children":1016},{"class":94,"line":1015},31,[1017,1021,1025,1030],{"type":32,"tag":92,"props":1018,"children":1019},{"style":243},[1020],{"type":37,"value":977},{"type":32,"tag":92,"props":1022,"children":1023},{"style":105},[1024],{"type":37,"value":982},{"type":32,"tag":92,"props":1026,"children":1027},{"style":243},[1028],{"type":37,"value":1029},"spend",{"type":32,"tag":92,"props":1031,"children":1032},{"style":105},[1033],{"type":37,"value":569},{"type":32,"tag":92,"props":1035,"children":1037},{"class":94,"line":1036},32,[1038,1043,1047,1052,1056,1061,1065,1070,1074,1078],{"type":32,"tag":92,"props":1039,"children":1040},{"style":243},[1041],{"type":37,"value":1042},"  coalesce",{"type":32,"tag":92,"props":1044,"children":1045},{"style":105},[1046],{"type":37,"value":771},{"type":32,"tag":92,"props":1048,"children":1049},{"style":243},[1050],{"type":37,"value":1051},"cv",{"type":32,"tag":92,"props":1053,"children":1054},{"style":105},[1055],{"type":37,"value":982},{"type":32,"tag":92,"props":1057,"children":1058},{"style":243},[1059],{"type":37,"value":1060},"conversions",{"type":32,"tag":92,"props":1062,"children":1063},{"style":105},[1064],{"type":37,"value":251},{"type":32,"tag":92,"props":1066,"children":1067},{"style":243},[1068],{"type":37,"value":1069},"0",{"type":32,"tag":92,"props":1071,"children":1072},{"style":105},[1073],{"type":37,"value":781},{"type":32,"tag":92,"props":1075,"children":1076},{"style":489},[1077],{"type":37,"value":543},{"type":32,"tag":92,"props":1079,"children":1080},{"style":105},[1081],{"type":37,"value":1082}," conversions,\n",{"type":32,"tag":92,"props":1084,"children":1086},{"class":94,"line":1085},33,[1087,1092,1097,1101,1105,1109,1114,1118,1122,1126,1130,1134,1138,1143,1147],{"type":32,"tag":92,"props":1088,"children":1089},{"style":105},[1090],{"type":37,"value":1091},"  safe_divide(",{"type":32,"tag":92,"props":1093,"children":1094},{"style":243},[1095],{"type":37,"value":1096},"c",{"type":32,"tag":92,"props":1098,"children":1099},{"style":105},[1100],{"type":37,"value":982},{"type":32,"tag":92,"props":1102,"children":1103},{"style":243},[1104],{"type":37,"value":1029},{"type":32,"tag":92,"props":1106,"children":1107},{"style":105},[1108],{"type":37,"value":251},{"type":32,"tag":92,"props":1110,"children":1111},{"style":243},[1112],{"type":37,"value":1113},"nullif",{"type":32,"tag":92,"props":1115,"children":1116},{"style":105},[1117],{"type":37,"value":771},{"type":32,"tag":92,"props":1119,"children":1120},{"style":243},[1121],{"type":37,"value":1051},{"type":32,"tag":92,"props":1123,"children":1124},{"style":105},[1125],{"type":37,"value":982},{"type":32,"tag":92,"props":1127,"children":1128},{"style":243},[1129],{"type":37,"value":1060},{"type":32,"tag":92,"props":1131,"children":1132},{"style":105},[1133],{"type":37,"value":251},{"type":32,"tag":92,"props":1135,"children":1136},{"style":243},[1137],{"type":37,"value":1069},{"type":32,"tag":92,"props":1139,"children":1140},{"style":105},[1141],{"type":37,"value":1142},")) ",{"type":32,"tag":92,"props":1144,"children":1145},{"style":489},[1146],{"type":37,"value":543},{"type":32,"tag":92,"props":1148,"children":1149},{"style":105},[1150],{"type":37,"value":1151}," cpa\n",{"type":32,"tag":92,"props":1153,"children":1155},{"class":94,"line":1154},34,[1156,1161],{"type":32,"tag":92,"props":1157,"children":1158},{"style":489},[1159],{"type":37,"value":1160},"from",{"type":32,"tag":92,"props":1162,"children":1163},{"style":105},[1164],{"type":37,"value":1165}," campaign_spend c\n",{"type":32,"tag":92,"props":1167,"children":1169},{"class":94,"line":1168},35,[1170,1175,1180,1185,1190,1194],{"type":32,"tag":92,"props":1171,"children":1172},{"style":489},[1173],{"type":37,"value":1174},"left join",{"type":32,"tag":92,"props":1176,"children":1177},{"style":105},[1178],{"type":37,"value":1179}," conversions cv ",{"type":32,"tag":92,"props":1181,"children":1182},{"style":489},[1183],{"type":37,"value":1184},"using",{"type":32,"tag":92,"props":1186,"children":1187},{"style":105},[1188],{"type":37,"value":1189}," (",{"type":32,"tag":92,"props":1191,"children":1192},{"style":489},[1193],{"type":37,"value":987},{"type":32,"tag":92,"props":1195,"children":1196},{"style":105},[1197],{"type":37,"value":1198},", campaign_id)\n",{"type":32,"tag":40,"props":1200,"children":1202},{"id":1201},"semantic-layer-creare-un-linguaggio-comune",[1203],{"type":37,"value":1204},"Semantic Layer: Creare un Linguaggio Comune",{"type":32,"tag":33,"props":1206,"children":1207},{},[1208,1210,1216,1218,1224,1226,1232,1234,1239],{"type":37,"value":1209},"Il semantic layer è una feature introdotta in dbt 1.6 — le metriche le definisci come codice e ogni strumento le utilizza. La metrica ",{"type":32,"tag":52,"props":1211,"children":1213},{"className":1212},[],[1214],{"type":37,"value":1215},"revenue",{"type":37,"value":1217}," non è ",{"type":32,"tag":52,"props":1219,"children":1221},{"className":1220},[],[1222],{"type":37,"value":1223},"sum(order_total)",{"type":37,"value":1225},", ma ",{"type":32,"tag":52,"props":1227,"children":1229},{"className":1228},[],[1230],{"type":37,"value":1231},"sum(case when payment_status = 'completed' then order_total end)",{"type":37,"value":1233},". Scompare la domanda \"gli ordini annullati sono inclusi?\". La definizione della metrica è su GitHub. Marketing, finance e product usano la stessa metrica ",{"type":32,"tag":52,"props":1235,"children":1237},{"className":1236},[],[1238],{"type":37,"value":1215},{"type":37,"value":1240}," — solo con dimensioni diverse.",{"type":32,"tag":33,"props":1242,"children":1243},{},[1244,1246,1255,1257,1263],{"type":37,"value":1245},"Nel lavoro di Roibase sulla ",{"type":32,"tag":1247,"props":1248,"children":1252},"a",{"href":1249,"rel":1250},"https:\u002F\u002Fwww.roibase.com.tr\u002Fit\u002Ffirstparty",[1251],"nofollow",[1253],{"type":37,"value":1254},"strategia di dati first-party e misurazione",{"type":37,"value":1256}," il semantic layer è un passaggio obbligatorio. Quando unisci customer event da diversi touch point, senza definizioni di metriche standardizzate ogni analisi dà risultati diversi. In dbt il file ",{"type":32,"tag":52,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":37,"value":1262},"metrics.yml",{"type":37,"value":1264}," definisce le metriche, che vengono esposte ai BI tool via API — Looker, Hex, Mode leggono dal semantic layer, il numero appare uguale ovunque.",{"type":32,"tag":82,"props":1266,"children":1268},{"className":84,"code":1267,"language":86,"meta":16,"style":16},"# models\u002Fmetrics\u002Fmetrics.yml\nmetrics:\n  - name: marketing_qualified_leads\n    label: Marketing Qualified Leads\n    model: ref('fct_leads')\n    calculation_method: count_distinct\n    expression: lead_id\n    timestamp: created_at\n    time_grains: [day, week, month]\n    dimensions:\n      - utm_source\n      - utm_campaign\n      - landing_page\n    filters:\n      - field: lead_status\n        operator: '='\n        value: \"'MQL'\"\n",[1269],{"type":32,"tag":52,"props":1270,"children":1271},{"__ignoreMap":16},[1272,1280,1292,1312,1329,1346,1363,1380,1397,1438,1450,1462,1474,1486,1498,1519,1536],{"type":32,"tag":92,"props":1273,"children":1274},{"class":94,"line":95},[1275],{"type":32,"tag":92,"props":1276,"children":1277},{"style":475},[1278],{"type":37,"value":1279},"# models\u002Fmetrics\u002Fmetrics.yml\n",{"type":32,"tag":92,"props":1281,"children":1282},{"class":94,"line":111},[1283,1288],{"type":32,"tag":92,"props":1284,"children":1285},{"style":99},[1286],{"type":37,"value":1287},"metrics",{"type":32,"tag":92,"props":1289,"children":1290},{"style":105},[1291],{"type":37,"value":108},{"type":32,"tag":92,"props":1293,"children":1294},{"class":94,"line":136},[1295,1299,1303,1307],{"type":32,"tag":92,"props":1296,"children":1297},{"style":105},[1298],{"type":37,"value":117},{"type":32,"tag":92,"props":1300,"children":1301},{"style":99},[1302],{"type":37,"value":122},{"type":32,"tag":92,"props":1304,"children":1305},{"style":105},[1306],{"type":37,"value":127},{"type":32,"tag":92,"props":1308,"children":1309},{"style":130},[1310],{"type":37,"value":1311},"marketing_qualified_leads\n",{"type":32,"tag":92,"props":1313,"children":1314},{"class":94,"line":154},[1315,1320,1324],{"type":32,"tag":92,"props":1316,"children":1317},{"style":99},[1318],{"type":37,"value":1319},"    label",{"type":32,"tag":92,"props":1321,"children":1322},{"style":105},[1323],{"type":37,"value":127},{"type":32,"tag":92,"props":1325,"children":1326},{"style":130},[1327],{"type":37,"value":1328},"Marketing Qualified Leads\n",{"type":32,"tag":92,"props":1330,"children":1331},{"class":94,"line":172},[1332,1337,1341],{"type":32,"tag":92,"props":1333,"children":1334},{"style":99},[1335],{"type":37,"value":1336},"    model",{"type":32,"tag":92,"props":1338,"children":1339},{"style":105},[1340],{"type":37,"value":127},{"type":32,"tag":92,"props":1342,"children":1343},{"style":130},[1344],{"type":37,"value":1345},"ref('fct_leads')\n",{"type":32,"tag":92,"props":1347,"children":1348},{"class":94,"line":185},[1349,1354,1358],{"type":32,"tag":92,"props":1350,"children":1351},{"style":99},[1352],{"type":37,"value":1353},"    calculation_method",{"type":32,"tag":92,"props":1355,"children":1356},{"style":105},[1357],{"type":37,"value":127},{"type":32,"tag":92,"props":1359,"children":1360},{"style":130},[1361],{"type":37,"value":1362},"count_distinct\n",{"type":32,"tag":92,"props":1364,"children":1365},{"class":94,"line":207},[1366,1371,1375],{"type":32,"tag":92,"props":1367,"children":1368},{"style":99},[1369],{"type":37,"value":1370},"    expression",{"type":32,"tag":92,"props":1372,"children":1373},{"style":105},[1374],{"type":37,"value":127},{"type":32,"tag":92,"props":1376,"children":1377},{"style":130},[1378],{"type":37,"value":1379},"lead_id\n",{"type":32,"tag":92,"props":1381,"children":1382},{"class":94,"line":220},[1383,1388,1392],{"type":32,"tag":92,"props":1384,"children":1385},{"style":99},[1386],{"type":37,"value":1387},"    timestamp",{"type":32,"tag":92,"props":1389,"children":1390},{"style":105},[1391],{"type":37,"value":127},{"type":32,"tag":92,"props":1393,"children":1394},{"style":130},[1395],{"type":37,"value":1396},"created_at\n",{"type":32,"tag":92,"props":1398,"children":1399},{"class":94,"line":26},[1400,1405,1410,1415,1419,1424,1428,1433],{"type":32,"tag":92,"props":1401,"children":1402},{"style":99},[1403],{"type":37,"value":1404},"    time_grains",{"type":32,"tag":92,"props":1406,"children":1407},{"style":105},[1408],{"type":37,"value":1409},": [",{"type":32,"tag":92,"props":1411,"children":1412},{"style":130},[1413],{"type":37,"value":1414},"day",{"type":32,"tag":92,"props":1416,"children":1417},{"style":105},[1418],{"type":37,"value":251},{"type":32,"tag":92,"props":1420,"children":1421},{"style":130},[1422],{"type":37,"value":1423},"week",{"type":32,"tag":92,"props":1425,"children":1426},{"style":105},[1427],{"type":37,"value":251},{"type":32,"tag":92,"props":1429,"children":1430},{"style":130},[1431],{"type":37,"value":1432},"month",{"type":32,"tag":92,"props":1434,"children":1435},{"style":105},[1436],{"type":37,"value":1437},"]\n",{"type":32,"tag":92,"props":1439,"children":1440},{"class":94,"line":318},[1441,1446],{"type":32,"tag":92,"props":1442,"children":1443},{"style":99},[1444],{"type":37,"value":1445},"    dimensions",{"type":32,"tag":92,"props":1447,"children":1448},{"style":105},[1449],{"type":37,"value":108},{"type":32,"tag":92,"props":1451,"children":1452},{"class":94,"line":331},[1453,1457],{"type":32,"tag":92,"props":1454,"children":1455},{"style":105},[1456],{"type":37,"value":191},{"type":32,"tag":92,"props":1458,"children":1459},{"style":130},[1460],{"type":37,"value":1461},"utm_source\n",{"type":32,"tag":92,"props":1463,"children":1464},{"class":94,"line":353},[1465,1469],{"type":32,"tag":92,"props":1466,"children":1467},{"style":105},[1468],{"type":37,"value":191},{"type":32,"tag":92,"props":1470,"children":1471},{"style":130},[1472],{"type":37,"value":1473},"utm_campaign\n",{"type":32,"tag":92,"props":1475,"children":1476},{"class":94,"line":366},[1477,1481],{"type":32,"tag":92,"props":1478,"children":1479},{"style":105},[1480],{"type":37,"value":191},{"type":32,"tag":92,"props":1482,"children":1483},{"style":130},[1484],{"type":37,"value":1485},"landing_page\n",{"type":32,"tag":92,"props":1487,"children":1488},{"class":94,"line":380},[1489,1494],{"type":32,"tag":92,"props":1490,"children":1491},{"style":99},[1492],{"type":37,"value":1493},"    filters",{"type":32,"tag":92,"props":1495,"children":1496},{"style":105},[1497],{"type":37,"value":108},{"type":32,"tag":92,"props":1499,"children":1500},{"class":94,"line":728},[1501,1505,1510,1514],{"type":32,"tag":92,"props":1502,"children":1503},{"style":105},[1504],{"type":37,"value":191},{"type":32,"tag":92,"props":1506,"children":1507},{"style":99},[1508],{"type":37,"value":1509},"field",{"type":32,"tag":92,"props":1511,"children":1512},{"style":105},[1513],{"type":37,"value":127},{"type":32,"tag":92,"props":1515,"children":1516},{"style":130},[1517],{"type":37,"value":1518},"lead_status\n",{"type":32,"tag":92,"props":1520,"children":1521},{"class":94,"line":736},[1522,1527,1531],{"type":32,"tag":92,"props":1523,"children":1524},{"style":99},[1525],{"type":37,"value":1526},"        operator",{"type":32,"tag":92,"props":1528,"children":1529},{"style":105},[1530],{"type":37,"value":127},{"type":32,"tag":92,"props":1532,"children":1533},{"style":130},[1534],{"type":37,"value":1535},"'='\n",{"type":32,"tag":92,"props":1537,"children":1538},{"class":94,"line":753},[1539,1544,1548],{"type":32,"tag":92,"props":1540,"children":1541},{"style":99},[1542],{"type":37,"value":1543},"        value",{"type":32,"tag":92,"props":1545,"children":1546},{"style":105},[1547],{"type":37,"value":127},{"type":32,"tag":92,"props":1549,"children":1550},{"style":130},[1551],{"type":37,"value":1552},"\"'MQL'\"\n",{"type":32,"tag":40,"props":1554,"children":1556},{"id":1555},"exposures-mettere-in-produzione",[1557],{"type":37,"value":1558},"Exposures: Mettere in Produzione",{"type":32,"tag":33,"props":1560,"children":1561},{},[1562,1564,1569,1571,1577,1579,1584],{"type":37,"value":1563},"Gli exposures traccia il dipendente downstream — definisci quale dashboard alimenta quale modello dbt. Hai una dashboard Looker \"Weekly Campaign Performance\" che estrae dati da ",{"type":32,"tag":52,"props":1565,"children":1567},{"className":1566},[],[1568],{"type":37,"value":436},{"type":37,"value":1570},". Nel file ",{"type":32,"tag":52,"props":1572,"children":1574},{"className":1573},[],[1575],{"type":37,"value":1576},"exposures.yml",{"type":37,"value":1578}," registri questa dipendenza. Ora, se apportiamo una breaking change a ",{"type":32,"tag":52,"props":1580,"children":1582},{"className":1581},[],[1583],{"type":37,"value":436},{"type":37,"value":1585},", dbt ti avverte: \"Questo modello alimenta 3 dashboard, fai un impact analysis.\"",{"type":32,"tag":33,"props":1587,"children":1588},{},[1589],{"type":37,"value":1590},"Gli exposures appaiono anche nella documentazione — nei dbt docs, quando clicchi su un modello, vedi \"Used in 5 dashboards, 2 reverse ETL jobs, 1 ML pipeline\". La lineage si estende fino al livello BI. Sai esattamente quale dashboard viene da quale SQL. Il tempo di debug scende perché individuate il dashboard problematico e risalite al modello sorgente.",{"type":32,"tag":1592,"props":1593,"children":1594},"table",{},[1595,1619],{"type":32,"tag":1596,"props":1597,"children":1598},"thead",{},[1599],{"type":32,"tag":1600,"props":1601,"children":1602},"tr",{},[1603,1609,1614],{"type":32,"tag":1604,"props":1605,"children":1606},"th",{},[1607],{"type":37,"value":1608},"Tipo di Exposure",{"type":32,"tag":1604,"props":1610,"children":1611},{},[1612],{"type":37,"value":1613},"Utilizzo",{"type":32,"tag":1604,"props":1615,"children":1616},{},[1617],{"type":37,"value":1618},"Metodo di Tracciamento",{"type":32,"tag":1620,"props":1621,"children":1622},"tbody",{},[1623,1642,1660,1678],{"type":32,"tag":1600,"props":1624,"children":1625},{},[1626,1632,1637],{"type":32,"tag":1627,"props":1628,"children":1629},"td",{},[1630],{"type":37,"value":1631},"Dashboard",{"type":32,"tag":1627,"props":1633,"children":1634},{},[1635],{"type":37,"value":1636},"Looker, Tableau, Metabase",{"type":32,"tag":1627,"props":1638,"children":1639},{},[1640],{"type":37,"value":1641},"URL + model ref",{"type":32,"tag":1600,"props":1643,"children":1644},{},[1645,1650,1655],{"type":32,"tag":1627,"props":1646,"children":1647},{},[1648],{"type":37,"value":1649},"Reverse ETL",{"type":32,"tag":1627,"props":1651,"children":1652},{},[1653],{"type":37,"value":1654},"Census, Hightouch",{"type":32,"tag":1627,"props":1656,"children":1657},{},[1658],{"type":37,"value":1659},"Job ID + source table",{"type":32,"tag":1600,"props":1661,"children":1662},{},[1663,1668,1673],{"type":32,"tag":1627,"props":1664,"children":1665},{},[1666],{"type":37,"value":1667},"ML Pipeline",{"type":32,"tag":1627,"props":1669,"children":1670},{},[1671],{"type":37,"value":1672},"Vertex AI, SageMaker",{"type":32,"tag":1627,"props":1674,"children":1675},{},[1676],{"type":37,"value":1677},"Model name + feature table",{"type":32,"tag":1600,"props":1679,"children":1680},{},[1681,1686,1691],{"type":32,"tag":1627,"props":1682,"children":1683},{},[1684],{"type":37,"value":1685},"Operational Tool",{"type":32,"tag":1627,"props":1687,"children":1688},{},[1689],{"type":37,"value":1690},"Braze, Iterable segmentation",{"type":32,"tag":1627,"props":1692,"children":1693},{},[1694],{"type":37,"value":1695},"Segment ID + dbt model",{"type":32,"tag":40,"props":1697,"children":1699},{"id":1698},"pipeline-orchestration-il-ritmo-di-ogni-livello",[1700],{"type":37,"value":1701},"Pipeline Orchestration: il Ritmo di Ogni Livello",{"type":32,"tag":33,"props":1703,"children":1704},{},[1705],{"type":37,"value":1706},"Orchestri il pipeline con dbt Cloud Scheduler o Airflow. Alle 6:00 del mattino i dati grezzi vengono caricati in BigQuery (Fivetran, Stitch, Airbyte), alle 6:30 parte dbt run. I modelli staging completano in 5 minuti, gli intermediate in 10, i mart in 15. Alle 7:00 il semantic layer è esposto, alle 7:15 le dashboard Looker si aggiornano. Quando il team arriva in ufficio alle 9:00 ha già i dati di ieri — niente delay di 3 ore.",{"type":32,"tag":33,"props":1708,"children":1709},{},[1710,1712,1718,1719,1725,1726,1732,1733,1739,1741,1746,1748,1753],{"type":37,"value":1711},"Ogni run esegue la test suite: ",{"type":32,"tag":52,"props":1713,"children":1715},{"className":1714},[],[1716],{"type":37,"value":1717},"not_null",{"type":37,"value":251},{"type":32,"tag":52,"props":1720,"children":1722},{"className":1721},[],[1723],{"type":37,"value":1724},"unique",{"type":37,"value":251},{"type":32,"tag":52,"props":1727,"children":1729},{"className":1728},[],[1730],{"type":37,"value":1731},"accepted_values",{"type":37,"value":251},{"type":32,"tag":52,"props":1734,"children":1736},{"className":1735},[],[1737],{"type":37,"value":1738},"relationships",{"type":37,"value":1740},". Se in ",{"type":32,"tag":52,"props":1742,"children":1744},{"className":1743},[],[1745],{"type":37,"value":57},{"type":37,"value":1747}," il ",{"type":32,"tag":52,"props":1749,"children":1751},{"className":1750},[],[1752],{"type":37,"value":1008},{"type":37,"value":1754}," non è unico, dbt run fallisce. Un alert arriva su Slack. Il gate di qualità dei dati è enforcement a livello di codice. I dati rotti non raggiungono la produzione.",{"type":32,"tag":82,"props":1756,"children":1758},{"className":84,"code":1757,"language":86,"meta":16,"style":16},"# dbt_project.yml on-run-end hooks\non-run-end:\n  - \"{{ log_dbt_results() }}\"\n  - \"{{ send_slack_notification() }}\"\n  - \"{{ update_looker_cache() }}\"\n",[1759],{"type":32,"tag":52,"props":1760,"children":1761},{"__ignoreMap":16},[1762,1770,1782,1794,1806],{"type":32,"tag":92,"props":1763,"children":1764},{"class":94,"line":95},[1765],{"type":32,"tag":92,"props":1766,"children":1767},{"style":475},[1768],{"type":37,"value":1769},"# dbt_project.yml on-run-end hooks\n",{"type":32,"tag":92,"props":1771,"children":1772},{"class":94,"line":111},[1773,1778],{"type":32,"tag":92,"props":1774,"children":1775},{"style":99},[1776],{"type":37,"value":1777},"on-run-end",{"type":32,"tag":92,"props":1779,"children":1780},{"style":105},[1781],{"type":37,"value":108},{"type":32,"tag":92,"props":1783,"children":1784},{"class":94,"line":136},[1785,1789],{"type":32,"tag":92,"props":1786,"children":1787},{"style":105},[1788],{"type":37,"value":117},{"type":32,"tag":92,"props":1790,"children":1791},{"style":130},[1792],{"type":37,"value":1793},"\"{{ log_dbt_results() }}\"\n",{"type":32,"tag":92,"props":1795,"children":1796},{"class":94,"line":154},[1797,1801],{"type":32,"tag":92,"props":1798,"children":1799},{"style":105},[1800],{"type":37,"value":117},{"type":32,"tag":92,"props":1802,"children":1803},{"style":130},[1804],{"type":37,"value":1805},"\"{{ send_slack_notification() }}\"\n",{"type":32,"tag":92,"props":1807,"children":1808},{"class":94,"line":172},[1809,1813],{"type":32,"tag":92,"props":1810,"children":1811},{"style":105},[1812],{"type":37,"value":117},{"type":32,"tag":92,"props":1814,"children":1815},{"style":130},[1816],{"type":37,"value":1817},"\"{{ update_looker_cache() }}\"\n",{"type":32,"tag":40,"props":1819,"children":1821},{"id":1820},"trade-off-complessità-vs-governance",[1822],{"type":37,"value":1823},"Trade-off: Complessità vs Governance",{"type":32,"tag":33,"props":1825,"children":1826},{},[1827],{"type":37,"value":1828},"Lo stack dbt + BigQuery introduce complessità. Nel team di analyst la competenza SQL diventa obbligatoria — \"faccio un pivot in Excel\" non basta più. Git workflow, code review, CI\u002FCD pipeline sono concetti da imparare. Su team piccoli questo overhead può essere costoso. Ma il trade-off è netto: guadagni governance. Invece di formula persa in un foglio, hai codice sotto version control. \"Da dove viene questo numero?\" si risponde con Git blame in 10 secondi.",{"type":32,"tag":33,"props":1830,"children":1831},{},[1832,1834,1840,1842,1848],{"type":37,"value":1833},"Il costo di BigQuery è un altro trade-off. I full table scan sono cari — la strategia di partition e cluster è obbligatoria. Nei modelli dbt incremental, i config ",{"type":32,"tag":52,"props":1835,"children":1837},{"className":1836},[],[1838],{"type":37,"value":1839},"partition_by",{"type":37,"value":1841}," e ",{"type":32,"tag":52,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":37,"value":1847},"cluster_by",{"type":37,"value":1849}," sono critici. Una pipeline che elabora 100 GB al mese su BigQuery genera ~$50 di slot cost + $5 di storage. È un managed service, niente overhead infra, ma se non ottimizzi le query la fattura sale.",{"type":32,"tag":33,"props":1851,"children":1852},{},[1853],{"type":37,"value":1854},"Connettere i dati di marketing al decision-making non è più risolvibile con fogli di calcolo e BI tool. Lo stack dbt + BigQuery codifica ogni livello dalla fonte all'exposure. Lo source mapping rende i dati grezzi affidabili, il modeling layer applica la logica aziendale, il semantic layer crea il linguaggio comune, gli exposures li mettono in produzione. Code review, test, version control — il data pipeline è ora gestito con la disciplina dello sviluppo software.",{"type":32,"tag":1856,"props":1857,"children":1858},"style",{},[1859],{"type":37,"value":1860},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":136,"depth":136,"links":1862},[1863,1864,1865,1866,1867,1868],{"id":42,"depth":111,"text":45},{"id":393,"depth":111,"text":396},{"id":1201,"depth":111,"text":1204},{"id":1555,"depth":111,"text":1558},{"id":1698,"depth":111,"text":1701},{"id":1820,"depth":111,"text":1823},"markdown","content:it:data:dbt-bigquery-modern-marketing-data-stack.md","content","it\u002Fdata\u002Fdbt-bigquery-modern-marketing-data-stack.md","it\u002Fdata\u002Fdbt-bigquery-modern-marketing-data-stack","md",1778392983309]