[{"data":1,"prerenderedAt":30070},["ShallowReactive",2],{"tutorial-ecommerce-pipeline":3,"content-query-BrYYTzIdnW":108,"content-query-CfBqQbZcXI":160},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"module":12,"isModuleIndex":13,"prerequisites":14,"resources":21,"author":34,"body":38,"_type":102,"_id":103,"_source":104,"_file":105,"_stem":106,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline","tutorials",false,"","Shopify Data Pipeline","Build an analytics stack for your Shopify store - pick your warehouse, payment processor, marketing platform, and more, then follow a step-by-step guide to build a full pipeline with an AI analyst.","2026-04-09","Module","ecommerce-pipeline",true,[15,16,17,18,19,20],"\u003Ca href=\"https:\u002F\u002Fgit-scm.com\u002Fdownloads\">Git\u003C\u002Fa> installed","\u003Ca href=\"https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fgetting-started\u002Fintroduction\u002Finstallation.html\">Bruin CLI\u003C\u002Fa> installed","A data warehouse account (\u003Ca href=\"https:\u002F\u002Fclickhouse.com\u002Fcloud\">ClickHouse\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fcloud.google.com\u002Fbigquery\">BigQuery\u003C\u002Fa>, or \u003Ca href=\"https:\u002F\u002Fwww.snowflake.com\u002F\">Snowflake\u003C\u002Fa>)","A \u003Ca href=\"https:\u002F\u002Fshopify.dev\u002F\">Shopify\u003C\u002Fa> store with API credentials","API credentials for your selected payment, marketing, ads, and analytics tools","\u003Ca href=\"https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code\u002Foverview\">Claude Code\u003C\u002Fa> installed (this tutorial uses Claude Code throughout, but you can adapt the prompts for \u003Ca href=\"https:\u002F\u002Fcursor.com\u002F\">Cursor\u003C\u002Fa> or \u003Ca href=\"https:\u002F\u002Fopenai.com\u002Findex\u002Fintroducing-codex\u002F\">Codex\u003C\u002Fa>)",[22,25,28,31],{"label":23,"url":24},"Bruin CLI documentation","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Foverview.html",{"label":26,"url":27},"Bruin MCP setup guide","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fgetting-started\u002Fbruin-mcp.html",{"label":29,"url":30},"Supported connections","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fconnections\u002Foverview.html",{"label":32,"url":33},"Bruin Core Concepts (video playlist)","https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLnRr-L-cuxO72ws5jYS8oyKMWs-AosgdP",{"name":35,"role":36,"image":37},"Bruin Team","Bruin Data","\u002Fbruin-logo-2025.svg",{"type":39,"children":40,"toc":98},"root",[41,55,65,75,85,92],{"type":42,"tag":43,"props":44,"children":45},"element","p",{},[46,53],{"type":42,"tag":47,"props":48,"children":49},"strong",{},[50],{"type":51,"value":52},"text","What is this?",{"type":51,"value":54}," A hands-on tutorial for Shopify store owners and teams. You'll build an analytics pipeline that pulls data from your Shopify store and the tools around it, transforms it into business reports, and sets up an AI data analyst that can run locally, in Bruin Cloud, or connected to your Slack\u002FTeams. You'll also create dashboards and scheduled reports.",{"type":42,"tag":43,"props":56,"children":57},{},[58,63],{"type":42,"tag":47,"props":59,"children":60},{},[61],{"type":51,"value":62},"What you'll use:",{"type":51,"value":64}," Bruin CLI for data extraction, transformation, and pipeline orchestration, your choice of data warehouse, Claude Code with Bruin MCP to help build and test the pipeline, and Bruin Cloud for deployment, dashboards, and team access.",{"type":42,"tag":43,"props":66,"children":67},{},[68,73],{"type":42,"tag":47,"props":69,"children":70},{},[71],{"type":51,"value":72},"What you'll build:",{"type":51,"value":74}," data ingestion from Shopify and your surrounding tools, a staging layer that cleans and joins data across sources, business reports (revenue, cohorts, product performance, marketing ROI), an AI data analyst, and cloud deployment with dashboards.",{"type":42,"tag":43,"props":76,"children":77},{},[78,83],{"type":42,"tag":47,"props":79,"children":80},{},[81],{"type":51,"value":82},"Who this is for:",{"type":51,"value":84}," anyone running a Shopify store - marketing, ops, analytics, or founder. No data engineering experience required. Basic SQL helps but isn't necessary; Claude Code will help you write queries along the way.",{"type":42,"tag":86,"props":87,"children":89},"h2",{"id":88},"pick-your-stack-customize-the-tutorial",[90],{"type":51,"value":91},"Pick your stack, customize the tutorial",{"type":42,"tag":93,"props":94,"children":97},"stack-picker",{":categories":95,"startHref":96},"[{\"id\":\"warehouse\",\"label\":\"Data Warehouse\",\"options\":[{\"id\":\"clickhouse\",\"label\":\"ClickHouse\",\"description\":\"Column-oriented analytics database\"},{\"id\":\"bigquery\",\"label\":\"BigQuery\",\"description\":\"Google Cloud serverless warehouse\"},{\"id\":\"snowflake\",\"label\":\"Snowflake\",\"description\":\"Multi-cloud data warehouse\"}]},{\"id\":\"payments\",\"label\":\"Payments\",\"options\":[{\"id\":\"shopify-payments\",\"label\":\"Shopify Payments\",\"description\":\"Payment data is already in your Shopify orders\"},{\"id\":\"stripe\",\"label\":\"Stripe\",\"description\":\"Separate payment processor with its own data\"}]},{\"id\":\"marketing\",\"label\":\"Email Marketing\",\"options\":[{\"id\":\"klaviyo\",\"label\":\"Klaviyo\",\"description\":\"Email & SMS for ecommerce\"},{\"id\":\"hubspot\",\"label\":\"HubSpot\",\"description\":\"CRM and marketing platform\"}]},{\"id\":\"ads\",\"label\":\"Advertising\",\"options\":[{\"id\":\"facebook-ads\",\"label\":\"Facebook Ads\",\"description\":\"Meta (Facebook + Instagram)\"},{\"id\":\"google-ads\",\"label\":\"Google Ads\",\"description\":\"Search and display ads\"},{\"id\":\"tiktok-ads\",\"label\":\"TikTok Ads\",\"description\":\"TikTok video ads\"}]},{\"id\":\"analytics\",\"label\":\"Web Analytics\",\"options\":[{\"id\":\"ga4\",\"label\":\"GA4\",\"description\":\"Google Analytics 4\"},{\"id\":\"mixpanel\",\"label\":\"Mixpanel\",\"description\":\"Product analytics\"}]}]","\u002Flearn\u002Fecommerce-pipeline\u002Fproject-setup",[],{"title":7,"searchDepth":99,"depth":99,"links":100},2,[101],{"id":88,"depth":99,"text":91},"markdown","content:tutorials:ecommerce-pipeline:index.md","content","tutorials\u002Fecommerce-pipeline\u002Findex.md","tutorials\u002Fecommerce-pipeline\u002Findex","md",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"module":12,"isModuleIndex":13,"prerequisites":109,"resources":110,"author":115,"body":116,"_type":102,"_id":103,"_source":104,"_file":105,"_stem":106,"_extension":107},[15,16,17,18,19,20],[111,112,113,114],{"label":23,"url":24},{"label":26,"url":27},{"label":29,"url":30},{"label":32,"url":33},{"name":35,"role":36,"image":37},{"type":39,"children":117,"toc":157},[118,126,134,142,150,154],{"type":42,"tag":43,"props":119,"children":120},{},[121,125],{"type":42,"tag":47,"props":122,"children":123},{},[124],{"type":51,"value":52},{"type":51,"value":54},{"type":42,"tag":43,"props":127,"children":128},{},[129,133],{"type":42,"tag":47,"props":130,"children":131},{},[132],{"type":51,"value":62},{"type":51,"value":64},{"type":42,"tag":43,"props":135,"children":136},{},[137,141],{"type":42,"tag":47,"props":138,"children":139},{},[140],{"type":51,"value":72},{"type":51,"value":74},{"type":42,"tag":43,"props":143,"children":144},{},[145,149],{"type":42,"tag":47,"props":146,"children":147},{},[148],{"type":51,"value":82},{"type":51,"value":84},{"type":42,"tag":86,"props":151,"children":152},{"id":88},[153],{"type":51,"value":91},{"type":42,"tag":93,"props":155,"children":156},{":categories":95,"startHref":96},[],{"title":7,"searchDepth":99,"depth":99,"links":158},[159],{"id":88,"depth":99,"text":91},[161,1703,6368,14364,27670,29623],{"_path":162,"_dir":12,"_draft":6,"_partial":6,"_locale":7,"title":163,"description":164,"date":10,"readingTime":165,"category":166,"tags":167,"difficulty":175,"module":12,"subSteps":13,"step":176,"variants":177,"journeys":178,"learnMore":181,"author":188,"body":189,"_type":102,"_id":1700,"_source":104,"_file":1701,"_stem":1702,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline\u002Fproject-setup","Set Up Your Project & Warehouse","Install Bruin CLI, initialize an ecommerce project, connect your data warehouse, and set up AI-assisted development with Claude Code and the Bruin MCP.",8,"Tutorial",[168,169,170,171,172,173,174],"Bruin CLI","Claude Code","MCP","ClickHouse","BigQuery","Snowflake","E-commerce","Beginner",1,[171,172,173],[179,180],"Data Analyst","Data Engineer",[182,185,187],{"label":183,"url":184},"Bruin project structure (docs)","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fcore-concepts\u002Fproject.html",{"label":186,"url":30},"Connections reference",{"label":26,"url":27},{"name":35,"role":36,"image":37},{"type":39,"children":190,"toc":1686},[191,197,202,208,213,272,322,328,333,338,354,360,367,380,461,466,476,482,493,524,551,557,562,1230,1236,1248,1506,1512,1524,1568,1573,1582,1587,1616,1622,1627,1651,1656,1664,1669,1675,1680],{"type":42,"tag":86,"props":192,"children":194},{"id":193},"what-youll-do",[195],{"type":51,"value":196},"What you'll do",{"type":42,"tag":43,"props":198,"children":199},{},[200],{"type":51,"value":201},"Create a project, connect your data warehouse, and set up Claude Code with the Bruin MCP so it can help you build the rest of the pipeline.",{"type":42,"tag":86,"props":203,"children":205},{"id":204},"prerequisites",[206],{"type":51,"value":207},"Prerequisites",{"type":42,"tag":43,"props":209,"children":210},{},[211],{"type":51,"value":212},"Before starting, make sure you have these installed:",{"type":42,"tag":214,"props":215,"children":216},"ul",{},[217,248],{"type":42,"tag":218,"props":219,"children":220},"li",{},[221,226,228,237,239,246],{"type":42,"tag":47,"props":222,"children":223},{},[224],{"type":51,"value":225},"Git",{"type":51,"value":227}," - ",{"type":42,"tag":229,"props":230,"children":234},"a",{"href":231,"rel":232},"https:\u002F\u002Fgit-scm.com\u002Fdownloads",[233],"nofollow",[235],{"type":51,"value":236},"git-scm.com\u002Fdownloads",{"type":51,"value":238},". Verify with ",{"type":42,"tag":240,"props":241,"children":243},"code",{"className":242},[],[244],{"type":51,"value":245},"git --version",{"type":51,"value":247},".",{"type":42,"tag":218,"props":249,"children":250},{},[251,255,257,264,265,271],{"type":42,"tag":47,"props":252,"children":253},{},[254],{"type":51,"value":168},{"type":51,"value":256}," - install from the ",{"type":42,"tag":229,"props":258,"children":261},{"href":259,"rel":260},"https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fgetting-started\u002Fintroduction\u002Finstallation.html",[233],[262],{"type":51,"value":263},"installation docs",{"type":51,"value":238},{"type":42,"tag":240,"props":266,"children":268},{"className":267},[],[269],{"type":51,"value":270},"bruin version",{"type":51,"value":247},{"type":42,"tag":43,"props":273,"children":274},{},[275,277,283,285,291,293,299,300,306,307,313,315,321],{"type":51,"value":276},"If you're new to Bruin, the ",{"type":42,"tag":229,"props":278,"children":280},{"href":279},"\u002Flearn\u002Fcore-concepts",[281],{"type":51,"value":282},"Core Concepts",{"type":51,"value":284}," module covers ",{"type":42,"tag":229,"props":286,"children":288},{"href":287},"\u002Flearn\u002Fcore-concepts\u002Fprojects",[289],{"type":51,"value":290},"projects",{"type":51,"value":292},", ",{"type":42,"tag":229,"props":294,"children":296},{"href":295},"\u002Flearn\u002Fcore-concepts\u002Fpipelines",[297],{"type":51,"value":298},"pipelines",{"type":51,"value":292},{"type":42,"tag":229,"props":301,"children":303},{"href":302},"\u002Flearn\u002Fcore-concepts\u002Fassets",[304],{"type":51,"value":305},"assets",{"type":51,"value":292},{"type":42,"tag":229,"props":308,"children":310},{"href":309},"\u002Flearn\u002Fcore-concepts\u002Fvariables",[311],{"type":51,"value":312},"variables",{"type":51,"value":314},", and ",{"type":42,"tag":229,"props":316,"children":318},{"href":317},"\u002Flearn\u002Fcore-concepts\u002Fcommands",[319],{"type":51,"value":320},"commands",{"type":51,"value":247},{"type":42,"tag":86,"props":323,"children":325},{"id":324},"why-this-step-matters",[326],{"type":51,"value":327},"Why this step matters",{"type":42,"tag":43,"props":329,"children":330},{},[331],{"type":51,"value":332},"Every data pipeline needs two things: an orchestration tool and a destination. Bruin is the orchestrator - it defines what data moves where and when. Your data warehouse is the destination where all your Shopify and ecommerce data will land and get transformed.",{"type":42,"tag":43,"props":334,"children":335},{},[336],{"type":51,"value":337},"We'll use Claude Code throughout this tutorial to help create files, write SQL, run validations, and troubleshoot issues. Setting up the Bruin MCP early gives Claude Code direct access to your pipeline and warehouse from Step 2 onward.",{"type":42,"tag":339,"props":340,"children":341},"note",{},[342],{"type":42,"tag":43,"props":343,"children":344},{},[345,347,353],{"type":51,"value":346},"If you already have a Bruin project, skip ahead to ",{"type":42,"tag":229,"props":348,"children":350},{"href":349},"\u002Flearn\u002Fecommerce-pipeline\u002Fingest-data",[351],{"type":51,"value":352},"Step 2: Ingest Your Data",{"type":51,"value":247},{"type":42,"tag":86,"props":355,"children":357},{"id":356},"instructions",[358],{"type":51,"value":359},"Instructions",{"type":42,"tag":361,"props":362,"children":364},"h3",{"id":363},"_1-initialize-a-project",[365],{"type":51,"value":366},"1) Initialize a project",{"type":42,"tag":43,"props":368,"children":369},{},[370,372,378],{"type":51,"value":371},"Create a folder for your project, initialize git, then run ",{"type":42,"tag":240,"props":373,"children":375},{"className":374},[],[376],{"type":51,"value":377},"bruin init",{"type":51,"value":379}," inside it:",{"type":42,"tag":381,"props":382,"children":386},"pre",{"className":383,"code":384,"language":385,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","mkdir ecommerce-analytics && cd ecommerce-analytics\ngit init\nbruin init empty ecommerce\n","bash",[387],{"type":42,"tag":240,"props":388,"children":389},{"__ignoreMap":7},[390,424,437],{"type":42,"tag":391,"props":392,"children":394},"span",{"class":393,"line":176},"line",[395,401,407,413,419],{"type":42,"tag":391,"props":396,"children":398},{"style":397},"--shiki-default:#B392F0",[399],{"type":51,"value":400},"mkdir",{"type":42,"tag":391,"props":402,"children":404},{"style":403},"--shiki-default:#9ECBFF",[405],{"type":51,"value":406}," ecommerce-analytics",{"type":42,"tag":391,"props":408,"children":410},{"style":409},"--shiki-default:#E1E4E8",[411],{"type":51,"value":412}," && ",{"type":42,"tag":391,"props":414,"children":416},{"style":415},"--shiki-default:#79B8FF",[417],{"type":51,"value":418},"cd",{"type":42,"tag":391,"props":420,"children":421},{"style":403},[422],{"type":51,"value":423}," ecommerce-analytics\n",{"type":42,"tag":391,"props":425,"children":426},{"class":393,"line":99},[427,432],{"type":42,"tag":391,"props":428,"children":429},{"style":397},[430],{"type":51,"value":431},"git",{"type":42,"tag":391,"props":433,"children":434},{"style":403},[435],{"type":51,"value":436}," init\n",{"type":42,"tag":391,"props":438,"children":440},{"class":393,"line":439},3,[441,446,451,456],{"type":42,"tag":391,"props":442,"children":443},{"style":397},[444],{"type":51,"value":445},"bruin",{"type":42,"tag":391,"props":447,"children":448},{"style":403},[449],{"type":51,"value":450}," init",{"type":42,"tag":391,"props":452,"children":453},{"style":403},[454],{"type":51,"value":455}," empty",{"type":42,"tag":391,"props":457,"children":458},{"style":403},[459],{"type":51,"value":460}," ecommerce\n",{"type":42,"tag":43,"props":462,"children":463},{},[464],{"type":51,"value":465},"This creates the following structure:",{"type":42,"tag":381,"props":467,"children":471},{"className":468,"code":470,"language":51},[469],"language-text","ecommerce-analytics\u002F\n├── .bruin.yml            # project config - connections, environments\n└── ecommerce\u002F            # pipeline folder\n    ├── pipeline.yml      # pipeline config - name, schedule, defaults\n    └── assets\u002F           # where your data assets will live\n",[472],{"type":42,"tag":240,"props":473,"children":474},{"__ignoreMap":7},[475],{"type":51,"value":470},{"type":42,"tag":361,"props":477,"children":479},{"id":478},"_2-add-bruinyml-to-gitignore",[480],{"type":51,"value":481},"2) Add .bruin.yml to .gitignore",{"type":42,"tag":43,"props":483,"children":484},{},[485,491],{"type":42,"tag":240,"props":486,"children":488},{"className":487},[],[489],{"type":51,"value":490},".bruin.yml",{"type":51,"value":492}," stores your connection credentials (database passwords, API keys). You don't want these in git.",{"type":42,"tag":381,"props":494,"children":496},{"className":383,"code":495,"language":385,"meta":7,"style":7},"echo \".bruin.yml\" >> .gitignore\n",[497],{"type":42,"tag":240,"props":498,"children":499},{"__ignoreMap":7},[500],{"type":42,"tag":391,"props":501,"children":502},{"class":393,"line":176},[503,508,513,519],{"type":42,"tag":391,"props":504,"children":505},{"style":415},[506],{"type":51,"value":507},"echo",{"type":42,"tag":391,"props":509,"children":510},{"style":403},[511],{"type":51,"value":512}," \".bruin.yml\"",{"type":42,"tag":391,"props":514,"children":516},{"style":515},"--shiki-default:#F97583",[517],{"type":51,"value":518}," >>",{"type":42,"tag":391,"props":520,"children":521},{"style":403},[522],{"type":51,"value":523}," .gitignore\n",{"type":42,"tag":43,"props":525,"children":526},{},[527,532,534,540,542,549],{"type":42,"tag":240,"props":528,"children":530},{"className":529},[],[531],{"type":51,"value":377},{"type":51,"value":533}," may already add this for you - check your ",{"type":42,"tag":240,"props":535,"children":537},{"className":536},[],[538],{"type":51,"value":539},".gitignore",{"type":51,"value":541}," to confirm. When you deploy to production, connections are configured securely in ",{"type":42,"tag":229,"props":543,"children":546},{"href":544,"rel":545},"https:\u002F\u002Fcloud.getbruin.com",[233],[547],{"type":51,"value":548},"Bruin Cloud",{"type":51,"value":550}," instead of the local file - we'll set that up in Step 5.",{"type":42,"tag":361,"props":552,"children":554},{"id":553},"_3-connect-your-data-warehouse",[555],{"type":51,"value":556},"3) Connect your data warehouse",{"type":42,"tag":43,"props":558,"children":559},{},[560],{"type":51,"value":561},"Pick the tab that matches the warehouse you selected on the overview page.",{"type":42,"tag":563,"props":564,"children":567},"variant-tabs",{":variants":565,"group":566},"[{\"id\":\"clickhouse\",\"label\":\"ClickHouse\"},{\"id\":\"bigquery\",\"label\":\"BigQuery\"},{\"id\":\"snowflake\",\"label\":\"Snowflake\"}]","warehouse",[568,738,1065],{"type":42,"tag":569,"props":570,"children":571},"template",{"v-slot:clickhouse":7},[572,577,615,639,644,687,692,725],{"type":42,"tag":361,"props":573,"children":575},{"id":574},"clickhouse",[576],{"type":51,"value":171},{"type":42,"tag":43,"props":578,"children":579},{},[580,582,589,591,596,597,602,603,608,609,614],{"type":51,"value":581},"If you don't have a ClickHouse instance yet, go to ",{"type":42,"tag":229,"props":583,"children":586},{"href":584,"rel":585},"https:\u002F\u002Fclickhouse.com\u002Fcloud",[233],[587],{"type":51,"value":588},"clickhouse.com\u002Fcloud",{"type":51,"value":590}," and sign up for the free tier. Create a new service and copy the ",{"type":42,"tag":47,"props":592,"children":593},{},[594],{"type":51,"value":595},"host",{"type":51,"value":292},{"type":42,"tag":47,"props":598,"children":599},{},[600],{"type":51,"value":601},"port",{"type":51,"value":292},{"type":42,"tag":47,"props":604,"children":605},{},[606],{"type":51,"value":607},"username",{"type":51,"value":314},{"type":42,"tag":47,"props":610,"children":611},{},[612],{"type":51,"value":613},"password",{"type":51,"value":247},{"type":42,"tag":381,"props":616,"children":618},{"className":383,"code":617,"language":385,"meta":7,"style":7},"bruin connections add\n",[619],{"type":42,"tag":240,"props":620,"children":621},{"__ignoreMap":7},[622],{"type":42,"tag":391,"props":623,"children":624},{"class":393,"line":176},[625,629,634],{"type":42,"tag":391,"props":626,"children":627},{"style":397},[628],{"type":51,"value":445},{"type":42,"tag":391,"props":630,"children":631},{"style":403},[632],{"type":51,"value":633}," connections",{"type":42,"tag":391,"props":635,"children":636},{"style":403},[637],{"type":51,"value":638}," add\n",{"type":42,"tag":43,"props":640,"children":641},{},[642],{"type":51,"value":643},"When prompted:",{"type":42,"tag":214,"props":645,"children":646},{},[647,662,677],{"type":42,"tag":218,"props":648,"children":649},{},[650,655,657],{"type":42,"tag":47,"props":651,"children":652},{},[653],{"type":51,"value":654},"Type:",{"type":51,"value":656}," ",{"type":42,"tag":240,"props":658,"children":660},{"className":659},[],[661],{"type":51,"value":574},{"type":42,"tag":218,"props":663,"children":664},{},[665,670,671],{"type":42,"tag":47,"props":666,"children":667},{},[668],{"type":51,"value":669},"Name:",{"type":51,"value":656},{"type":42,"tag":240,"props":672,"children":674},{"className":673},[],[675],{"type":51,"value":676},"clickhouse-default",{"type":42,"tag":218,"props":678,"children":679},{},[680,685],{"type":42,"tag":47,"props":681,"children":682},{},[683],{"type":51,"value":684},"Host, port, username, password:",{"type":51,"value":686}," paste the values from your ClickHouse Cloud service",{"type":42,"tag":43,"props":688,"children":689},{},[690],{"type":51,"value":691},"Test the connection:",{"type":42,"tag":381,"props":693,"children":695},{"className":383,"code":694,"language":385,"meta":7,"style":7},"bruin connections test --name clickhouse-default\n",[696],{"type":42,"tag":240,"props":697,"children":698},{"__ignoreMap":7},[699],{"type":42,"tag":391,"props":700,"children":701},{"class":393,"line":176},[702,706,710,715,720],{"type":42,"tag":391,"props":703,"children":704},{"style":397},[705],{"type":51,"value":445},{"type":42,"tag":391,"props":707,"children":708},{"style":403},[709],{"type":51,"value":633},{"type":42,"tag":391,"props":711,"children":712},{"style":403},[713],{"type":51,"value":714}," test",{"type":42,"tag":391,"props":716,"children":717},{"style":415},[718],{"type":51,"value":719}," --name",{"type":42,"tag":391,"props":721,"children":722},{"style":403},[723],{"type":51,"value":724}," clickhouse-default\n",{"type":42,"tag":43,"props":726,"children":727},{},[728,730,737],{"type":51,"value":729},"For full connection options, see the ",{"type":42,"tag":229,"props":731,"children":734},{"href":732,"rel":733},"https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fplatforms\u002Fclickhouse.html",[233],[735],{"type":51,"value":736},"ClickHouse platform docs",{"type":51,"value":247},{"type":42,"tag":569,"props":739,"children":740},{"v-slot:bigquery":7},[741,746,754,784,789,810,814,878,886,898,1018,1022,1053],{"type":42,"tag":361,"props":742,"children":744},{"id":743},"bigquery",[745],{"type":51,"value":172},{"type":42,"tag":43,"props":747,"children":748},{},[749],{"type":42,"tag":47,"props":750,"children":751},{},[752],{"type":51,"value":753},"Option A: Application Default Credentials (personal account)",{"type":42,"tag":381,"props":755,"children":757},{"className":383,"code":756,"language":385,"meta":7,"style":7},"gcloud auth application-default login\n",[758],{"type":42,"tag":240,"props":759,"children":760},{"__ignoreMap":7},[761],{"type":42,"tag":391,"props":762,"children":763},{"class":393,"line":176},[764,769,774,779],{"type":42,"tag":391,"props":765,"children":766},{"style":397},[767],{"type":51,"value":768},"gcloud",{"type":42,"tag":391,"props":770,"children":771},{"style":403},[772],{"type":51,"value":773}," auth",{"type":42,"tag":391,"props":775,"children":776},{"style":403},[777],{"type":51,"value":778}," application-default",{"type":42,"tag":391,"props":780,"children":781},{"style":403},[782],{"type":51,"value":783}," login\n",{"type":42,"tag":43,"props":785,"children":786},{},[787],{"type":51,"value":788},"This opens a browser for Google sign-in. Once done, run:",{"type":42,"tag":381,"props":790,"children":791},{"className":383,"code":617,"language":385,"meta":7,"style":7},[792],{"type":42,"tag":240,"props":793,"children":794},{"__ignoreMap":7},[795],{"type":42,"tag":391,"props":796,"children":797},{"class":393,"line":176},[798,802,806],{"type":42,"tag":391,"props":799,"children":800},{"style":397},[801],{"type":51,"value":445},{"type":42,"tag":391,"props":803,"children":804},{"style":403},[805],{"type":51,"value":633},{"type":42,"tag":391,"props":807,"children":808},{"style":403},[809],{"type":51,"value":638},{"type":42,"tag":43,"props":811,"children":812},{},[813],{"type":51,"value":643},{"type":42,"tag":214,"props":815,"children":816},{},[817,831,845,855],{"type":42,"tag":218,"props":818,"children":819},{},[820,824,825],{"type":42,"tag":47,"props":821,"children":822},{},[823],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":826,"children":828},{"className":827},[],[829],{"type":51,"value":830},"google_cloud_platform",{"type":42,"tag":218,"props":832,"children":833},{},[834,838,839],{"type":42,"tag":47,"props":835,"children":836},{},[837],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":840,"children":842},{"className":841},[],[843],{"type":51,"value":844},"bigquery-default",{"type":42,"tag":218,"props":846,"children":847},{},[848,853],{"type":42,"tag":47,"props":849,"children":850},{},[851],{"type":51,"value":852},"Project ID:",{"type":51,"value":854}," your GCP project ID",{"type":42,"tag":218,"props":856,"children":857},{},[858,863,864,870,872],{"type":42,"tag":47,"props":859,"children":860},{},[861],{"type":51,"value":862},"Credential method:",{"type":51,"value":656},{"type":42,"tag":240,"props":865,"children":867},{"className":866},[],[868],{"type":51,"value":869},"use_application_default_credentials",{"type":51,"value":871}," set to ",{"type":42,"tag":240,"props":873,"children":875},{"className":874},[],[876],{"type":51,"value":877},"true",{"type":42,"tag":43,"props":879,"children":880},{},[881],{"type":42,"tag":47,"props":882,"children":883},{},[884],{"type":51,"value":885},"Option B: Service Account Key File",{"type":42,"tag":43,"props":887,"children":888},{},[889,891,896],{"type":51,"value":890},"Edit ",{"type":42,"tag":240,"props":892,"children":894},{"className":893},[],[895],{"type":51,"value":490},{"type":51,"value":897}," directly:",{"type":42,"tag":381,"props":899,"children":903},{"className":900,"code":901,"language":902,"meta":7,"style":7},"language-yaml shiki shiki-themes github-dark","environments:\n  default:\n    connections:\n      google_cloud_platform:\n        - name: \"bigquery-default\"\n          project_id: \"your-gcp-project-id\"\n          service_account_file: \"\u002Fpath\u002Fto\u002Fyour-service-account.json\"\n","yaml",[904],{"type":42,"tag":240,"props":905,"children":906},{"__ignoreMap":7},[907,921,933,945,958,982,1000],{"type":42,"tag":391,"props":908,"children":909},{"class":393,"line":176},[910,916],{"type":42,"tag":391,"props":911,"children":913},{"style":912},"--shiki-default:#85E89D",[914],{"type":51,"value":915},"environments",{"type":42,"tag":391,"props":917,"children":918},{"style":409},[919],{"type":51,"value":920},":\n",{"type":42,"tag":391,"props":922,"children":923},{"class":393,"line":99},[924,929],{"type":42,"tag":391,"props":925,"children":926},{"style":912},[927],{"type":51,"value":928},"  default",{"type":42,"tag":391,"props":930,"children":931},{"style":409},[932],{"type":51,"value":920},{"type":42,"tag":391,"props":934,"children":935},{"class":393,"line":439},[936,941],{"type":42,"tag":391,"props":937,"children":938},{"style":912},[939],{"type":51,"value":940},"    connections",{"type":42,"tag":391,"props":942,"children":943},{"style":409},[944],{"type":51,"value":920},{"type":42,"tag":391,"props":946,"children":948},{"class":393,"line":947},4,[949,954],{"type":42,"tag":391,"props":950,"children":951},{"style":912},[952],{"type":51,"value":953},"      google_cloud_platform",{"type":42,"tag":391,"props":955,"children":956},{"style":409},[957],{"type":51,"value":920},{"type":42,"tag":391,"props":959,"children":961},{"class":393,"line":960},5,[962,967,972,977],{"type":42,"tag":391,"props":963,"children":964},{"style":409},[965],{"type":51,"value":966},"        - ",{"type":42,"tag":391,"props":968,"children":969},{"style":912},[970],{"type":51,"value":971},"name",{"type":42,"tag":391,"props":973,"children":974},{"style":409},[975],{"type":51,"value":976},": ",{"type":42,"tag":391,"props":978,"children":979},{"style":403},[980],{"type":51,"value":981},"\"bigquery-default\"\n",{"type":42,"tag":391,"props":983,"children":985},{"class":393,"line":984},6,[986,991,995],{"type":42,"tag":391,"props":987,"children":988},{"style":912},[989],{"type":51,"value":990},"          project_id",{"type":42,"tag":391,"props":992,"children":993},{"style":409},[994],{"type":51,"value":976},{"type":42,"tag":391,"props":996,"children":997},{"style":403},[998],{"type":51,"value":999},"\"your-gcp-project-id\"\n",{"type":42,"tag":391,"props":1001,"children":1003},{"class":393,"line":1002},7,[1004,1009,1013],{"type":42,"tag":391,"props":1005,"children":1006},{"style":912},[1007],{"type":51,"value":1008},"          service_account_file",{"type":42,"tag":391,"props":1010,"children":1011},{"style":409},[1012],{"type":51,"value":976},{"type":42,"tag":391,"props":1014,"children":1015},{"style":403},[1016],{"type":51,"value":1017},"\"\u002Fpath\u002Fto\u002Fyour-service-account.json\"\n",{"type":42,"tag":43,"props":1019,"children":1020},{},[1021],{"type":51,"value":691},{"type":42,"tag":381,"props":1023,"children":1025},{"className":383,"code":1024,"language":385,"meta":7,"style":7},"bruin connections test --name bigquery-default\n",[1026],{"type":42,"tag":240,"props":1027,"children":1028},{"__ignoreMap":7},[1029],{"type":42,"tag":391,"props":1030,"children":1031},{"class":393,"line":176},[1032,1036,1040,1044,1048],{"type":42,"tag":391,"props":1033,"children":1034},{"style":397},[1035],{"type":51,"value":445},{"type":42,"tag":391,"props":1037,"children":1038},{"style":403},[1039],{"type":51,"value":633},{"type":42,"tag":391,"props":1041,"children":1042},{"style":403},[1043],{"type":51,"value":714},{"type":42,"tag":391,"props":1045,"children":1046},{"style":415},[1047],{"type":51,"value":719},{"type":42,"tag":391,"props":1049,"children":1050},{"style":403},[1051],{"type":51,"value":1052}," bigquery-default\n",{"type":42,"tag":43,"props":1054,"children":1055},{},[1056,1057,1064],{"type":51,"value":729},{"type":42,"tag":229,"props":1058,"children":1061},{"href":1059,"rel":1060},"https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fplatforms\u002Fbigquery.html",[233],[1062],{"type":51,"value":1063},"BigQuery platform docs",{"type":51,"value":247},{"type":42,"tag":569,"props":1066,"children":1067},{"v-slot:snowflake":7},[1068,1073,1094,1098,1183,1187,1218],{"type":42,"tag":361,"props":1069,"children":1071},{"id":1070},"snowflake",[1072],{"type":51,"value":173},{"type":42,"tag":381,"props":1074,"children":1075},{"className":383,"code":617,"language":385,"meta":7,"style":7},[1076],{"type":42,"tag":240,"props":1077,"children":1078},{"__ignoreMap":7},[1079],{"type":42,"tag":391,"props":1080,"children":1081},{"class":393,"line":176},[1082,1086,1090],{"type":42,"tag":391,"props":1083,"children":1084},{"style":397},[1085],{"type":51,"value":445},{"type":42,"tag":391,"props":1087,"children":1088},{"style":403},[1089],{"type":51,"value":633},{"type":42,"tag":391,"props":1091,"children":1092},{"style":403},[1093],{"type":51,"value":638},{"type":42,"tag":43,"props":1095,"children":1096},{},[1097],{"type":51,"value":643},{"type":42,"tag":214,"props":1099,"children":1100},{},[1101,1114,1128,1146,1156,1166],{"type":42,"tag":218,"props":1102,"children":1103},{},[1104,1108,1109],{"type":42,"tag":47,"props":1105,"children":1106},{},[1107],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":51,"value":1070},{"type":42,"tag":218,"props":1115,"children":1116},{},[1117,1121,1122],{"type":42,"tag":47,"props":1118,"children":1119},{},[1120],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":1123,"children":1125},{"className":1124},[],[1126],{"type":51,"value":1127},"snowflake-default",{"type":42,"tag":218,"props":1129,"children":1130},{},[1131,1136,1138,1144],{"type":42,"tag":47,"props":1132,"children":1133},{},[1134],{"type":51,"value":1135},"Account:",{"type":51,"value":1137}," your Snowflake account identifier (e.g. ",{"type":42,"tag":240,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":51,"value":1143},"abc12345.us-east-1",{"type":51,"value":1145},")",{"type":42,"tag":218,"props":1147,"children":1148},{},[1149,1154],{"type":42,"tag":47,"props":1150,"children":1151},{},[1152],{"type":51,"value":1153},"Username and password:",{"type":51,"value":1155}," your Snowflake credentials",{"type":42,"tag":218,"props":1157,"children":1158},{},[1159,1164],{"type":42,"tag":47,"props":1160,"children":1161},{},[1162],{"type":51,"value":1163},"Database and warehouse:",{"type":51,"value":1165}," your target database and compute warehouse",{"type":42,"tag":218,"props":1167,"children":1168},{},[1169,1174,1175,1181],{"type":42,"tag":47,"props":1170,"children":1171},{},[1172],{"type":51,"value":1173},"Schema",{"type":51,"value":656},{"type":42,"tag":1176,"props":1177,"children":1178},"em",{},[1179],{"type":51,"value":1180},"(optional):",{"type":51,"value":1182}," default schema to use",{"type":42,"tag":43,"props":1184,"children":1185},{},[1186],{"type":51,"value":691},{"type":42,"tag":381,"props":1188,"children":1190},{"className":383,"code":1189,"language":385,"meta":7,"style":7},"bruin connections test --name snowflake-default\n",[1191],{"type":42,"tag":240,"props":1192,"children":1193},{"__ignoreMap":7},[1194],{"type":42,"tag":391,"props":1195,"children":1196},{"class":393,"line":176},[1197,1201,1205,1209,1213],{"type":42,"tag":391,"props":1198,"children":1199},{"style":397},[1200],{"type":51,"value":445},{"type":42,"tag":391,"props":1202,"children":1203},{"style":403},[1204],{"type":51,"value":633},{"type":42,"tag":391,"props":1206,"children":1207},{"style":403},[1208],{"type":51,"value":714},{"type":42,"tag":391,"props":1210,"children":1211},{"style":415},[1212],{"type":51,"value":719},{"type":42,"tag":391,"props":1214,"children":1215},{"style":403},[1216],{"type":51,"value":1217}," snowflake-default\n",{"type":42,"tag":43,"props":1219,"children":1220},{},[1221,1222,1229],{"type":51,"value":729},{"type":42,"tag":229,"props":1223,"children":1226},{"href":1224,"rel":1225},"https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fplatforms\u002Fsnowflake.html",[233],[1227],{"type":51,"value":1228},"Snowflake platform docs",{"type":51,"value":247},{"type":42,"tag":361,"props":1231,"children":1233},{"id":1232},"_4-configure-the-pipeline",[1234],{"type":51,"value":1235},"4) Configure the pipeline",{"type":42,"tag":43,"props":1237,"children":1238},{},[1239,1240,1246],{"type":51,"value":890},{"type":42,"tag":240,"props":1241,"children":1243},{"className":1242},[],[1244],{"type":51,"value":1245},"ecommerce\u002Fpipeline.yml",{"type":51,"value":1247}," to set the default connection and schedule:",{"type":42,"tag":563,"props":1249,"children":1250},{":variants":565,"group":566},[1251,1340,1423],{"type":42,"tag":569,"props":1252,"children":1253},{"v-slot:clickhouse":7},[1254],{"type":42,"tag":381,"props":1255,"children":1257},{"className":900,"code":1256,"language":902,"meta":7,"style":7},"name: ecommerce\nschedule: daily\nstart_date: \"2024-01-01\"\ndefault_connections:\n  clickhouse: clickhouse-default\n",[1258],{"type":42,"tag":240,"props":1259,"children":1260},{"__ignoreMap":7},[1261,1277,1294,1311,1323],{"type":42,"tag":391,"props":1262,"children":1263},{"class":393,"line":176},[1264,1268,1272],{"type":42,"tag":391,"props":1265,"children":1266},{"style":912},[1267],{"type":51,"value":971},{"type":42,"tag":391,"props":1269,"children":1270},{"style":409},[1271],{"type":51,"value":976},{"type":42,"tag":391,"props":1273,"children":1274},{"style":403},[1275],{"type":51,"value":1276},"ecommerce\n",{"type":42,"tag":391,"props":1278,"children":1279},{"class":393,"line":99},[1280,1285,1289],{"type":42,"tag":391,"props":1281,"children":1282},{"style":912},[1283],{"type":51,"value":1284},"schedule",{"type":42,"tag":391,"props":1286,"children":1287},{"style":409},[1288],{"type":51,"value":976},{"type":42,"tag":391,"props":1290,"children":1291},{"style":403},[1292],{"type":51,"value":1293},"daily\n",{"type":42,"tag":391,"props":1295,"children":1296},{"class":393,"line":439},[1297,1302,1306],{"type":42,"tag":391,"props":1298,"children":1299},{"style":912},[1300],{"type":51,"value":1301},"start_date",{"type":42,"tag":391,"props":1303,"children":1304},{"style":409},[1305],{"type":51,"value":976},{"type":42,"tag":391,"props":1307,"children":1308},{"style":403},[1309],{"type":51,"value":1310},"\"2024-01-01\"\n",{"type":42,"tag":391,"props":1312,"children":1313},{"class":393,"line":947},[1314,1319],{"type":42,"tag":391,"props":1315,"children":1316},{"style":912},[1317],{"type":51,"value":1318},"default_connections",{"type":42,"tag":391,"props":1320,"children":1321},{"style":409},[1322],{"type":51,"value":920},{"type":42,"tag":391,"props":1324,"children":1325},{"class":393,"line":960},[1326,1331,1335],{"type":42,"tag":391,"props":1327,"children":1328},{"style":912},[1329],{"type":51,"value":1330},"  clickhouse",{"type":42,"tag":391,"props":1332,"children":1333},{"style":409},[1334],{"type":51,"value":976},{"type":42,"tag":391,"props":1336,"children":1337},{"style":403},[1338],{"type":51,"value":1339},"clickhouse-default\n",{"type":42,"tag":569,"props":1341,"children":1342},{"v-slot:bigquery":7},[1343],{"type":42,"tag":381,"props":1344,"children":1346},{"className":900,"code":1345,"language":902,"meta":7,"style":7},"name: ecommerce\nschedule: daily\nstart_date: \"2024-01-01\"\ndefault_connections:\n  google_cloud_platform: bigquery-default\n",[1347],{"type":42,"tag":240,"props":1348,"children":1349},{"__ignoreMap":7},[1350,1365,1380,1395,1406],{"type":42,"tag":391,"props":1351,"children":1352},{"class":393,"line":176},[1353,1357,1361],{"type":42,"tag":391,"props":1354,"children":1355},{"style":912},[1356],{"type":51,"value":971},{"type":42,"tag":391,"props":1358,"children":1359},{"style":409},[1360],{"type":51,"value":976},{"type":42,"tag":391,"props":1362,"children":1363},{"style":403},[1364],{"type":51,"value":1276},{"type":42,"tag":391,"props":1366,"children":1367},{"class":393,"line":99},[1368,1372,1376],{"type":42,"tag":391,"props":1369,"children":1370},{"style":912},[1371],{"type":51,"value":1284},{"type":42,"tag":391,"props":1373,"children":1374},{"style":409},[1375],{"type":51,"value":976},{"type":42,"tag":391,"props":1377,"children":1378},{"style":403},[1379],{"type":51,"value":1293},{"type":42,"tag":391,"props":1381,"children":1382},{"class":393,"line":439},[1383,1387,1391],{"type":42,"tag":391,"props":1384,"children":1385},{"style":912},[1386],{"type":51,"value":1301},{"type":42,"tag":391,"props":1388,"children":1389},{"style":409},[1390],{"type":51,"value":976},{"type":42,"tag":391,"props":1392,"children":1393},{"style":403},[1394],{"type":51,"value":1310},{"type":42,"tag":391,"props":1396,"children":1397},{"class":393,"line":947},[1398,1402],{"type":42,"tag":391,"props":1399,"children":1400},{"style":912},[1401],{"type":51,"value":1318},{"type":42,"tag":391,"props":1403,"children":1404},{"style":409},[1405],{"type":51,"value":920},{"type":42,"tag":391,"props":1407,"children":1408},{"class":393,"line":960},[1409,1414,1418],{"type":42,"tag":391,"props":1410,"children":1411},{"style":912},[1412],{"type":51,"value":1413},"  google_cloud_platform",{"type":42,"tag":391,"props":1415,"children":1416},{"style":409},[1417],{"type":51,"value":976},{"type":42,"tag":391,"props":1419,"children":1420},{"style":403},[1421],{"type":51,"value":1422},"bigquery-default\n",{"type":42,"tag":569,"props":1424,"children":1425},{"v-slot:snowflake":7},[1426],{"type":42,"tag":381,"props":1427,"children":1429},{"className":900,"code":1428,"language":902,"meta":7,"style":7},"name: ecommerce\nschedule: daily\nstart_date: \"2024-01-01\"\ndefault_connections:\n  snowflake: snowflake-default\n",[1430],{"type":42,"tag":240,"props":1431,"children":1432},{"__ignoreMap":7},[1433,1448,1463,1478,1489],{"type":42,"tag":391,"props":1434,"children":1435},{"class":393,"line":176},[1436,1440,1444],{"type":42,"tag":391,"props":1437,"children":1438},{"style":912},[1439],{"type":51,"value":971},{"type":42,"tag":391,"props":1441,"children":1442},{"style":409},[1443],{"type":51,"value":976},{"type":42,"tag":391,"props":1445,"children":1446},{"style":403},[1447],{"type":51,"value":1276},{"type":42,"tag":391,"props":1449,"children":1450},{"class":393,"line":99},[1451,1455,1459],{"type":42,"tag":391,"props":1452,"children":1453},{"style":912},[1454],{"type":51,"value":1284},{"type":42,"tag":391,"props":1456,"children":1457},{"style":409},[1458],{"type":51,"value":976},{"type":42,"tag":391,"props":1460,"children":1461},{"style":403},[1462],{"type":51,"value":1293},{"type":42,"tag":391,"props":1464,"children":1465},{"class":393,"line":439},[1466,1470,1474],{"type":42,"tag":391,"props":1467,"children":1468},{"style":912},[1469],{"type":51,"value":1301},{"type":42,"tag":391,"props":1471,"children":1472},{"style":409},[1473],{"type":51,"value":976},{"type":42,"tag":391,"props":1475,"children":1476},{"style":403},[1477],{"type":51,"value":1310},{"type":42,"tag":391,"props":1479,"children":1480},{"class":393,"line":947},[1481,1485],{"type":42,"tag":391,"props":1482,"children":1483},{"style":912},[1484],{"type":51,"value":1318},{"type":42,"tag":391,"props":1486,"children":1487},{"style":409},[1488],{"type":51,"value":920},{"type":42,"tag":391,"props":1490,"children":1491},{"class":393,"line":960},[1492,1497,1501],{"type":42,"tag":391,"props":1493,"children":1494},{"style":912},[1495],{"type":51,"value":1496},"  snowflake",{"type":42,"tag":391,"props":1498,"children":1499},{"style":409},[1500],{"type":51,"value":976},{"type":42,"tag":391,"props":1502,"children":1503},{"style":403},[1504],{"type":51,"value":1505},"snowflake-default\n",{"type":42,"tag":361,"props":1507,"children":1509},{"id":1508},"_5-set-up-claude-code-with-bruin-mcp",[1510],{"type":51,"value":1511},"5) Set up Claude Code with Bruin MCP",{"type":42,"tag":43,"props":1513,"children":1514},{},[1515,1517,1522],{"type":51,"value":1516},"The Bruin MCP connects Claude Code directly to your pipeline and warehouse. Once it's set up, Claude Code can read your asset files, run ",{"type":42,"tag":240,"props":1518,"children":1520},{"className":1519},[],[1521],{"type":51,"value":445},{"type":51,"value":1523}," commands, query your warehouse, and look up Bruin documentation - all without you having to copy-paste anything.",{"type":42,"tag":381,"props":1525,"children":1527},{"className":383,"code":1526,"language":385,"meta":7,"style":7},"claude mcp add bruin -- bruin mcp\n",[1528],{"type":42,"tag":240,"props":1529,"children":1530},{"__ignoreMap":7},[1531],{"type":42,"tag":391,"props":1532,"children":1533},{"class":393,"line":176},[1534,1539,1544,1549,1554,1559,1563],{"type":42,"tag":391,"props":1535,"children":1536},{"style":397},[1537],{"type":51,"value":1538},"claude",{"type":42,"tag":391,"props":1540,"children":1541},{"style":403},[1542],{"type":51,"value":1543}," mcp",{"type":42,"tag":391,"props":1545,"children":1546},{"style":403},[1547],{"type":51,"value":1548}," add",{"type":42,"tag":391,"props":1550,"children":1551},{"style":403},[1552],{"type":51,"value":1553}," bruin",{"type":42,"tag":391,"props":1555,"children":1556},{"style":415},[1557],{"type":51,"value":1558}," --",{"type":42,"tag":391,"props":1560,"children":1561},{"style":403},[1562],{"type":51,"value":1553},{"type":42,"tag":391,"props":1564,"children":1565},{"style":403},[1566],{"type":51,"value":1567}," mcp\n",{"type":42,"tag":43,"props":1569,"children":1570},{},[1571],{"type":51,"value":1572},"Restart your Claude Code session for the MCP to take effect. To verify it's working, open Claude Code in your project directory and ask:",{"type":42,"tag":1574,"props":1575,"children":1576},"blockquote",{},[1577],{"type":42,"tag":43,"props":1578,"children":1579},{},[1580],{"type":51,"value":1581},"What connections are available in this Bruin project?",{"type":42,"tag":43,"props":1583,"children":1584},{},[1585],{"type":51,"value":1586},"Claude Code should find and list the warehouse connection you just set up.",{"type":42,"tag":339,"props":1588,"children":1589},{},[1590],{"type":42,"tag":43,"props":1591,"children":1592},{},[1593,1598,1600,1606,1608,1614],{"type":42,"tag":47,"props":1594,"children":1595},{},[1596],{"type":51,"value":1597},"Using Cursor or Codex instead?",{"type":51,"value":1599}," For Cursor, add ",{"type":42,"tag":240,"props":1601,"children":1603},{"className":1602},[],[1604],{"type":51,"value":1605},"{\"mcpServers\": {\"bruin\": {\"command\": \"bruin\", \"args\": [\"mcp\"]}}}",{"type":51,"value":1607}," to your MCP settings. For Codex, run ",{"type":42,"tag":240,"props":1609,"children":1611},{"className":1610},[],[1612],{"type":51,"value":1613},"codex mcp add bruin -- bruin mcp",{"type":51,"value":1615},". The rest of this tutorial shows Claude Code prompts, but they work in any MCP-compatible tool.",{"type":42,"tag":361,"props":1617,"children":1619},{"id":1618},"_6-validate-with-claude-code",[1620],{"type":51,"value":1621},"6) Validate with Claude Code",{"type":42,"tag":43,"props":1623,"children":1624},{},[1625],{"type":51,"value":1626},"You can run the validation yourself:",{"type":42,"tag":381,"props":1628,"children":1630},{"className":383,"code":1629,"language":385,"meta":7,"style":7},"bruin validate .\n",[1631],{"type":42,"tag":240,"props":1632,"children":1633},{"__ignoreMap":7},[1634],{"type":42,"tag":391,"props":1635,"children":1636},{"class":393,"line":176},[1637,1641,1646],{"type":42,"tag":391,"props":1638,"children":1639},{"style":397},[1640],{"type":51,"value":445},{"type":42,"tag":391,"props":1642,"children":1643},{"style":403},[1644],{"type":51,"value":1645}," validate",{"type":42,"tag":391,"props":1647,"children":1648},{"style":403},[1649],{"type":51,"value":1650}," .\n",{"type":42,"tag":43,"props":1652,"children":1653},{},[1654],{"type":51,"value":1655},"Or just ask Claude Code to do it:",{"type":42,"tag":1574,"props":1657,"children":1658},{},[1659],{"type":42,"tag":43,"props":1660,"children":1661},{},[1662],{"type":51,"value":1663},"Run bruin validate on this project and tell me if there are any issues.",{"type":42,"tag":43,"props":1665,"children":1666},{},[1667],{"type":51,"value":1668},"A clean validation means your project structure, pipeline config, and connections are all correct. From here on, you can use Claude Code to run any Bruin command, create files, and write SQL - we'll show you how at each step.",{"type":42,"tag":86,"props":1670,"children":1672},{"id":1671},"what-just-happened",[1673],{"type":51,"value":1674},"What just happened",{"type":42,"tag":43,"props":1676,"children":1677},{},[1678],{"type":51,"value":1679},"You have a Bruin project connected to your data warehouse with Claude Code and the Bruin MCP set up. Claude Code can now inspect your pipeline, query your data, fetch Bruin docs, and help you build assets. Next up, you'll use it to create ingestor assets that pull data from your Shopify store and surrounding tools into your warehouse.",{"type":42,"tag":1681,"props":1682,"children":1683},"style",{},[1684],{"type":51,"value":1685},"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":7,"searchDepth":99,"depth":99,"links":1687},[1688,1689,1690,1691,1699],{"id":193,"depth":99,"text":196},{"id":204,"depth":99,"text":207},{"id":324,"depth":99,"text":327},{"id":356,"depth":99,"text":359,"children":1692},[1693,1694,1695,1696,1697,1698],{"id":363,"depth":439,"text":366},{"id":478,"depth":439,"text":481},{"id":553,"depth":439,"text":556},{"id":1232,"depth":439,"text":1235},{"id":1508,"depth":439,"text":1511},{"id":1618,"depth":439,"text":1621},{"id":1671,"depth":99,"text":1674},"content:tutorials:ecommerce-pipeline:project-setup.md","tutorials\u002Fecommerce-pipeline\u002Fproject-setup.md","tutorials\u002Fecommerce-pipeline\u002Fproject-setup",{"_path":1704,"_dir":12,"_draft":6,"_partial":6,"_locale":7,"title":1705,"description":1706,"date":10,"readingTime":1707,"category":166,"tags":1708,"difficulty":175,"module":12,"subSteps":13,"step":99,"variants":1719,"journeys":1721,"learnMore":1722,"author":1731,"body":1732,"_type":102,"_id":6365,"_source":104,"_file":6366,"_stem":6367,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline\u002Fingest-data","Ingest Your Ecommerce Data","Connect your Shopify store and surrounding tools to Bruin, and create ingestor assets that pull data into your warehouse automatically.",15,[168,169,1709,170,1710,1711,1712,1713,1714,1715,1716,1717,1718,174],"Bruin Ingestr","Shopify","Stripe","Klaviyo","HubSpot","Facebook Ads","Google Ads","TikTok Ads","Google Analytics","Mixpanel",[1712,1713,1714,1715,1716,1720,1718],"GA4",[179,180],[1723,1726,1728],{"label":1724,"url":1725},"Ingestr asset reference","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fassets\u002Fingestr.html",{"label":1727,"url":30},"Bruin connections",{"label":1729,"url":1730},"Incremental loading strategies","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fassets\u002Fingestr.html#incremental-strategies",{"name":35,"role":36,"image":37},{"type":39,"children":1733,"toc":6348},[1734,1738,1743,1747,1752,1766,1772,1777,1785,1790,1794,1800,1805,1958,1962,1968,1989,1993,2057,2064,2077,2687,2711,2714,2720,3460,3463,3469,4314,4317,4323,5337,5340,5346,6045,6048,6054,6059,6080,6085,6093,6098,6103,6146,6179,6199,6247,6252,6292,6298,6303,6311,6316,6324,6328,6339,6344],{"type":42,"tag":86,"props":1735,"children":1736},{"id":193},[1737],{"type":51,"value":196},{"type":42,"tag":43,"props":1739,"children":1740},{},[1741],{"type":51,"value":1742},"Create ingestor assets for your Shopify store and the tools around it. Each asset pulls data from a SaaS tool into your warehouse on schedule.",{"type":42,"tag":86,"props":1744,"children":1745},{"id":324},[1746],{"type":51,"value":327},{"type":42,"tag":43,"props":1748,"children":1749},{},[1750],{"type":51,"value":1751},"A Shopify store has data spread across many tools: orders and products in Shopify, payments in Stripe or Shopify Payments, email engagement in your marketing platform, ad performance in your ad platform, and website traffic in your analytics tool. Getting all of this into one warehouse is the foundation for every report you'll build later.",{"type":42,"tag":43,"props":1753,"children":1754},{},[1755,1757,1764],{"type":51,"value":1756},"Bruin's ingestor assets use ",{"type":42,"tag":229,"props":1758,"children":1761},{"href":1759,"rel":1760},"https:\u002F\u002Fbruin-data.github.io\u002Fingestr\u002F",[233],[1762],{"type":51,"value":1763},"ingestr",{"type":51,"value":1765}," under the hood - an open-source tool with 100+ built-in connectors. You define what to pull in a simple YAML file, and Bruin handles scheduling, incremental loading, and dependency management.",{"type":42,"tag":361,"props":1767,"children":1769},{"id":1768},"let-claude-code-create-the-asset-files",[1770],{"type":51,"value":1771},"Let Claude Code create the asset files",{"type":42,"tag":43,"props":1773,"children":1774},{},[1775],{"type":51,"value":1776},"You can create each ingestor asset file manually (shown below), or ask Claude Code to do it for you:",{"type":42,"tag":1574,"props":1778,"children":1779},{},[1780],{"type":42,"tag":43,"props":1781,"children":1782},{},[1783],{"type":51,"value":1784},"Look at the Bruin ingestr docs and create ingestor assets for Shopify orders, customers, products, and inventory_levels. Use merge strategy with updated_at for the first three, and replace for inventory. Use my warehouse connection as destination. Put them in ecommerce\u002Fassets\u002F.",{"type":42,"tag":43,"props":1786,"children":1787},{},[1788],{"type":51,"value":1789},"Below we show the files so you can see what they look like, but feel free to have Claude Code generate them.",{"type":42,"tag":86,"props":1791,"children":1792},{"id":356},[1793],{"type":51,"value":359},{"type":42,"tag":361,"props":1795,"children":1797},{"id":1796},"optional-install-source-mcps",[1798],{"type":51,"value":1799},"Optional: install source MCPs",{"type":42,"tag":43,"props":1801,"children":1802},{},[1803],{"type":51,"value":1804},"These platforms offer their own MCP servers that let Claude Code explore available tables and schemas before you write ingestor assets. Not required, but useful.",{"type":42,"tag":563,"props":1806,"children":1808},{":variants":1807},"[{\"id\":\"shopify-mcp\",\"label\":\"Shopify\"},{\"id\":\"stripe-mcp\",\"label\":\"Stripe\"},{\"id\":\"klaviyo-mcp\",\"label\":\"Klaviyo\"},{\"id\":\"facebook-mcp\",\"label\":\"Facebook Ads\"},{\"id\":\"ga4-mcp\",\"label\":\"GA4\"}]",[1809,1842,1884,1906,1938],{"type":42,"tag":569,"props":1810,"children":1811},{"v-slot:shopify-mcp":7},[1812,1822],{"type":42,"tag":43,"props":1813,"children":1814},{},[1815],{"type":42,"tag":229,"props":1816,"children":1819},{"href":1817,"rel":1818},"https:\u002F\u002Fshopify.dev\u002Fdocs\u002Fapps\u002Fbuild\u002Fdevmcp",[233],[1820],{"type":51,"value":1821},"Official Dev MCP",{"type":42,"tag":381,"props":1823,"children":1825},{"className":383,"code":1824,"language":385,"meta":7,"style":7},"npx @shopify\u002Fdev-mcp@latest\n",[1826],{"type":42,"tag":240,"props":1827,"children":1828},{"__ignoreMap":7},[1829],{"type":42,"tag":391,"props":1830,"children":1831},{"class":393,"line":176},[1832,1837],{"type":42,"tag":391,"props":1833,"children":1834},{"style":397},[1835],{"type":51,"value":1836},"npx",{"type":42,"tag":391,"props":1838,"children":1839},{"style":403},[1840],{"type":51,"value":1841}," @shopify\u002Fdev-mcp@latest\n",{"type":42,"tag":569,"props":1843,"children":1844},{"v-slot:stripe-mcp":7},[1845,1855],{"type":42,"tag":43,"props":1846,"children":1847},{},[1848],{"type":42,"tag":229,"props":1849,"children":1852},{"href":1850,"rel":1851},"https:\u002F\u002Fdocs.stripe.com\u002Fmcp",[233],[1853],{"type":51,"value":1854},"Official MCP",{"type":42,"tag":381,"props":1856,"children":1858},{"className":383,"code":1857,"language":385,"meta":7,"style":7},"npx -y @stripe\u002Fmcp --api-key=sk_...\n",[1859],{"type":42,"tag":240,"props":1860,"children":1861},{"__ignoreMap":7},[1862],{"type":42,"tag":391,"props":1863,"children":1864},{"class":393,"line":176},[1865,1869,1874,1879],{"type":42,"tag":391,"props":1866,"children":1867},{"style":397},[1868],{"type":51,"value":1836},{"type":42,"tag":391,"props":1870,"children":1871},{"style":415},[1872],{"type":51,"value":1873}," -y",{"type":42,"tag":391,"props":1875,"children":1876},{"style":403},[1877],{"type":51,"value":1878}," @stripe\u002Fmcp",{"type":42,"tag":391,"props":1880,"children":1881},{"style":415},[1882],{"type":51,"value":1883}," --api-key=sk_...\n",{"type":42,"tag":569,"props":1885,"children":1886},{"v-slot:klaviyo-mcp":7},[1887],{"type":42,"tag":43,"props":1888,"children":1889},{},[1890,1896,1898,1904],{"type":42,"tag":229,"props":1891,"children":1894},{"href":1892,"rel":1893},"https:\u002F\u002Fdevelopers.klaviyo.com\u002Fen\u002Fdocs\u002Fklaviyo_mcp_server",[233],[1895],{"type":51,"value":1854},{"type":51,"value":1897}," - see ",{"type":42,"tag":229,"props":1899,"children":1901},{"href":1892,"rel":1900},[233],[1902],{"type":51,"value":1903},"Klaviyo MCP docs",{"type":51,"value":1905}," for setup.",{"type":42,"tag":569,"props":1907,"children":1908},{"v-slot:facebook-mcp":7},[1909,1919],{"type":42,"tag":43,"props":1910,"children":1911},{},[1912],{"type":42,"tag":229,"props":1913,"children":1916},{"href":1914,"rel":1915},"https:\u002F\u002Fgithub.com\u002Fpipeboard-co\u002Fmeta-ads-mcp",[233],[1917],{"type":51,"value":1918},"Community MCP",{"type":42,"tag":381,"props":1920,"children":1922},{"className":383,"code":1921,"language":385,"meta":7,"style":7},"npx meta-ads-mcp@latest\n",[1923],{"type":42,"tag":240,"props":1924,"children":1925},{"__ignoreMap":7},[1926],{"type":42,"tag":391,"props":1927,"children":1928},{"class":393,"line":176},[1929,1933],{"type":42,"tag":391,"props":1930,"children":1931},{"style":397},[1932],{"type":51,"value":1836},{"type":42,"tag":391,"props":1934,"children":1935},{"style":403},[1936],{"type":51,"value":1937}," meta-ads-mcp@latest\n",{"type":42,"tag":569,"props":1939,"children":1940},{"v-slot:ga4-mcp":7},[1941],{"type":42,"tag":43,"props":1942,"children":1943},{},[1944,1950,1951,1957],{"type":42,"tag":229,"props":1945,"children":1948},{"href":1946,"rel":1947},"https:\u002F\u002Fdevelopers.google.com\u002Fanalytics\u002Fdevguides\u002FMCP",[233],[1949],{"type":51,"value":1854},{"type":51,"value":1897},{"type":42,"tag":229,"props":1952,"children":1954},{"href":1946,"rel":1953},[233],[1955],{"type":51,"value":1956},"Google Analytics MCP docs",{"type":51,"value":1905},{"type":42,"tag":1959,"props":1960,"children":1961},"hr",{},[],{"type":42,"tag":361,"props":1963,"children":1965},{"id":1964},"add-the-shopify-connection",[1966],{"type":51,"value":1967},"Add the Shopify connection",{"type":42,"tag":381,"props":1969,"children":1970},{"className":383,"code":617,"language":385,"meta":7,"style":7},[1971],{"type":42,"tag":240,"props":1972,"children":1973},{"__ignoreMap":7},[1974],{"type":42,"tag":391,"props":1975,"children":1976},{"class":393,"line":176},[1977,1981,1985],{"type":42,"tag":391,"props":1978,"children":1979},{"style":397},[1980],{"type":51,"value":445},{"type":42,"tag":391,"props":1982,"children":1983},{"style":403},[1984],{"type":51,"value":633},{"type":42,"tag":391,"props":1986,"children":1987},{"style":403},[1988],{"type":51,"value":638},{"type":42,"tag":43,"props":1990,"children":1991},{},[1992],{"type":51,"value":643},{"type":42,"tag":214,"props":1994,"children":1995},{},[1996,2010,2023,2040],{"type":42,"tag":218,"props":1997,"children":1998},{},[1999,2003,2004],{"type":42,"tag":47,"props":2000,"children":2001},{},[2002],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":2005,"children":2007},{"className":2006},[],[2008],{"type":51,"value":2009},"shopify",{"type":42,"tag":218,"props":2011,"children":2012},{},[2013,2017,2018],{"type":42,"tag":47,"props":2014,"children":2015},{},[2016],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":2019,"children":2021},{"className":2020},[],[2022],{"type":51,"value":2009},{"type":42,"tag":218,"props":2024,"children":2025},{},[2026,2031,2033],{"type":42,"tag":47,"props":2027,"children":2028},{},[2029],{"type":51,"value":2030},"API key, API secret, access token:",{"type":51,"value":2032}," from your ",{"type":42,"tag":229,"props":2034,"children":2037},{"href":2035,"rel":2036},"https:\u002F\u002Fshopify.dev\u002Fdocs\u002Fapps\u002Fgetting-started",[233],[2038],{"type":51,"value":2039},"Shopify app credentials",{"type":42,"tag":218,"props":2041,"children":2042},{},[2043,2048,2050,2056],{"type":42,"tag":47,"props":2044,"children":2045},{},[2046],{"type":51,"value":2047},"Shop:",{"type":51,"value":2049}," your store name (without ",{"type":42,"tag":240,"props":2051,"children":2053},{"className":2052},[],[2054],{"type":51,"value":2055},".myshopify.com",{"type":51,"value":1145},{"type":42,"tag":2058,"props":2059,"children":2061},"h4",{"id":2060},"create-ingestor-assets",[2062],{"type":51,"value":2063},"Create ingestor assets",{"type":42,"tag":43,"props":2065,"children":2066},{},[2067,2069,2075],{"type":51,"value":2068},"Create a file for each table you want to ingest. These go in your ",{"type":42,"tag":240,"props":2070,"children":2072},{"className":2071},[],[2073],{"type":51,"value":2074},"ecommerce\u002Fassets\u002F",{"type":51,"value":2076}," folder.",{"type":42,"tag":563,"props":2078,"children":2080},{":variants":2079},"[{\"id\":\"shopify-orders\",\"label\":\"Orders\"},{\"id\":\"shopify-customers\",\"label\":\"Customers\"},{\"id\":\"shopify-products\",\"label\":\"Products\"},{\"id\":\"shopify-inventory\",\"label\":\"Inventory\"}]",[2081,2251,2406,2561],{"type":42,"tag":569,"props":2082,"children":2083},{"v-slot:shopify-orders":7},[2084,2096],{"type":42,"tag":43,"props":2085,"children":2086},{},[2087],{"type":42,"tag":47,"props":2088,"children":2089},{},[2090],{"type":42,"tag":240,"props":2091,"children":2093},{"className":2092},[],[2094],{"type":51,"value":2095},"ecommerce\u002Fassets\u002Fshopify_orders.asset.yml",{"type":42,"tag":381,"props":2097,"children":2099},{"className":900,"code":2098,"language":902,"meta":7,"style":7},"name: raw.shopify_orders\ntype: ingestr\nparameters:\n  source_connection: shopify\n  source_table: orders\n  loader_file_format: jsonl\n  incremental_strategy: merge\n  incremental_key: updated_at\n  primary_key: id\n",[2100],{"type":42,"tag":240,"props":2101,"children":2102},{"__ignoreMap":7},[2103,2119,2136,2148,2165,2182,2199,2216,2233],{"type":42,"tag":391,"props":2104,"children":2105},{"class":393,"line":176},[2106,2110,2114],{"type":42,"tag":391,"props":2107,"children":2108},{"style":912},[2109],{"type":51,"value":971},{"type":42,"tag":391,"props":2111,"children":2112},{"style":409},[2113],{"type":51,"value":976},{"type":42,"tag":391,"props":2115,"children":2116},{"style":403},[2117],{"type":51,"value":2118},"raw.shopify_orders\n",{"type":42,"tag":391,"props":2120,"children":2121},{"class":393,"line":99},[2122,2127,2131],{"type":42,"tag":391,"props":2123,"children":2124},{"style":912},[2125],{"type":51,"value":2126},"type",{"type":42,"tag":391,"props":2128,"children":2129},{"style":409},[2130],{"type":51,"value":976},{"type":42,"tag":391,"props":2132,"children":2133},{"style":403},[2134],{"type":51,"value":2135},"ingestr\n",{"type":42,"tag":391,"props":2137,"children":2138},{"class":393,"line":439},[2139,2144],{"type":42,"tag":391,"props":2140,"children":2141},{"style":912},[2142],{"type":51,"value":2143},"parameters",{"type":42,"tag":391,"props":2145,"children":2146},{"style":409},[2147],{"type":51,"value":920},{"type":42,"tag":391,"props":2149,"children":2150},{"class":393,"line":947},[2151,2156,2160],{"type":42,"tag":391,"props":2152,"children":2153},{"style":912},[2154],{"type":51,"value":2155},"  source_connection",{"type":42,"tag":391,"props":2157,"children":2158},{"style":409},[2159],{"type":51,"value":976},{"type":42,"tag":391,"props":2161,"children":2162},{"style":403},[2163],{"type":51,"value":2164},"shopify\n",{"type":42,"tag":391,"props":2166,"children":2167},{"class":393,"line":960},[2168,2173,2177],{"type":42,"tag":391,"props":2169,"children":2170},{"style":912},[2171],{"type":51,"value":2172},"  source_table",{"type":42,"tag":391,"props":2174,"children":2175},{"style":409},[2176],{"type":51,"value":976},{"type":42,"tag":391,"props":2178,"children":2179},{"style":403},[2180],{"type":51,"value":2181},"orders\n",{"type":42,"tag":391,"props":2183,"children":2184},{"class":393,"line":984},[2185,2190,2194],{"type":42,"tag":391,"props":2186,"children":2187},{"style":912},[2188],{"type":51,"value":2189},"  loader_file_format",{"type":42,"tag":391,"props":2191,"children":2192},{"style":409},[2193],{"type":51,"value":976},{"type":42,"tag":391,"props":2195,"children":2196},{"style":403},[2197],{"type":51,"value":2198},"jsonl\n",{"type":42,"tag":391,"props":2200,"children":2201},{"class":393,"line":1002},[2202,2207,2211],{"type":42,"tag":391,"props":2203,"children":2204},{"style":912},[2205],{"type":51,"value":2206},"  incremental_strategy",{"type":42,"tag":391,"props":2208,"children":2209},{"style":409},[2210],{"type":51,"value":976},{"type":42,"tag":391,"props":2212,"children":2213},{"style":403},[2214],{"type":51,"value":2215},"merge\n",{"type":42,"tag":391,"props":2217,"children":2218},{"class":393,"line":165},[2219,2224,2228],{"type":42,"tag":391,"props":2220,"children":2221},{"style":912},[2222],{"type":51,"value":2223},"  incremental_key",{"type":42,"tag":391,"props":2225,"children":2226},{"style":409},[2227],{"type":51,"value":976},{"type":42,"tag":391,"props":2229,"children":2230},{"style":403},[2231],{"type":51,"value":2232},"updated_at\n",{"type":42,"tag":391,"props":2234,"children":2236},{"class":393,"line":2235},9,[2237,2242,2246],{"type":42,"tag":391,"props":2238,"children":2239},{"style":912},[2240],{"type":51,"value":2241},"  primary_key",{"type":42,"tag":391,"props":2243,"children":2244},{"style":409},[2245],{"type":51,"value":976},{"type":42,"tag":391,"props":2247,"children":2248},{"style":403},[2249],{"type":51,"value":2250},"id\n",{"type":42,"tag":569,"props":2252,"children":2253},{"v-slot:shopify-customers":7},[2254,2266],{"type":42,"tag":43,"props":2255,"children":2256},{},[2257],{"type":42,"tag":47,"props":2258,"children":2259},{},[2260],{"type":42,"tag":240,"props":2261,"children":2263},{"className":2262},[],[2264],{"type":51,"value":2265},"ecommerce\u002Fassets\u002Fshopify_customers.asset.yml",{"type":42,"tag":381,"props":2267,"children":2269},{"className":900,"code":2268,"language":902,"meta":7,"style":7},"name: raw.shopify_customers\ntype: ingestr\nparameters:\n  source_connection: shopify\n  source_table: customers\n  loader_file_format: jsonl\n  incremental_strategy: merge\n  incremental_key: updated_at\n  primary_key: id\n",[2270],{"type":42,"tag":240,"props":2271,"children":2272},{"__ignoreMap":7},[2273,2289,2304,2315,2330,2346,2361,2376,2391],{"type":42,"tag":391,"props":2274,"children":2275},{"class":393,"line":176},[2276,2280,2284],{"type":42,"tag":391,"props":2277,"children":2278},{"style":912},[2279],{"type":51,"value":971},{"type":42,"tag":391,"props":2281,"children":2282},{"style":409},[2283],{"type":51,"value":976},{"type":42,"tag":391,"props":2285,"children":2286},{"style":403},[2287],{"type":51,"value":2288},"raw.shopify_customers\n",{"type":42,"tag":391,"props":2290,"children":2291},{"class":393,"line":99},[2292,2296,2300],{"type":42,"tag":391,"props":2293,"children":2294},{"style":912},[2295],{"type":51,"value":2126},{"type":42,"tag":391,"props":2297,"children":2298},{"style":409},[2299],{"type":51,"value":976},{"type":42,"tag":391,"props":2301,"children":2302},{"style":403},[2303],{"type":51,"value":2135},{"type":42,"tag":391,"props":2305,"children":2306},{"class":393,"line":439},[2307,2311],{"type":42,"tag":391,"props":2308,"children":2309},{"style":912},[2310],{"type":51,"value":2143},{"type":42,"tag":391,"props":2312,"children":2313},{"style":409},[2314],{"type":51,"value":920},{"type":42,"tag":391,"props":2316,"children":2317},{"class":393,"line":947},[2318,2322,2326],{"type":42,"tag":391,"props":2319,"children":2320},{"style":912},[2321],{"type":51,"value":2155},{"type":42,"tag":391,"props":2323,"children":2324},{"style":409},[2325],{"type":51,"value":976},{"type":42,"tag":391,"props":2327,"children":2328},{"style":403},[2329],{"type":51,"value":2164},{"type":42,"tag":391,"props":2331,"children":2332},{"class":393,"line":960},[2333,2337,2341],{"type":42,"tag":391,"props":2334,"children":2335},{"style":912},[2336],{"type":51,"value":2172},{"type":42,"tag":391,"props":2338,"children":2339},{"style":409},[2340],{"type":51,"value":976},{"type":42,"tag":391,"props":2342,"children":2343},{"style":403},[2344],{"type":51,"value":2345},"customers\n",{"type":42,"tag":391,"props":2347,"children":2348},{"class":393,"line":984},[2349,2353,2357],{"type":42,"tag":391,"props":2350,"children":2351},{"style":912},[2352],{"type":51,"value":2189},{"type":42,"tag":391,"props":2354,"children":2355},{"style":409},[2356],{"type":51,"value":976},{"type":42,"tag":391,"props":2358,"children":2359},{"style":403},[2360],{"type":51,"value":2198},{"type":42,"tag":391,"props":2362,"children":2363},{"class":393,"line":1002},[2364,2368,2372],{"type":42,"tag":391,"props":2365,"children":2366},{"style":912},[2367],{"type":51,"value":2206},{"type":42,"tag":391,"props":2369,"children":2370},{"style":409},[2371],{"type":51,"value":976},{"type":42,"tag":391,"props":2373,"children":2374},{"style":403},[2375],{"type":51,"value":2215},{"type":42,"tag":391,"props":2377,"children":2378},{"class":393,"line":165},[2379,2383,2387],{"type":42,"tag":391,"props":2380,"children":2381},{"style":912},[2382],{"type":51,"value":2223},{"type":42,"tag":391,"props":2384,"children":2385},{"style":409},[2386],{"type":51,"value":976},{"type":42,"tag":391,"props":2388,"children":2389},{"style":403},[2390],{"type":51,"value":2232},{"type":42,"tag":391,"props":2392,"children":2393},{"class":393,"line":2235},[2394,2398,2402],{"type":42,"tag":391,"props":2395,"children":2396},{"style":912},[2397],{"type":51,"value":2241},{"type":42,"tag":391,"props":2399,"children":2400},{"style":409},[2401],{"type":51,"value":976},{"type":42,"tag":391,"props":2403,"children":2404},{"style":403},[2405],{"type":51,"value":2250},{"type":42,"tag":569,"props":2407,"children":2408},{"v-slot:shopify-products":7},[2409,2421],{"type":42,"tag":43,"props":2410,"children":2411},{},[2412],{"type":42,"tag":47,"props":2413,"children":2414},{},[2415],{"type":42,"tag":240,"props":2416,"children":2418},{"className":2417},[],[2419],{"type":51,"value":2420},"ecommerce\u002Fassets\u002Fshopify_products.asset.yml",{"type":42,"tag":381,"props":2422,"children":2424},{"className":900,"code":2423,"language":902,"meta":7,"style":7},"name: raw.shopify_products\ntype: ingestr\nparameters:\n  source_connection: shopify\n  source_table: products\n  loader_file_format: jsonl\n  incremental_strategy: merge\n  incremental_key: updated_at\n  primary_key: id\n",[2425],{"type":42,"tag":240,"props":2426,"children":2427},{"__ignoreMap":7},[2428,2444,2459,2470,2485,2501,2516,2531,2546],{"type":42,"tag":391,"props":2429,"children":2430},{"class":393,"line":176},[2431,2435,2439],{"type":42,"tag":391,"props":2432,"children":2433},{"style":912},[2434],{"type":51,"value":971},{"type":42,"tag":391,"props":2436,"children":2437},{"style":409},[2438],{"type":51,"value":976},{"type":42,"tag":391,"props":2440,"children":2441},{"style":403},[2442],{"type":51,"value":2443},"raw.shopify_products\n",{"type":42,"tag":391,"props":2445,"children":2446},{"class":393,"line":99},[2447,2451,2455],{"type":42,"tag":391,"props":2448,"children":2449},{"style":912},[2450],{"type":51,"value":2126},{"type":42,"tag":391,"props":2452,"children":2453},{"style":409},[2454],{"type":51,"value":976},{"type":42,"tag":391,"props":2456,"children":2457},{"style":403},[2458],{"type":51,"value":2135},{"type":42,"tag":391,"props":2460,"children":2461},{"class":393,"line":439},[2462,2466],{"type":42,"tag":391,"props":2463,"children":2464},{"style":912},[2465],{"type":51,"value":2143},{"type":42,"tag":391,"props":2467,"children":2468},{"style":409},[2469],{"type":51,"value":920},{"type":42,"tag":391,"props":2471,"children":2472},{"class":393,"line":947},[2473,2477,2481],{"type":42,"tag":391,"props":2474,"children":2475},{"style":912},[2476],{"type":51,"value":2155},{"type":42,"tag":391,"props":2478,"children":2479},{"style":409},[2480],{"type":51,"value":976},{"type":42,"tag":391,"props":2482,"children":2483},{"style":403},[2484],{"type":51,"value":2164},{"type":42,"tag":391,"props":2486,"children":2487},{"class":393,"line":960},[2488,2492,2496],{"type":42,"tag":391,"props":2489,"children":2490},{"style":912},[2491],{"type":51,"value":2172},{"type":42,"tag":391,"props":2493,"children":2494},{"style":409},[2495],{"type":51,"value":976},{"type":42,"tag":391,"props":2497,"children":2498},{"style":403},[2499],{"type":51,"value":2500},"products\n",{"type":42,"tag":391,"props":2502,"children":2503},{"class":393,"line":984},[2504,2508,2512],{"type":42,"tag":391,"props":2505,"children":2506},{"style":912},[2507],{"type":51,"value":2189},{"type":42,"tag":391,"props":2509,"children":2510},{"style":409},[2511],{"type":51,"value":976},{"type":42,"tag":391,"props":2513,"children":2514},{"style":403},[2515],{"type":51,"value":2198},{"type":42,"tag":391,"props":2517,"children":2518},{"class":393,"line":1002},[2519,2523,2527],{"type":42,"tag":391,"props":2520,"children":2521},{"style":912},[2522],{"type":51,"value":2206},{"type":42,"tag":391,"props":2524,"children":2525},{"style":409},[2526],{"type":51,"value":976},{"type":42,"tag":391,"props":2528,"children":2529},{"style":403},[2530],{"type":51,"value":2215},{"type":42,"tag":391,"props":2532,"children":2533},{"class":393,"line":165},[2534,2538,2542],{"type":42,"tag":391,"props":2535,"children":2536},{"style":912},[2537],{"type":51,"value":2223},{"type":42,"tag":391,"props":2539,"children":2540},{"style":409},[2541],{"type":51,"value":976},{"type":42,"tag":391,"props":2543,"children":2544},{"style":403},[2545],{"type":51,"value":2232},{"type":42,"tag":391,"props":2547,"children":2548},{"class":393,"line":2235},[2549,2553,2557],{"type":42,"tag":391,"props":2550,"children":2551},{"style":912},[2552],{"type":51,"value":2241},{"type":42,"tag":391,"props":2554,"children":2555},{"style":409},[2556],{"type":51,"value":976},{"type":42,"tag":391,"props":2558,"children":2559},{"style":403},[2560],{"type":51,"value":2250},{"type":42,"tag":569,"props":2562,"children":2563},{"v-slot:shopify-inventory":7},[2564,2576],{"type":42,"tag":43,"props":2565,"children":2566},{},[2567],{"type":42,"tag":47,"props":2568,"children":2569},{},[2570],{"type":42,"tag":240,"props":2571,"children":2573},{"className":2572},[],[2574],{"type":51,"value":2575},"ecommerce\u002Fassets\u002Fshopify_inventory.asset.yml",{"type":42,"tag":381,"props":2577,"children":2579},{"className":900,"code":2578,"language":902,"meta":7,"style":7},"name: raw.shopify_inventory\ntype: ingestr\nparameters:\n  source_connection: shopify\n  source_table: inventory_levels\n  loader_file_format: jsonl\n  incremental_strategy: replace\n",[2580],{"type":42,"tag":240,"props":2581,"children":2582},{"__ignoreMap":7},[2583,2599,2614,2625,2640,2656,2671],{"type":42,"tag":391,"props":2584,"children":2585},{"class":393,"line":176},[2586,2590,2594],{"type":42,"tag":391,"props":2587,"children":2588},{"style":912},[2589],{"type":51,"value":971},{"type":42,"tag":391,"props":2591,"children":2592},{"style":409},[2593],{"type":51,"value":976},{"type":42,"tag":391,"props":2595,"children":2596},{"style":403},[2597],{"type":51,"value":2598},"raw.shopify_inventory\n",{"type":42,"tag":391,"props":2600,"children":2601},{"class":393,"line":99},[2602,2606,2610],{"type":42,"tag":391,"props":2603,"children":2604},{"style":912},[2605],{"type":51,"value":2126},{"type":42,"tag":391,"props":2607,"children":2608},{"style":409},[2609],{"type":51,"value":976},{"type":42,"tag":391,"props":2611,"children":2612},{"style":403},[2613],{"type":51,"value":2135},{"type":42,"tag":391,"props":2615,"children":2616},{"class":393,"line":439},[2617,2621],{"type":42,"tag":391,"props":2618,"children":2619},{"style":912},[2620],{"type":51,"value":2143},{"type":42,"tag":391,"props":2622,"children":2623},{"style":409},[2624],{"type":51,"value":920},{"type":42,"tag":391,"props":2626,"children":2627},{"class":393,"line":947},[2628,2632,2636],{"type":42,"tag":391,"props":2629,"children":2630},{"style":912},[2631],{"type":51,"value":2155},{"type":42,"tag":391,"props":2633,"children":2634},{"style":409},[2635],{"type":51,"value":976},{"type":42,"tag":391,"props":2637,"children":2638},{"style":403},[2639],{"type":51,"value":2164},{"type":42,"tag":391,"props":2641,"children":2642},{"class":393,"line":960},[2643,2647,2651],{"type":42,"tag":391,"props":2644,"children":2645},{"style":912},[2646],{"type":51,"value":2172},{"type":42,"tag":391,"props":2648,"children":2649},{"style":409},[2650],{"type":51,"value":976},{"type":42,"tag":391,"props":2652,"children":2653},{"style":403},[2654],{"type":51,"value":2655},"inventory_levels\n",{"type":42,"tag":391,"props":2657,"children":2658},{"class":393,"line":984},[2659,2663,2667],{"type":42,"tag":391,"props":2660,"children":2661},{"style":912},[2662],{"type":51,"value":2189},{"type":42,"tag":391,"props":2664,"children":2665},{"style":409},[2666],{"type":51,"value":976},{"type":42,"tag":391,"props":2668,"children":2669},{"style":403},[2670],{"type":51,"value":2198},{"type":42,"tag":391,"props":2672,"children":2673},{"class":393,"line":1002},[2674,2678,2682],{"type":42,"tag":391,"props":2675,"children":2676},{"style":912},[2677],{"type":51,"value":2206},{"type":42,"tag":391,"props":2679,"children":2680},{"style":409},[2681],{"type":51,"value":976},{"type":42,"tag":391,"props":2683,"children":2684},{"style":403},[2685],{"type":51,"value":2686},"replace\n",{"type":42,"tag":339,"props":2688,"children":2690},{"type":2689},"tip",[2691],{"type":42,"tag":43,"props":2692,"children":2693},{},[2694,2696,2702,2704,2710],{"type":51,"value":2695},"If you installed the Shopify MCP, ask Claude Code to list all available Shopify tables and preview the schema for each one. This helps you decide if you want to ingest additional tables like ",{"type":42,"tag":240,"props":2697,"children":2699},{"className":2698},[],[2700],{"type":51,"value":2701},"transactions",{"type":51,"value":2703}," or ",{"type":42,"tag":240,"props":2705,"children":2707},{"className":2706},[],[2708],{"type":51,"value":2709},"fulfillments",{"type":51,"value":247},{"type":42,"tag":1959,"props":2712,"children":2713},{},[],{"type":42,"tag":361,"props":2715,"children":2717},{"id":2716},"payments",[2718],{"type":51,"value":2719},"Payments",{"type":42,"tag":563,"props":2721,"children":2723},{":variants":2722,"group":2716},"[{\"id\":\"shopify-payments\",\"label\":\"Shopify Payments\"},{\"id\":\"stripe\",\"label\":\"Stripe\"}]",[2724,2765],{"type":42,"tag":569,"props":2725,"children":2726},{"v-slot:shopify-payments":7},[2727,2733,2753],{"type":42,"tag":2058,"props":2728,"children":2730},{"id":2729},"shopify-payments",[2731],{"type":51,"value":2732},"Shopify Payments",{"type":42,"tag":43,"props":2734,"children":2735},{},[2736,2738,2744,2745,2751],{"type":51,"value":2737},"If you use Shopify Payments, your payment data is already included in Shopify's order data - the ",{"type":42,"tag":240,"props":2739,"children":2741},{"className":2740},[],[2742],{"type":51,"value":2743},"financial_status",{"type":51,"value":292},{"type":42,"tag":240,"props":2746,"children":2748},{"className":2747},[],[2749],{"type":51,"value":2750},"total_price",{"type":51,"value":2752},", and transaction fields are all part of the orders you just ingested. No extra connection or assets needed here.",{"type":42,"tag":43,"props":2754,"children":2755},{},[2756,2758,2764],{"type":51,"value":2757},"The staging layer in Step 3 will pull payment details directly from ",{"type":42,"tag":240,"props":2759,"children":2761},{"className":2760},[],[2762],{"type":51,"value":2763},"raw.shopify_orders",{"type":51,"value":247},{"type":42,"tag":569,"props":2766,"children":2767},{"v-slot:stripe":7},[2768,2773,2778,2786,2807,2811,2857,2865,3430],{"type":42,"tag":2058,"props":2769,"children":2771},{"id":2770},"stripe",[2772],{"type":51,"value":1711},{"type":42,"tag":43,"props":2774,"children":2775},{},[2776],{"type":51,"value":2777},"If you use Stripe as a separate payment processor, you'll want to ingest charge, refund, and payout data separately. This gives you more granular financial data than what Shopify includes in its orders.",{"type":42,"tag":43,"props":2779,"children":2780},{},[2781],{"type":42,"tag":47,"props":2782,"children":2783},{},[2784],{"type":51,"value":2785},"Add the Stripe connection:",{"type":42,"tag":381,"props":2787,"children":2788},{"className":383,"code":617,"language":385,"meta":7,"style":7},[2789],{"type":42,"tag":240,"props":2790,"children":2791},{"__ignoreMap":7},[2792],{"type":42,"tag":391,"props":2793,"children":2794},{"class":393,"line":176},[2795,2799,2803],{"type":42,"tag":391,"props":2796,"children":2797},{"style":397},[2798],{"type":51,"value":445},{"type":42,"tag":391,"props":2800,"children":2801},{"style":403},[2802],{"type":51,"value":633},{"type":42,"tag":391,"props":2804,"children":2805},{"style":403},[2806],{"type":51,"value":638},{"type":42,"tag":43,"props":2808,"children":2809},{},[2810],{"type":51,"value":643},{"type":42,"tag":214,"props":2812,"children":2813},{},[2814,2827,2840],{"type":42,"tag":218,"props":2815,"children":2816},{},[2817,2821,2822],{"type":42,"tag":47,"props":2818,"children":2819},{},[2820],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":2823,"children":2825},{"className":2824},[],[2826],{"type":51,"value":2770},{"type":42,"tag":218,"props":2828,"children":2829},{},[2830,2834,2835],{"type":42,"tag":47,"props":2831,"children":2832},{},[2833],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":2836,"children":2838},{"className":2837},[],[2839],{"type":51,"value":2770},{"type":42,"tag":218,"props":2841,"children":2842},{},[2843,2848,2850,2856],{"type":42,"tag":47,"props":2844,"children":2845},{},[2846],{"type":51,"value":2847},"API key:",{"type":51,"value":2849}," your Stripe secret key (starts with ",{"type":42,"tag":240,"props":2851,"children":2853},{"className":2852},[],[2854],{"type":51,"value":2855},"sk_",{"type":51,"value":1145},{"type":42,"tag":43,"props":2858,"children":2859},{},[2860],{"type":42,"tag":47,"props":2861,"children":2862},{},[2863],{"type":51,"value":2864},"Create ingestor assets:",{"type":42,"tag":563,"props":2866,"children":2868},{":variants":2867},"[{\"id\":\"stripe-charges\",\"label\":\"Charges\"},{\"id\":\"stripe-refunds\",\"label\":\"Refunds\"},{\"id\":\"stripe-customers\",\"label\":\"Customers\"},{\"id\":\"stripe-payouts\",\"label\":\"Payouts\"}]",[2869,3011,3151,3290],{"type":42,"tag":569,"props":2870,"children":2871},{"v-slot:stripe-charges":7},[2872,2884],{"type":42,"tag":43,"props":2873,"children":2874},{},[2875],{"type":42,"tag":47,"props":2876,"children":2877},{},[2878],{"type":42,"tag":240,"props":2879,"children":2881},{"className":2880},[],[2882],{"type":51,"value":2883},"ecommerce\u002Fassets\u002Fstripe_charges.asset.yml",{"type":42,"tag":381,"props":2885,"children":2887},{"className":900,"code":2886,"language":902,"meta":7,"style":7},"name: raw.stripe_charges\ntype: ingestr\nparameters:\n  source_connection: stripe\n  source_table: charges\n  incremental_strategy: merge\n  incremental_key: created\n  primary_key: id\n",[2888],{"type":42,"tag":240,"props":2889,"children":2890},{"__ignoreMap":7},[2891,2907,2922,2933,2949,2965,2980,2996],{"type":42,"tag":391,"props":2892,"children":2893},{"class":393,"line":176},[2894,2898,2902],{"type":42,"tag":391,"props":2895,"children":2896},{"style":912},[2897],{"type":51,"value":971},{"type":42,"tag":391,"props":2899,"children":2900},{"style":409},[2901],{"type":51,"value":976},{"type":42,"tag":391,"props":2903,"children":2904},{"style":403},[2905],{"type":51,"value":2906},"raw.stripe_charges\n",{"type":42,"tag":391,"props":2908,"children":2909},{"class":393,"line":99},[2910,2914,2918],{"type":42,"tag":391,"props":2911,"children":2912},{"style":912},[2913],{"type":51,"value":2126},{"type":42,"tag":391,"props":2915,"children":2916},{"style":409},[2917],{"type":51,"value":976},{"type":42,"tag":391,"props":2919,"children":2920},{"style":403},[2921],{"type":51,"value":2135},{"type":42,"tag":391,"props":2923,"children":2924},{"class":393,"line":439},[2925,2929],{"type":42,"tag":391,"props":2926,"children":2927},{"style":912},[2928],{"type":51,"value":2143},{"type":42,"tag":391,"props":2930,"children":2931},{"style":409},[2932],{"type":51,"value":920},{"type":42,"tag":391,"props":2934,"children":2935},{"class":393,"line":947},[2936,2940,2944],{"type":42,"tag":391,"props":2937,"children":2938},{"style":912},[2939],{"type":51,"value":2155},{"type":42,"tag":391,"props":2941,"children":2942},{"style":409},[2943],{"type":51,"value":976},{"type":42,"tag":391,"props":2945,"children":2946},{"style":403},[2947],{"type":51,"value":2948},"stripe\n",{"type":42,"tag":391,"props":2950,"children":2951},{"class":393,"line":960},[2952,2956,2960],{"type":42,"tag":391,"props":2953,"children":2954},{"style":912},[2955],{"type":51,"value":2172},{"type":42,"tag":391,"props":2957,"children":2958},{"style":409},[2959],{"type":51,"value":976},{"type":42,"tag":391,"props":2961,"children":2962},{"style":403},[2963],{"type":51,"value":2964},"charges\n",{"type":42,"tag":391,"props":2966,"children":2967},{"class":393,"line":984},[2968,2972,2976],{"type":42,"tag":391,"props":2969,"children":2970},{"style":912},[2971],{"type":51,"value":2206},{"type":42,"tag":391,"props":2973,"children":2974},{"style":409},[2975],{"type":51,"value":976},{"type":42,"tag":391,"props":2977,"children":2978},{"style":403},[2979],{"type":51,"value":2215},{"type":42,"tag":391,"props":2981,"children":2982},{"class":393,"line":1002},[2983,2987,2991],{"type":42,"tag":391,"props":2984,"children":2985},{"style":912},[2986],{"type":51,"value":2223},{"type":42,"tag":391,"props":2988,"children":2989},{"style":409},[2990],{"type":51,"value":976},{"type":42,"tag":391,"props":2992,"children":2993},{"style":403},[2994],{"type":51,"value":2995},"created\n",{"type":42,"tag":391,"props":2997,"children":2998},{"class":393,"line":165},[2999,3003,3007],{"type":42,"tag":391,"props":3000,"children":3001},{"style":912},[3002],{"type":51,"value":2241},{"type":42,"tag":391,"props":3004,"children":3005},{"style":409},[3006],{"type":51,"value":976},{"type":42,"tag":391,"props":3008,"children":3009},{"style":403},[3010],{"type":51,"value":2250},{"type":42,"tag":569,"props":3012,"children":3013},{"v-slot:stripe-refunds":7},[3014,3026],{"type":42,"tag":43,"props":3015,"children":3016},{},[3017],{"type":42,"tag":47,"props":3018,"children":3019},{},[3020],{"type":42,"tag":240,"props":3021,"children":3023},{"className":3022},[],[3024],{"type":51,"value":3025},"ecommerce\u002Fassets\u002Fstripe_refunds.asset.yml",{"type":42,"tag":381,"props":3027,"children":3029},{"className":900,"code":3028,"language":902,"meta":7,"style":7},"name: raw.stripe_refunds\ntype: ingestr\nparameters:\n  source_connection: stripe\n  source_table: refunds\n  incremental_strategy: merge\n  incremental_key: created\n  primary_key: id\n",[3030],{"type":42,"tag":240,"props":3031,"children":3032},{"__ignoreMap":7},[3033,3049,3064,3075,3090,3106,3121,3136],{"type":42,"tag":391,"props":3034,"children":3035},{"class":393,"line":176},[3036,3040,3044],{"type":42,"tag":391,"props":3037,"children":3038},{"style":912},[3039],{"type":51,"value":971},{"type":42,"tag":391,"props":3041,"children":3042},{"style":409},[3043],{"type":51,"value":976},{"type":42,"tag":391,"props":3045,"children":3046},{"style":403},[3047],{"type":51,"value":3048},"raw.stripe_refunds\n",{"type":42,"tag":391,"props":3050,"children":3051},{"class":393,"line":99},[3052,3056,3060],{"type":42,"tag":391,"props":3053,"children":3054},{"style":912},[3055],{"type":51,"value":2126},{"type":42,"tag":391,"props":3057,"children":3058},{"style":409},[3059],{"type":51,"value":976},{"type":42,"tag":391,"props":3061,"children":3062},{"style":403},[3063],{"type":51,"value":2135},{"type":42,"tag":391,"props":3065,"children":3066},{"class":393,"line":439},[3067,3071],{"type":42,"tag":391,"props":3068,"children":3069},{"style":912},[3070],{"type":51,"value":2143},{"type":42,"tag":391,"props":3072,"children":3073},{"style":409},[3074],{"type":51,"value":920},{"type":42,"tag":391,"props":3076,"children":3077},{"class":393,"line":947},[3078,3082,3086],{"type":42,"tag":391,"props":3079,"children":3080},{"style":912},[3081],{"type":51,"value":2155},{"type":42,"tag":391,"props":3083,"children":3084},{"style":409},[3085],{"type":51,"value":976},{"type":42,"tag":391,"props":3087,"children":3088},{"style":403},[3089],{"type":51,"value":2948},{"type":42,"tag":391,"props":3091,"children":3092},{"class":393,"line":960},[3093,3097,3101],{"type":42,"tag":391,"props":3094,"children":3095},{"style":912},[3096],{"type":51,"value":2172},{"type":42,"tag":391,"props":3098,"children":3099},{"style":409},[3100],{"type":51,"value":976},{"type":42,"tag":391,"props":3102,"children":3103},{"style":403},[3104],{"type":51,"value":3105},"refunds\n",{"type":42,"tag":391,"props":3107,"children":3108},{"class":393,"line":984},[3109,3113,3117],{"type":42,"tag":391,"props":3110,"children":3111},{"style":912},[3112],{"type":51,"value":2206},{"type":42,"tag":391,"props":3114,"children":3115},{"style":409},[3116],{"type":51,"value":976},{"type":42,"tag":391,"props":3118,"children":3119},{"style":403},[3120],{"type":51,"value":2215},{"type":42,"tag":391,"props":3122,"children":3123},{"class":393,"line":1002},[3124,3128,3132],{"type":42,"tag":391,"props":3125,"children":3126},{"style":912},[3127],{"type":51,"value":2223},{"type":42,"tag":391,"props":3129,"children":3130},{"style":409},[3131],{"type":51,"value":976},{"type":42,"tag":391,"props":3133,"children":3134},{"style":403},[3135],{"type":51,"value":2995},{"type":42,"tag":391,"props":3137,"children":3138},{"class":393,"line":165},[3139,3143,3147],{"type":42,"tag":391,"props":3140,"children":3141},{"style":912},[3142],{"type":51,"value":2241},{"type":42,"tag":391,"props":3144,"children":3145},{"style":409},[3146],{"type":51,"value":976},{"type":42,"tag":391,"props":3148,"children":3149},{"style":403},[3150],{"type":51,"value":2250},{"type":42,"tag":569,"props":3152,"children":3153},{"v-slot:stripe-customers":7},[3154,3166],{"type":42,"tag":43,"props":3155,"children":3156},{},[3157],{"type":42,"tag":47,"props":3158,"children":3159},{},[3160],{"type":42,"tag":240,"props":3161,"children":3163},{"className":3162},[],[3164],{"type":51,"value":3165},"ecommerce\u002Fassets\u002Fstripe_customers.asset.yml",{"type":42,"tag":381,"props":3167,"children":3169},{"className":900,"code":3168,"language":902,"meta":7,"style":7},"name: raw.stripe_customers\ntype: ingestr\nparameters:\n  source_connection: stripe\n  source_table: customers\n  incremental_strategy: merge\n  incremental_key: created\n  primary_key: id\n",[3170],{"type":42,"tag":240,"props":3171,"children":3172},{"__ignoreMap":7},[3173,3189,3204,3215,3230,3245,3260,3275],{"type":42,"tag":391,"props":3174,"children":3175},{"class":393,"line":176},[3176,3180,3184],{"type":42,"tag":391,"props":3177,"children":3178},{"style":912},[3179],{"type":51,"value":971},{"type":42,"tag":391,"props":3181,"children":3182},{"style":409},[3183],{"type":51,"value":976},{"type":42,"tag":391,"props":3185,"children":3186},{"style":403},[3187],{"type":51,"value":3188},"raw.stripe_customers\n",{"type":42,"tag":391,"props":3190,"children":3191},{"class":393,"line":99},[3192,3196,3200],{"type":42,"tag":391,"props":3193,"children":3194},{"style":912},[3195],{"type":51,"value":2126},{"type":42,"tag":391,"props":3197,"children":3198},{"style":409},[3199],{"type":51,"value":976},{"type":42,"tag":391,"props":3201,"children":3202},{"style":403},[3203],{"type":51,"value":2135},{"type":42,"tag":391,"props":3205,"children":3206},{"class":393,"line":439},[3207,3211],{"type":42,"tag":391,"props":3208,"children":3209},{"style":912},[3210],{"type":51,"value":2143},{"type":42,"tag":391,"props":3212,"children":3213},{"style":409},[3214],{"type":51,"value":920},{"type":42,"tag":391,"props":3216,"children":3217},{"class":393,"line":947},[3218,3222,3226],{"type":42,"tag":391,"props":3219,"children":3220},{"style":912},[3221],{"type":51,"value":2155},{"type":42,"tag":391,"props":3223,"children":3224},{"style":409},[3225],{"type":51,"value":976},{"type":42,"tag":391,"props":3227,"children":3228},{"style":403},[3229],{"type":51,"value":2948},{"type":42,"tag":391,"props":3231,"children":3232},{"class":393,"line":960},[3233,3237,3241],{"type":42,"tag":391,"props":3234,"children":3235},{"style":912},[3236],{"type":51,"value":2172},{"type":42,"tag":391,"props":3238,"children":3239},{"style":409},[3240],{"type":51,"value":976},{"type":42,"tag":391,"props":3242,"children":3243},{"style":403},[3244],{"type":51,"value":2345},{"type":42,"tag":391,"props":3246,"children":3247},{"class":393,"line":984},[3248,3252,3256],{"type":42,"tag":391,"props":3249,"children":3250},{"style":912},[3251],{"type":51,"value":2206},{"type":42,"tag":391,"props":3253,"children":3254},{"style":409},[3255],{"type":51,"value":976},{"type":42,"tag":391,"props":3257,"children":3258},{"style":403},[3259],{"type":51,"value":2215},{"type":42,"tag":391,"props":3261,"children":3262},{"class":393,"line":1002},[3263,3267,3271],{"type":42,"tag":391,"props":3264,"children":3265},{"style":912},[3266],{"type":51,"value":2223},{"type":42,"tag":391,"props":3268,"children":3269},{"style":409},[3270],{"type":51,"value":976},{"type":42,"tag":391,"props":3272,"children":3273},{"style":403},[3274],{"type":51,"value":2995},{"type":42,"tag":391,"props":3276,"children":3277},{"class":393,"line":165},[3278,3282,3286],{"type":42,"tag":391,"props":3279,"children":3280},{"style":912},[3281],{"type":51,"value":2241},{"type":42,"tag":391,"props":3283,"children":3284},{"style":409},[3285],{"type":51,"value":976},{"type":42,"tag":391,"props":3287,"children":3288},{"style":403},[3289],{"type":51,"value":2250},{"type":42,"tag":569,"props":3291,"children":3292},{"v-slot:stripe-payouts":7},[3293,3305],{"type":42,"tag":43,"props":3294,"children":3295},{},[3296],{"type":42,"tag":47,"props":3297,"children":3298},{},[3299],{"type":42,"tag":240,"props":3300,"children":3302},{"className":3301},[],[3303],{"type":51,"value":3304},"ecommerce\u002Fassets\u002Fstripe_payouts.asset.yml",{"type":42,"tag":381,"props":3306,"children":3308},{"className":900,"code":3307,"language":902,"meta":7,"style":7},"name: raw.stripe_payouts\ntype: ingestr\nparameters:\n  source_connection: stripe\n  source_table: payouts\n  incremental_strategy: merge\n  incremental_key: created\n  primary_key: id\n",[3309],{"type":42,"tag":240,"props":3310,"children":3311},{"__ignoreMap":7},[3312,3328,3343,3354,3369,3385,3400,3415],{"type":42,"tag":391,"props":3313,"children":3314},{"class":393,"line":176},[3315,3319,3323],{"type":42,"tag":391,"props":3316,"children":3317},{"style":912},[3318],{"type":51,"value":971},{"type":42,"tag":391,"props":3320,"children":3321},{"style":409},[3322],{"type":51,"value":976},{"type":42,"tag":391,"props":3324,"children":3325},{"style":403},[3326],{"type":51,"value":3327},"raw.stripe_payouts\n",{"type":42,"tag":391,"props":3329,"children":3330},{"class":393,"line":99},[3331,3335,3339],{"type":42,"tag":391,"props":3332,"children":3333},{"style":912},[3334],{"type":51,"value":2126},{"type":42,"tag":391,"props":3336,"children":3337},{"style":409},[3338],{"type":51,"value":976},{"type":42,"tag":391,"props":3340,"children":3341},{"style":403},[3342],{"type":51,"value":2135},{"type":42,"tag":391,"props":3344,"children":3345},{"class":393,"line":439},[3346,3350],{"type":42,"tag":391,"props":3347,"children":3348},{"style":912},[3349],{"type":51,"value":2143},{"type":42,"tag":391,"props":3351,"children":3352},{"style":409},[3353],{"type":51,"value":920},{"type":42,"tag":391,"props":3355,"children":3356},{"class":393,"line":947},[3357,3361,3365],{"type":42,"tag":391,"props":3358,"children":3359},{"style":912},[3360],{"type":51,"value":2155},{"type":42,"tag":391,"props":3362,"children":3363},{"style":409},[3364],{"type":51,"value":976},{"type":42,"tag":391,"props":3366,"children":3367},{"style":403},[3368],{"type":51,"value":2948},{"type":42,"tag":391,"props":3370,"children":3371},{"class":393,"line":960},[3372,3376,3380],{"type":42,"tag":391,"props":3373,"children":3374},{"style":912},[3375],{"type":51,"value":2172},{"type":42,"tag":391,"props":3377,"children":3378},{"style":409},[3379],{"type":51,"value":976},{"type":42,"tag":391,"props":3381,"children":3382},{"style":403},[3383],{"type":51,"value":3384},"payouts\n",{"type":42,"tag":391,"props":3386,"children":3387},{"class":393,"line":984},[3388,3392,3396],{"type":42,"tag":391,"props":3389,"children":3390},{"style":912},[3391],{"type":51,"value":2206},{"type":42,"tag":391,"props":3393,"children":3394},{"style":409},[3395],{"type":51,"value":976},{"type":42,"tag":391,"props":3397,"children":3398},{"style":403},[3399],{"type":51,"value":2215},{"type":42,"tag":391,"props":3401,"children":3402},{"class":393,"line":1002},[3403,3407,3411],{"type":42,"tag":391,"props":3404,"children":3405},{"style":912},[3406],{"type":51,"value":2223},{"type":42,"tag":391,"props":3408,"children":3409},{"style":409},[3410],{"type":51,"value":976},{"type":42,"tag":391,"props":3412,"children":3413},{"style":403},[3414],{"type":51,"value":2995},{"type":42,"tag":391,"props":3416,"children":3417},{"class":393,"line":165},[3418,3422,3426],{"type":42,"tag":391,"props":3419,"children":3420},{"style":912},[3421],{"type":51,"value":2241},{"type":42,"tag":391,"props":3423,"children":3424},{"style":409},[3425],{"type":51,"value":976},{"type":42,"tag":391,"props":3427,"children":3428},{"style":403},[3429],{"type":51,"value":2250},{"type":42,"tag":339,"props":3431,"children":3432},{"type":2689},[3433],{"type":42,"tag":43,"props":3434,"children":3435},{},[3436,3438,3444,3445,3451,3453,3459],{"type":51,"value":3437},"The Stripe MCP can help you explore which tables and fields are available. Ask Claude Code \"what data can I pull from Stripe?\" to see tables like ",{"type":42,"tag":240,"props":3439,"children":3441},{"className":3440},[],[3442],{"type":51,"value":3443},"subscriptions",{"type":51,"value":292},{"type":42,"tag":240,"props":3446,"children":3448},{"className":3447},[],[3449],{"type":51,"value":3450},"disputes",{"type":51,"value":3452},", or ",{"type":42,"tag":240,"props":3454,"children":3456},{"className":3455},[],[3457],{"type":51,"value":3458},"balance_transactions",{"type":51,"value":247},{"type":42,"tag":1959,"props":3461,"children":3462},{},[],{"type":42,"tag":361,"props":3464,"children":3466},{"id":3465},"email-marketing",[3467],{"type":51,"value":3468},"Email Marketing",{"type":42,"tag":563,"props":3470,"children":3473},{":variants":3471,"group":3472},"[{\"id\":\"klaviyo\",\"label\":\"Klaviyo\"},{\"id\":\"hubspot\",\"label\":\"HubSpot\"}]","marketing",[3474,3864],{"type":42,"tag":569,"props":3475,"children":3476},{"v-slot:klaviyo":7},[3477,3482,3487,3495,3516,3520,3558,3565],{"type":42,"tag":2058,"props":3478,"children":3480},{"id":3479},"klaviyo",[3481],{"type":51,"value":1712},{"type":42,"tag":43,"props":3483,"children":3484},{},[3485],{"type":51,"value":3486},"Klaviyo covers the marketing side: how your email and SMS campaigns are performing and which customers are engaging.",{"type":42,"tag":43,"props":3488,"children":3489},{},[3490],{"type":42,"tag":47,"props":3491,"children":3492},{},[3493],{"type":51,"value":3494},"Add the Klaviyo connection:",{"type":42,"tag":381,"props":3496,"children":3497},{"className":383,"code":617,"language":385,"meta":7,"style":7},[3498],{"type":42,"tag":240,"props":3499,"children":3500},{"__ignoreMap":7},[3501],{"type":42,"tag":391,"props":3502,"children":3503},{"class":393,"line":176},[3504,3508,3512],{"type":42,"tag":391,"props":3505,"children":3506},{"style":397},[3507],{"type":51,"value":445},{"type":42,"tag":391,"props":3509,"children":3510},{"style":403},[3511],{"type":51,"value":633},{"type":42,"tag":391,"props":3513,"children":3514},{"style":403},[3515],{"type":51,"value":638},{"type":42,"tag":43,"props":3517,"children":3518},{},[3519],{"type":51,"value":643},{"type":42,"tag":214,"props":3521,"children":3522},{},[3523,3536,3549],{"type":42,"tag":218,"props":3524,"children":3525},{},[3526,3530,3531],{"type":42,"tag":47,"props":3527,"children":3528},{},[3529],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":3532,"children":3534},{"className":3533},[],[3535],{"type":51,"value":3479},{"type":42,"tag":218,"props":3537,"children":3538},{},[3539,3543,3544],{"type":42,"tag":47,"props":3540,"children":3541},{},[3542],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":3545,"children":3547},{"className":3546},[],[3548],{"type":51,"value":3479},{"type":42,"tag":218,"props":3550,"children":3551},{},[3552,3556],{"type":42,"tag":47,"props":3553,"children":3554},{},[3555],{"type":51,"value":2847},{"type":51,"value":3557}," your Klaviyo private API key",{"type":42,"tag":43,"props":3559,"children":3560},{},[3561],{"type":42,"tag":47,"props":3562,"children":3563},{},[3564],{"type":51,"value":2864},{"type":42,"tag":563,"props":3566,"children":3568},{":variants":3567},"[{\"id\":\"klaviyo-campaigns\",\"label\":\"Campaigns\"},{\"id\":\"klaviyo-flows\",\"label\":\"Flows\"},{\"id\":\"klaviyo-metrics\",\"label\":\"Metrics\"}]",[3569,3668,3766],{"type":42,"tag":569,"props":3570,"children":3571},{"v-slot:klaviyo-campaigns":7},[3572],{"type":42,"tag":381,"props":3573,"children":3575},{"className":900,"code":3574,"language":902,"meta":7,"style":7},"name: raw.klaviyo_campaigns\ntype: ingestr\nparameters:\n  source_connection: klaviyo\n  source_table: campaigns\n  incremental_strategy: replace\n",[3576],{"type":42,"tag":240,"props":3577,"children":3578},{"__ignoreMap":7},[3579,3595,3610,3621,3637,3653],{"type":42,"tag":391,"props":3580,"children":3581},{"class":393,"line":176},[3582,3586,3590],{"type":42,"tag":391,"props":3583,"children":3584},{"style":912},[3585],{"type":51,"value":971},{"type":42,"tag":391,"props":3587,"children":3588},{"style":409},[3589],{"type":51,"value":976},{"type":42,"tag":391,"props":3591,"children":3592},{"style":403},[3593],{"type":51,"value":3594},"raw.klaviyo_campaigns\n",{"type":42,"tag":391,"props":3596,"children":3597},{"class":393,"line":99},[3598,3602,3606],{"type":42,"tag":391,"props":3599,"children":3600},{"style":912},[3601],{"type":51,"value":2126},{"type":42,"tag":391,"props":3603,"children":3604},{"style":409},[3605],{"type":51,"value":976},{"type":42,"tag":391,"props":3607,"children":3608},{"style":403},[3609],{"type":51,"value":2135},{"type":42,"tag":391,"props":3611,"children":3612},{"class":393,"line":439},[3613,3617],{"type":42,"tag":391,"props":3614,"children":3615},{"style":912},[3616],{"type":51,"value":2143},{"type":42,"tag":391,"props":3618,"children":3619},{"style":409},[3620],{"type":51,"value":920},{"type":42,"tag":391,"props":3622,"children":3623},{"class":393,"line":947},[3624,3628,3632],{"type":42,"tag":391,"props":3625,"children":3626},{"style":912},[3627],{"type":51,"value":2155},{"type":42,"tag":391,"props":3629,"children":3630},{"style":409},[3631],{"type":51,"value":976},{"type":42,"tag":391,"props":3633,"children":3634},{"style":403},[3635],{"type":51,"value":3636},"klaviyo\n",{"type":42,"tag":391,"props":3638,"children":3639},{"class":393,"line":960},[3640,3644,3648],{"type":42,"tag":391,"props":3641,"children":3642},{"style":912},[3643],{"type":51,"value":2172},{"type":42,"tag":391,"props":3645,"children":3646},{"style":409},[3647],{"type":51,"value":976},{"type":42,"tag":391,"props":3649,"children":3650},{"style":403},[3651],{"type":51,"value":3652},"campaigns\n",{"type":42,"tag":391,"props":3654,"children":3655},{"class":393,"line":984},[3656,3660,3664],{"type":42,"tag":391,"props":3657,"children":3658},{"style":912},[3659],{"type":51,"value":2206},{"type":42,"tag":391,"props":3661,"children":3662},{"style":409},[3663],{"type":51,"value":976},{"type":42,"tag":391,"props":3665,"children":3666},{"style":403},[3667],{"type":51,"value":2686},{"type":42,"tag":569,"props":3669,"children":3670},{"v-slot:klaviyo-flows":7},[3671],{"type":42,"tag":381,"props":3672,"children":3674},{"className":900,"code":3673,"language":902,"meta":7,"style":7},"name: raw.klaviyo_flows\ntype: ingestr\nparameters:\n  source_connection: klaviyo\n  source_table: flows\n  incremental_strategy: replace\n",[3675],{"type":42,"tag":240,"props":3676,"children":3677},{"__ignoreMap":7},[3678,3694,3709,3720,3735,3751],{"type":42,"tag":391,"props":3679,"children":3680},{"class":393,"line":176},[3681,3685,3689],{"type":42,"tag":391,"props":3682,"children":3683},{"style":912},[3684],{"type":51,"value":971},{"type":42,"tag":391,"props":3686,"children":3687},{"style":409},[3688],{"type":51,"value":976},{"type":42,"tag":391,"props":3690,"children":3691},{"style":403},[3692],{"type":51,"value":3693},"raw.klaviyo_flows\n",{"type":42,"tag":391,"props":3695,"children":3696},{"class":393,"line":99},[3697,3701,3705],{"type":42,"tag":391,"props":3698,"children":3699},{"style":912},[3700],{"type":51,"value":2126},{"type":42,"tag":391,"props":3702,"children":3703},{"style":409},[3704],{"type":51,"value":976},{"type":42,"tag":391,"props":3706,"children":3707},{"style":403},[3708],{"type":51,"value":2135},{"type":42,"tag":391,"props":3710,"children":3711},{"class":393,"line":439},[3712,3716],{"type":42,"tag":391,"props":3713,"children":3714},{"style":912},[3715],{"type":51,"value":2143},{"type":42,"tag":391,"props":3717,"children":3718},{"style":409},[3719],{"type":51,"value":920},{"type":42,"tag":391,"props":3721,"children":3722},{"class":393,"line":947},[3723,3727,3731],{"type":42,"tag":391,"props":3724,"children":3725},{"style":912},[3726],{"type":51,"value":2155},{"type":42,"tag":391,"props":3728,"children":3729},{"style":409},[3730],{"type":51,"value":976},{"type":42,"tag":391,"props":3732,"children":3733},{"style":403},[3734],{"type":51,"value":3636},{"type":42,"tag":391,"props":3736,"children":3737},{"class":393,"line":960},[3738,3742,3746],{"type":42,"tag":391,"props":3739,"children":3740},{"style":912},[3741],{"type":51,"value":2172},{"type":42,"tag":391,"props":3743,"children":3744},{"style":409},[3745],{"type":51,"value":976},{"type":42,"tag":391,"props":3747,"children":3748},{"style":403},[3749],{"type":51,"value":3750},"flows\n",{"type":42,"tag":391,"props":3752,"children":3753},{"class":393,"line":984},[3754,3758,3762],{"type":42,"tag":391,"props":3755,"children":3756},{"style":912},[3757],{"type":51,"value":2206},{"type":42,"tag":391,"props":3759,"children":3760},{"style":409},[3761],{"type":51,"value":976},{"type":42,"tag":391,"props":3763,"children":3764},{"style":403},[3765],{"type":51,"value":2686},{"type":42,"tag":569,"props":3767,"children":3768},{"v-slot:klaviyo-metrics":7},[3769],{"type":42,"tag":381,"props":3770,"children":3772},{"className":900,"code":3771,"language":902,"meta":7,"style":7},"name: raw.klaviyo_metrics\ntype: ingestr\nparameters:\n  source_connection: klaviyo\n  source_table: metrics\n  incremental_strategy: replace\n",[3773],{"type":42,"tag":240,"props":3774,"children":3775},{"__ignoreMap":7},[3776,3792,3807,3818,3833,3849],{"type":42,"tag":391,"props":3777,"children":3778},{"class":393,"line":176},[3779,3783,3787],{"type":42,"tag":391,"props":3780,"children":3781},{"style":912},[3782],{"type":51,"value":971},{"type":42,"tag":391,"props":3784,"children":3785},{"style":409},[3786],{"type":51,"value":976},{"type":42,"tag":391,"props":3788,"children":3789},{"style":403},[3790],{"type":51,"value":3791},"raw.klaviyo_metrics\n",{"type":42,"tag":391,"props":3793,"children":3794},{"class":393,"line":99},[3795,3799,3803],{"type":42,"tag":391,"props":3796,"children":3797},{"style":912},[3798],{"type":51,"value":2126},{"type":42,"tag":391,"props":3800,"children":3801},{"style":409},[3802],{"type":51,"value":976},{"type":42,"tag":391,"props":3804,"children":3805},{"style":403},[3806],{"type":51,"value":2135},{"type":42,"tag":391,"props":3808,"children":3809},{"class":393,"line":439},[3810,3814],{"type":42,"tag":391,"props":3811,"children":3812},{"style":912},[3813],{"type":51,"value":2143},{"type":42,"tag":391,"props":3815,"children":3816},{"style":409},[3817],{"type":51,"value":920},{"type":42,"tag":391,"props":3819,"children":3820},{"class":393,"line":947},[3821,3825,3829],{"type":42,"tag":391,"props":3822,"children":3823},{"style":912},[3824],{"type":51,"value":2155},{"type":42,"tag":391,"props":3826,"children":3827},{"style":409},[3828],{"type":51,"value":976},{"type":42,"tag":391,"props":3830,"children":3831},{"style":403},[3832],{"type":51,"value":3636},{"type":42,"tag":391,"props":3834,"children":3835},{"class":393,"line":960},[3836,3840,3844],{"type":42,"tag":391,"props":3837,"children":3838},{"style":912},[3839],{"type":51,"value":2172},{"type":42,"tag":391,"props":3841,"children":3842},{"style":409},[3843],{"type":51,"value":976},{"type":42,"tag":391,"props":3845,"children":3846},{"style":403},[3847],{"type":51,"value":3848},"metrics\n",{"type":42,"tag":391,"props":3850,"children":3851},{"class":393,"line":984},[3852,3856,3860],{"type":42,"tag":391,"props":3853,"children":3854},{"style":912},[3855],{"type":51,"value":2206},{"type":42,"tag":391,"props":3857,"children":3858},{"style":409},[3859],{"type":51,"value":976},{"type":42,"tag":391,"props":3861,"children":3862},{"style":403},[3863],{"type":51,"value":2686},{"type":42,"tag":569,"props":3865,"children":3866},{"v-slot:hubspot":7},[3867,3872,3877,3885,3906,3910,3948,3955],{"type":42,"tag":2058,"props":3868,"children":3870},{"id":3869},"hubspot",[3871],{"type":51,"value":1713},{"type":42,"tag":43,"props":3873,"children":3874},{},[3875],{"type":51,"value":3876},"HubSpot covers your CRM and marketing data: contacts, deals, email campaigns, and marketing activity.",{"type":42,"tag":43,"props":3878,"children":3879},{},[3880],{"type":42,"tag":47,"props":3881,"children":3882},{},[3883],{"type":51,"value":3884},"Add the HubSpot connection:",{"type":42,"tag":381,"props":3886,"children":3887},{"className":383,"code":617,"language":385,"meta":7,"style":7},[3888],{"type":42,"tag":240,"props":3889,"children":3890},{"__ignoreMap":7},[3891],{"type":42,"tag":391,"props":3892,"children":3893},{"class":393,"line":176},[3894,3898,3902],{"type":42,"tag":391,"props":3895,"children":3896},{"style":397},[3897],{"type":51,"value":445},{"type":42,"tag":391,"props":3899,"children":3900},{"style":403},[3901],{"type":51,"value":633},{"type":42,"tag":391,"props":3903,"children":3904},{"style":403},[3905],{"type":51,"value":638},{"type":42,"tag":43,"props":3907,"children":3908},{},[3909],{"type":51,"value":643},{"type":42,"tag":214,"props":3911,"children":3912},{},[3913,3926,3939],{"type":42,"tag":218,"props":3914,"children":3915},{},[3916,3920,3921],{"type":42,"tag":47,"props":3917,"children":3918},{},[3919],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":3922,"children":3924},{"className":3923},[],[3925],{"type":51,"value":3869},{"type":42,"tag":218,"props":3927,"children":3928},{},[3929,3933,3934],{"type":42,"tag":47,"props":3930,"children":3931},{},[3932],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":3935,"children":3937},{"className":3936},[],[3938],{"type":51,"value":3869},{"type":42,"tag":218,"props":3940,"children":3941},{},[3942,3946],{"type":42,"tag":47,"props":3943,"children":3944},{},[3945],{"type":51,"value":2847},{"type":51,"value":3947}," your HubSpot private app access token",{"type":42,"tag":43,"props":3949,"children":3950},{},[3951],{"type":42,"tag":47,"props":3952,"children":3953},{},[3954],{"type":51,"value":2864},{"type":42,"tag":563,"props":3956,"children":3958},{":variants":3957},"[{\"id\":\"hubspot-contacts\",\"label\":\"Contacts\"},{\"id\":\"hubspot-deals\",\"label\":\"Deals\"},{\"id\":\"hubspot-campaigns\",\"label\":\"Campaigns\"}]",[3959,4089,4217],{"type":42,"tag":569,"props":3960,"children":3961},{"v-slot:hubspot-contacts":7},[3962],{"type":42,"tag":381,"props":3963,"children":3965},{"className":900,"code":3964,"language":902,"meta":7,"style":7},"name: raw.hubspot_contacts\ntype: ingestr\nparameters:\n  source_connection: hubspot\n  source_table: contacts\n  incremental_strategy: merge\n  incremental_key: updatedAt\n  primary_key: id\n",[3966],{"type":42,"tag":240,"props":3967,"children":3968},{"__ignoreMap":7},[3969,3985,4000,4011,4027,4043,4058,4074],{"type":42,"tag":391,"props":3970,"children":3971},{"class":393,"line":176},[3972,3976,3980],{"type":42,"tag":391,"props":3973,"children":3974},{"style":912},[3975],{"type":51,"value":971},{"type":42,"tag":391,"props":3977,"children":3978},{"style":409},[3979],{"type":51,"value":976},{"type":42,"tag":391,"props":3981,"children":3982},{"style":403},[3983],{"type":51,"value":3984},"raw.hubspot_contacts\n",{"type":42,"tag":391,"props":3986,"children":3987},{"class":393,"line":99},[3988,3992,3996],{"type":42,"tag":391,"props":3989,"children":3990},{"style":912},[3991],{"type":51,"value":2126},{"type":42,"tag":391,"props":3993,"children":3994},{"style":409},[3995],{"type":51,"value":976},{"type":42,"tag":391,"props":3997,"children":3998},{"style":403},[3999],{"type":51,"value":2135},{"type":42,"tag":391,"props":4001,"children":4002},{"class":393,"line":439},[4003,4007],{"type":42,"tag":391,"props":4004,"children":4005},{"style":912},[4006],{"type":51,"value":2143},{"type":42,"tag":391,"props":4008,"children":4009},{"style":409},[4010],{"type":51,"value":920},{"type":42,"tag":391,"props":4012,"children":4013},{"class":393,"line":947},[4014,4018,4022],{"type":42,"tag":391,"props":4015,"children":4016},{"style":912},[4017],{"type":51,"value":2155},{"type":42,"tag":391,"props":4019,"children":4020},{"style":409},[4021],{"type":51,"value":976},{"type":42,"tag":391,"props":4023,"children":4024},{"style":403},[4025],{"type":51,"value":4026},"hubspot\n",{"type":42,"tag":391,"props":4028,"children":4029},{"class":393,"line":960},[4030,4034,4038],{"type":42,"tag":391,"props":4031,"children":4032},{"style":912},[4033],{"type":51,"value":2172},{"type":42,"tag":391,"props":4035,"children":4036},{"style":409},[4037],{"type":51,"value":976},{"type":42,"tag":391,"props":4039,"children":4040},{"style":403},[4041],{"type":51,"value":4042},"contacts\n",{"type":42,"tag":391,"props":4044,"children":4045},{"class":393,"line":984},[4046,4050,4054],{"type":42,"tag":391,"props":4047,"children":4048},{"style":912},[4049],{"type":51,"value":2206},{"type":42,"tag":391,"props":4051,"children":4052},{"style":409},[4053],{"type":51,"value":976},{"type":42,"tag":391,"props":4055,"children":4056},{"style":403},[4057],{"type":51,"value":2215},{"type":42,"tag":391,"props":4059,"children":4060},{"class":393,"line":1002},[4061,4065,4069],{"type":42,"tag":391,"props":4062,"children":4063},{"style":912},[4064],{"type":51,"value":2223},{"type":42,"tag":391,"props":4066,"children":4067},{"style":409},[4068],{"type":51,"value":976},{"type":42,"tag":391,"props":4070,"children":4071},{"style":403},[4072],{"type":51,"value":4073},"updatedAt\n",{"type":42,"tag":391,"props":4075,"children":4076},{"class":393,"line":165},[4077,4081,4085],{"type":42,"tag":391,"props":4078,"children":4079},{"style":912},[4080],{"type":51,"value":2241},{"type":42,"tag":391,"props":4082,"children":4083},{"style":409},[4084],{"type":51,"value":976},{"type":42,"tag":391,"props":4086,"children":4087},{"style":403},[4088],{"type":51,"value":2250},{"type":42,"tag":569,"props":4090,"children":4091},{"v-slot:hubspot-deals":7},[4092],{"type":42,"tag":381,"props":4093,"children":4095},{"className":900,"code":4094,"language":902,"meta":7,"style":7},"name: raw.hubspot_deals\ntype: ingestr\nparameters:\n  source_connection: hubspot\n  source_table: deals\n  incremental_strategy: merge\n  incremental_key: updatedAt\n  primary_key: id\n",[4096],{"type":42,"tag":240,"props":4097,"children":4098},{"__ignoreMap":7},[4099,4115,4130,4141,4156,4172,4187,4202],{"type":42,"tag":391,"props":4100,"children":4101},{"class":393,"line":176},[4102,4106,4110],{"type":42,"tag":391,"props":4103,"children":4104},{"style":912},[4105],{"type":51,"value":971},{"type":42,"tag":391,"props":4107,"children":4108},{"style":409},[4109],{"type":51,"value":976},{"type":42,"tag":391,"props":4111,"children":4112},{"style":403},[4113],{"type":51,"value":4114},"raw.hubspot_deals\n",{"type":42,"tag":391,"props":4116,"children":4117},{"class":393,"line":99},[4118,4122,4126],{"type":42,"tag":391,"props":4119,"children":4120},{"style":912},[4121],{"type":51,"value":2126},{"type":42,"tag":391,"props":4123,"children":4124},{"style":409},[4125],{"type":51,"value":976},{"type":42,"tag":391,"props":4127,"children":4128},{"style":403},[4129],{"type":51,"value":2135},{"type":42,"tag":391,"props":4131,"children":4132},{"class":393,"line":439},[4133,4137],{"type":42,"tag":391,"props":4134,"children":4135},{"style":912},[4136],{"type":51,"value":2143},{"type":42,"tag":391,"props":4138,"children":4139},{"style":409},[4140],{"type":51,"value":920},{"type":42,"tag":391,"props":4142,"children":4143},{"class":393,"line":947},[4144,4148,4152],{"type":42,"tag":391,"props":4145,"children":4146},{"style":912},[4147],{"type":51,"value":2155},{"type":42,"tag":391,"props":4149,"children":4150},{"style":409},[4151],{"type":51,"value":976},{"type":42,"tag":391,"props":4153,"children":4154},{"style":403},[4155],{"type":51,"value":4026},{"type":42,"tag":391,"props":4157,"children":4158},{"class":393,"line":960},[4159,4163,4167],{"type":42,"tag":391,"props":4160,"children":4161},{"style":912},[4162],{"type":51,"value":2172},{"type":42,"tag":391,"props":4164,"children":4165},{"style":409},[4166],{"type":51,"value":976},{"type":42,"tag":391,"props":4168,"children":4169},{"style":403},[4170],{"type":51,"value":4171},"deals\n",{"type":42,"tag":391,"props":4173,"children":4174},{"class":393,"line":984},[4175,4179,4183],{"type":42,"tag":391,"props":4176,"children":4177},{"style":912},[4178],{"type":51,"value":2206},{"type":42,"tag":391,"props":4180,"children":4181},{"style":409},[4182],{"type":51,"value":976},{"type":42,"tag":391,"props":4184,"children":4185},{"style":403},[4186],{"type":51,"value":2215},{"type":42,"tag":391,"props":4188,"children":4189},{"class":393,"line":1002},[4190,4194,4198],{"type":42,"tag":391,"props":4191,"children":4192},{"style":912},[4193],{"type":51,"value":2223},{"type":42,"tag":391,"props":4195,"children":4196},{"style":409},[4197],{"type":51,"value":976},{"type":42,"tag":391,"props":4199,"children":4200},{"style":403},[4201],{"type":51,"value":4073},{"type":42,"tag":391,"props":4203,"children":4204},{"class":393,"line":165},[4205,4209,4213],{"type":42,"tag":391,"props":4206,"children":4207},{"style":912},[4208],{"type":51,"value":2241},{"type":42,"tag":391,"props":4210,"children":4211},{"style":409},[4212],{"type":51,"value":976},{"type":42,"tag":391,"props":4214,"children":4215},{"style":403},[4216],{"type":51,"value":2250},{"type":42,"tag":569,"props":4218,"children":4219},{"v-slot:hubspot-campaigns":7},[4220],{"type":42,"tag":381,"props":4221,"children":4223},{"className":900,"code":4222,"language":902,"meta":7,"style":7},"name: raw.hubspot_campaigns\ntype: ingestr\nparameters:\n  source_connection: hubspot\n  source_table: campaigns\n  incremental_strategy: replace\n",[4224],{"type":42,"tag":240,"props":4225,"children":4226},{"__ignoreMap":7},[4227,4243,4258,4269,4284,4299],{"type":42,"tag":391,"props":4228,"children":4229},{"class":393,"line":176},[4230,4234,4238],{"type":42,"tag":391,"props":4231,"children":4232},{"style":912},[4233],{"type":51,"value":971},{"type":42,"tag":391,"props":4235,"children":4236},{"style":409},[4237],{"type":51,"value":976},{"type":42,"tag":391,"props":4239,"children":4240},{"style":403},[4241],{"type":51,"value":4242},"raw.hubspot_campaigns\n",{"type":42,"tag":391,"props":4244,"children":4245},{"class":393,"line":99},[4246,4250,4254],{"type":42,"tag":391,"props":4247,"children":4248},{"style":912},[4249],{"type":51,"value":2126},{"type":42,"tag":391,"props":4251,"children":4252},{"style":409},[4253],{"type":51,"value":976},{"type":42,"tag":391,"props":4255,"children":4256},{"style":403},[4257],{"type":51,"value":2135},{"type":42,"tag":391,"props":4259,"children":4260},{"class":393,"line":439},[4261,4265],{"type":42,"tag":391,"props":4262,"children":4263},{"style":912},[4264],{"type":51,"value":2143},{"type":42,"tag":391,"props":4266,"children":4267},{"style":409},[4268],{"type":51,"value":920},{"type":42,"tag":391,"props":4270,"children":4271},{"class":393,"line":947},[4272,4276,4280],{"type":42,"tag":391,"props":4273,"children":4274},{"style":912},[4275],{"type":51,"value":2155},{"type":42,"tag":391,"props":4277,"children":4278},{"style":409},[4279],{"type":51,"value":976},{"type":42,"tag":391,"props":4281,"children":4282},{"style":403},[4283],{"type":51,"value":4026},{"type":42,"tag":391,"props":4285,"children":4286},{"class":393,"line":960},[4287,4291,4295],{"type":42,"tag":391,"props":4288,"children":4289},{"style":912},[4290],{"type":51,"value":2172},{"type":42,"tag":391,"props":4292,"children":4293},{"style":409},[4294],{"type":51,"value":976},{"type":42,"tag":391,"props":4296,"children":4297},{"style":403},[4298],{"type":51,"value":3652},{"type":42,"tag":391,"props":4300,"children":4301},{"class":393,"line":984},[4302,4306,4310],{"type":42,"tag":391,"props":4303,"children":4304},{"style":912},[4305],{"type":51,"value":2206},{"type":42,"tag":391,"props":4307,"children":4308},{"style":409},[4309],{"type":51,"value":976},{"type":42,"tag":391,"props":4311,"children":4312},{"style":403},[4313],{"type":51,"value":2686},{"type":42,"tag":1959,"props":4315,"children":4316},{},[],{"type":42,"tag":361,"props":4318,"children":4320},{"id":4319},"advertising",[4321],{"type":51,"value":4322},"Advertising",{"type":42,"tag":563,"props":4324,"children":4327},{":variants":4325,"group":4326},"[{\"id\":\"facebook-ads\",\"label\":\"Facebook Ads\"},{\"id\":\"google-ads\",\"label\":\"Google Ads\"},{\"id\":\"tiktok-ads\",\"label\":\"TikTok Ads\"}]","ads",[4328,4670,5004],{"type":42,"tag":569,"props":4329,"children":4330},{"v-slot:facebook-ads":7},[4331,4336,4341,4349,4370,4374,4431,4438],{"type":42,"tag":2058,"props":4332,"children":4334},{"id":4333},"facebook-ads",[4335],{"type":51,"value":1714},{"type":42,"tag":43,"props":4337,"children":4338},{},[4339],{"type":51,"value":4340},"Facebook Ads shows you what you're spending on acquisition across Facebook and Instagram.",{"type":42,"tag":43,"props":4342,"children":4343},{},[4344],{"type":42,"tag":47,"props":4345,"children":4346},{},[4347],{"type":51,"value":4348},"Add the connection:",{"type":42,"tag":381,"props":4350,"children":4351},{"className":383,"code":617,"language":385,"meta":7,"style":7},[4352],{"type":42,"tag":240,"props":4353,"children":4354},{"__ignoreMap":7},[4355],{"type":42,"tag":391,"props":4356,"children":4357},{"class":393,"line":176},[4358,4362,4366],{"type":42,"tag":391,"props":4359,"children":4360},{"style":397},[4361],{"type":51,"value":445},{"type":42,"tag":391,"props":4363,"children":4364},{"style":403},[4365],{"type":51,"value":633},{"type":42,"tag":391,"props":4367,"children":4368},{"style":403},[4369],{"type":51,"value":638},{"type":42,"tag":43,"props":4371,"children":4372},{},[4373],{"type":51,"value":643},{"type":42,"tag":214,"props":4375,"children":4376},{},[4377,4391,4404,4421],{"type":42,"tag":218,"props":4378,"children":4379},{},[4380,4384,4385],{"type":42,"tag":47,"props":4381,"children":4382},{},[4383],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":4386,"children":4388},{"className":4387},[],[4389],{"type":51,"value":4390},"facebook_ads",{"type":42,"tag":218,"props":4392,"children":4393},{},[4394,4398,4399],{"type":42,"tag":47,"props":4395,"children":4396},{},[4397],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":4400,"children":4402},{"className":4401},[],[4403],{"type":51,"value":4390},{"type":42,"tag":218,"props":4405,"children":4406},{},[4407,4412,4414],{"type":42,"tag":47,"props":4408,"children":4409},{},[4410],{"type":51,"value":4411},"Access token:",{"type":51,"value":4413}," your ",{"type":42,"tag":229,"props":4415,"children":4418},{"href":4416,"rel":4417},"https:\u002F\u002Fdevelopers.facebook.com\u002Fdocs\u002Fmarketing-api\u002Foverview\u002Fauthorization",[233],[4419],{"type":51,"value":4420},"Facebook Marketing API access token",{"type":42,"tag":218,"props":4422,"children":4423},{},[4424,4429],{"type":42,"tag":47,"props":4425,"children":4426},{},[4427],{"type":51,"value":4428},"Account IDs:",{"type":51,"value":4430}," your ad account ID(s), comma-separated",{"type":42,"tag":43,"props":4432,"children":4433},{},[4434],{"type":42,"tag":47,"props":4435,"children":4436},{},[4437],{"type":51,"value":2864},{"type":42,"tag":563,"props":4439,"children":4441},{":variants":4440},"[{\"id\":\"fb-campaigns\",\"label\":\"Campaigns\"},{\"id\":\"fb-insights\",\"label\":\"Ad Insights\"}]",[4442,4540],{"type":42,"tag":569,"props":4443,"children":4444},{"v-slot:fb-campaigns":7},[4445],{"type":42,"tag":381,"props":4446,"children":4448},{"className":900,"code":4447,"language":902,"meta":7,"style":7},"name: raw.facebook_campaigns\ntype: ingestr\nparameters:\n  source_connection: facebook_ads\n  source_table: campaigns\n  incremental_strategy: replace\n",[4449],{"type":42,"tag":240,"props":4450,"children":4451},{"__ignoreMap":7},[4452,4468,4483,4494,4510,4525],{"type":42,"tag":391,"props":4453,"children":4454},{"class":393,"line":176},[4455,4459,4463],{"type":42,"tag":391,"props":4456,"children":4457},{"style":912},[4458],{"type":51,"value":971},{"type":42,"tag":391,"props":4460,"children":4461},{"style":409},[4462],{"type":51,"value":976},{"type":42,"tag":391,"props":4464,"children":4465},{"style":403},[4466],{"type":51,"value":4467},"raw.facebook_campaigns\n",{"type":42,"tag":391,"props":4469,"children":4470},{"class":393,"line":99},[4471,4475,4479],{"type":42,"tag":391,"props":4472,"children":4473},{"style":912},[4474],{"type":51,"value":2126},{"type":42,"tag":391,"props":4476,"children":4477},{"style":409},[4478],{"type":51,"value":976},{"type":42,"tag":391,"props":4480,"children":4481},{"style":403},[4482],{"type":51,"value":2135},{"type":42,"tag":391,"props":4484,"children":4485},{"class":393,"line":439},[4486,4490],{"type":42,"tag":391,"props":4487,"children":4488},{"style":912},[4489],{"type":51,"value":2143},{"type":42,"tag":391,"props":4491,"children":4492},{"style":409},[4493],{"type":51,"value":920},{"type":42,"tag":391,"props":4495,"children":4496},{"class":393,"line":947},[4497,4501,4505],{"type":42,"tag":391,"props":4498,"children":4499},{"style":912},[4500],{"type":51,"value":2155},{"type":42,"tag":391,"props":4502,"children":4503},{"style":409},[4504],{"type":51,"value":976},{"type":42,"tag":391,"props":4506,"children":4507},{"style":403},[4508],{"type":51,"value":4509},"facebook_ads\n",{"type":42,"tag":391,"props":4511,"children":4512},{"class":393,"line":960},[4513,4517,4521],{"type":42,"tag":391,"props":4514,"children":4515},{"style":912},[4516],{"type":51,"value":2172},{"type":42,"tag":391,"props":4518,"children":4519},{"style":409},[4520],{"type":51,"value":976},{"type":42,"tag":391,"props":4522,"children":4523},{"style":403},[4524],{"type":51,"value":3652},{"type":42,"tag":391,"props":4526,"children":4527},{"class":393,"line":984},[4528,4532,4536],{"type":42,"tag":391,"props":4529,"children":4530},{"style":912},[4531],{"type":51,"value":2206},{"type":42,"tag":391,"props":4533,"children":4534},{"style":409},[4535],{"type":51,"value":976},{"type":42,"tag":391,"props":4537,"children":4538},{"style":403},[4539],{"type":51,"value":2686},{"type":42,"tag":569,"props":4541,"children":4542},{"v-slot:fb-insights":7},[4543],{"type":42,"tag":381,"props":4544,"children":4546},{"className":900,"code":4545,"language":902,"meta":7,"style":7},"name: raw.facebook_ad_insights\ntype: ingestr\nparameters:\n  source_connection: facebook_ads\n  source_table: insights\n  incremental_strategy: merge\n  incremental_key: date_start\n  primary_key: \"date_start,campaign_id\"\n",[4547],{"type":42,"tag":240,"props":4548,"children":4549},{"__ignoreMap":7},[4550,4566,4581,4592,4607,4623,4638,4654],{"type":42,"tag":391,"props":4551,"children":4552},{"class":393,"line":176},[4553,4557,4561],{"type":42,"tag":391,"props":4554,"children":4555},{"style":912},[4556],{"type":51,"value":971},{"type":42,"tag":391,"props":4558,"children":4559},{"style":409},[4560],{"type":51,"value":976},{"type":42,"tag":391,"props":4562,"children":4563},{"style":403},[4564],{"type":51,"value":4565},"raw.facebook_ad_insights\n",{"type":42,"tag":391,"props":4567,"children":4568},{"class":393,"line":99},[4569,4573,4577],{"type":42,"tag":391,"props":4570,"children":4571},{"style":912},[4572],{"type":51,"value":2126},{"type":42,"tag":391,"props":4574,"children":4575},{"style":409},[4576],{"type":51,"value":976},{"type":42,"tag":391,"props":4578,"children":4579},{"style":403},[4580],{"type":51,"value":2135},{"type":42,"tag":391,"props":4582,"children":4583},{"class":393,"line":439},[4584,4588],{"type":42,"tag":391,"props":4585,"children":4586},{"style":912},[4587],{"type":51,"value":2143},{"type":42,"tag":391,"props":4589,"children":4590},{"style":409},[4591],{"type":51,"value":920},{"type":42,"tag":391,"props":4593,"children":4594},{"class":393,"line":947},[4595,4599,4603],{"type":42,"tag":391,"props":4596,"children":4597},{"style":912},[4598],{"type":51,"value":2155},{"type":42,"tag":391,"props":4600,"children":4601},{"style":409},[4602],{"type":51,"value":976},{"type":42,"tag":391,"props":4604,"children":4605},{"style":403},[4606],{"type":51,"value":4509},{"type":42,"tag":391,"props":4608,"children":4609},{"class":393,"line":960},[4610,4614,4618],{"type":42,"tag":391,"props":4611,"children":4612},{"style":912},[4613],{"type":51,"value":2172},{"type":42,"tag":391,"props":4615,"children":4616},{"style":409},[4617],{"type":51,"value":976},{"type":42,"tag":391,"props":4619,"children":4620},{"style":403},[4621],{"type":51,"value":4622},"insights\n",{"type":42,"tag":391,"props":4624,"children":4625},{"class":393,"line":984},[4626,4630,4634],{"type":42,"tag":391,"props":4627,"children":4628},{"style":912},[4629],{"type":51,"value":2206},{"type":42,"tag":391,"props":4631,"children":4632},{"style":409},[4633],{"type":51,"value":976},{"type":42,"tag":391,"props":4635,"children":4636},{"style":403},[4637],{"type":51,"value":2215},{"type":42,"tag":391,"props":4639,"children":4640},{"class":393,"line":1002},[4641,4645,4649],{"type":42,"tag":391,"props":4642,"children":4643},{"style":912},[4644],{"type":51,"value":2223},{"type":42,"tag":391,"props":4646,"children":4647},{"style":409},[4648],{"type":51,"value":976},{"type":42,"tag":391,"props":4650,"children":4651},{"style":403},[4652],{"type":51,"value":4653},"date_start\n",{"type":42,"tag":391,"props":4655,"children":4656},{"class":393,"line":165},[4657,4661,4665],{"type":42,"tag":391,"props":4658,"children":4659},{"style":912},[4660],{"type":51,"value":2241},{"type":42,"tag":391,"props":4662,"children":4663},{"style":409},[4664],{"type":51,"value":976},{"type":42,"tag":391,"props":4666,"children":4667},{"style":403},[4668],{"type":51,"value":4669},"\"date_start,campaign_id\"\n",{"type":42,"tag":569,"props":4671,"children":4672},{"v-slot:google-ads":7},[4673,4678,4683,4690,4711,4715,4765,4772],{"type":42,"tag":2058,"props":4674,"children":4676},{"id":4675},"google-ads",[4677],{"type":51,"value":1715},{"type":42,"tag":43,"props":4679,"children":4680},{},[4681],{"type":51,"value":4682},"Google Ads covers your search and display ad spend and performance.",{"type":42,"tag":43,"props":4684,"children":4685},{},[4686],{"type":42,"tag":47,"props":4687,"children":4688},{},[4689],{"type":51,"value":4348},{"type":42,"tag":381,"props":4691,"children":4692},{"className":383,"code":617,"language":385,"meta":7,"style":7},[4693],{"type":42,"tag":240,"props":4694,"children":4695},{"__ignoreMap":7},[4696],{"type":42,"tag":391,"props":4697,"children":4698},{"class":393,"line":176},[4699,4703,4707],{"type":42,"tag":391,"props":4700,"children":4701},{"style":397},[4702],{"type":51,"value":445},{"type":42,"tag":391,"props":4704,"children":4705},{"style":403},[4706],{"type":51,"value":633},{"type":42,"tag":391,"props":4708,"children":4709},{"style":403},[4710],{"type":51,"value":638},{"type":42,"tag":43,"props":4712,"children":4713},{},[4714],{"type":51,"value":643},{"type":42,"tag":214,"props":4716,"children":4717},{},[4718,4732,4745,4755],{"type":42,"tag":218,"props":4719,"children":4720},{},[4721,4725,4726],{"type":42,"tag":47,"props":4722,"children":4723},{},[4724],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":4727,"children":4729},{"className":4728},[],[4730],{"type":51,"value":4731},"google_ads",{"type":42,"tag":218,"props":4733,"children":4734},{},[4735,4739,4740],{"type":42,"tag":47,"props":4736,"children":4737},{},[4738],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":4741,"children":4743},{"className":4742},[],[4744],{"type":51,"value":4731},{"type":42,"tag":218,"props":4746,"children":4747},{},[4748,4753],{"type":42,"tag":47,"props":4749,"children":4750},{},[4751],{"type":51,"value":4752},"Customer ID:",{"type":51,"value":4754}," your Google Ads customer ID",{"type":42,"tag":218,"props":4756,"children":4757},{},[4758,4763],{"type":42,"tag":47,"props":4759,"children":4760},{},[4761],{"type":51,"value":4762},"Credentials:",{"type":51,"value":4764}," path to your Google OAuth credentials JSON",{"type":42,"tag":43,"props":4766,"children":4767},{},[4768],{"type":42,"tag":47,"props":4769,"children":4770},{},[4771],{"type":51,"value":2864},{"type":42,"tag":563,"props":4773,"children":4775},{":variants":4774},"[{\"id\":\"gads-campaigns\",\"label\":\"Campaigns\"},{\"id\":\"gads-insights\",\"label\":\"Ad Insights\"}]",[4776,4874],{"type":42,"tag":569,"props":4777,"children":4778},{"v-slot:gads-campaigns":7},[4779],{"type":42,"tag":381,"props":4780,"children":4782},{"className":900,"code":4781,"language":902,"meta":7,"style":7},"name: raw.google_campaigns\ntype: ingestr\nparameters:\n  source_connection: google_ads\n  source_table: campaigns\n  incremental_strategy: replace\n",[4783],{"type":42,"tag":240,"props":4784,"children":4785},{"__ignoreMap":7},[4786,4802,4817,4828,4844,4859],{"type":42,"tag":391,"props":4787,"children":4788},{"class":393,"line":176},[4789,4793,4797],{"type":42,"tag":391,"props":4790,"children":4791},{"style":912},[4792],{"type":51,"value":971},{"type":42,"tag":391,"props":4794,"children":4795},{"style":409},[4796],{"type":51,"value":976},{"type":42,"tag":391,"props":4798,"children":4799},{"style":403},[4800],{"type":51,"value":4801},"raw.google_campaigns\n",{"type":42,"tag":391,"props":4803,"children":4804},{"class":393,"line":99},[4805,4809,4813],{"type":42,"tag":391,"props":4806,"children":4807},{"style":912},[4808],{"type":51,"value":2126},{"type":42,"tag":391,"props":4810,"children":4811},{"style":409},[4812],{"type":51,"value":976},{"type":42,"tag":391,"props":4814,"children":4815},{"style":403},[4816],{"type":51,"value":2135},{"type":42,"tag":391,"props":4818,"children":4819},{"class":393,"line":439},[4820,4824],{"type":42,"tag":391,"props":4821,"children":4822},{"style":912},[4823],{"type":51,"value":2143},{"type":42,"tag":391,"props":4825,"children":4826},{"style":409},[4827],{"type":51,"value":920},{"type":42,"tag":391,"props":4829,"children":4830},{"class":393,"line":947},[4831,4835,4839],{"type":42,"tag":391,"props":4832,"children":4833},{"style":912},[4834],{"type":51,"value":2155},{"type":42,"tag":391,"props":4836,"children":4837},{"style":409},[4838],{"type":51,"value":976},{"type":42,"tag":391,"props":4840,"children":4841},{"style":403},[4842],{"type":51,"value":4843},"google_ads\n",{"type":42,"tag":391,"props":4845,"children":4846},{"class":393,"line":960},[4847,4851,4855],{"type":42,"tag":391,"props":4848,"children":4849},{"style":912},[4850],{"type":51,"value":2172},{"type":42,"tag":391,"props":4852,"children":4853},{"style":409},[4854],{"type":51,"value":976},{"type":42,"tag":391,"props":4856,"children":4857},{"style":403},[4858],{"type":51,"value":3652},{"type":42,"tag":391,"props":4860,"children":4861},{"class":393,"line":984},[4862,4866,4870],{"type":42,"tag":391,"props":4863,"children":4864},{"style":912},[4865],{"type":51,"value":2206},{"type":42,"tag":391,"props":4867,"children":4868},{"style":409},[4869],{"type":51,"value":976},{"type":42,"tag":391,"props":4871,"children":4872},{"style":403},[4873],{"type":51,"value":2686},{"type":42,"tag":569,"props":4875,"children":4876},{"v-slot:gads-insights":7},[4877],{"type":42,"tag":381,"props":4878,"children":4880},{"className":900,"code":4879,"language":902,"meta":7,"style":7},"name: raw.google_ad_insights\ntype: ingestr\nparameters:\n  source_connection: google_ads\n  source_table: campaign_performance\n  incremental_strategy: merge\n  incremental_key: date\n  primary_key: \"date,campaign_id\"\n",[4881],{"type":42,"tag":240,"props":4882,"children":4883},{"__ignoreMap":7},[4884,4900,4915,4926,4941,4957,4972,4988],{"type":42,"tag":391,"props":4885,"children":4886},{"class":393,"line":176},[4887,4891,4895],{"type":42,"tag":391,"props":4888,"children":4889},{"style":912},[4890],{"type":51,"value":971},{"type":42,"tag":391,"props":4892,"children":4893},{"style":409},[4894],{"type":51,"value":976},{"type":42,"tag":391,"props":4896,"children":4897},{"style":403},[4898],{"type":51,"value":4899},"raw.google_ad_insights\n",{"type":42,"tag":391,"props":4901,"children":4902},{"class":393,"line":99},[4903,4907,4911],{"type":42,"tag":391,"props":4904,"children":4905},{"style":912},[4906],{"type":51,"value":2126},{"type":42,"tag":391,"props":4908,"children":4909},{"style":409},[4910],{"type":51,"value":976},{"type":42,"tag":391,"props":4912,"children":4913},{"style":403},[4914],{"type":51,"value":2135},{"type":42,"tag":391,"props":4916,"children":4917},{"class":393,"line":439},[4918,4922],{"type":42,"tag":391,"props":4919,"children":4920},{"style":912},[4921],{"type":51,"value":2143},{"type":42,"tag":391,"props":4923,"children":4924},{"style":409},[4925],{"type":51,"value":920},{"type":42,"tag":391,"props":4927,"children":4928},{"class":393,"line":947},[4929,4933,4937],{"type":42,"tag":391,"props":4930,"children":4931},{"style":912},[4932],{"type":51,"value":2155},{"type":42,"tag":391,"props":4934,"children":4935},{"style":409},[4936],{"type":51,"value":976},{"type":42,"tag":391,"props":4938,"children":4939},{"style":403},[4940],{"type":51,"value":4843},{"type":42,"tag":391,"props":4942,"children":4943},{"class":393,"line":960},[4944,4948,4952],{"type":42,"tag":391,"props":4945,"children":4946},{"style":912},[4947],{"type":51,"value":2172},{"type":42,"tag":391,"props":4949,"children":4950},{"style":409},[4951],{"type":51,"value":976},{"type":42,"tag":391,"props":4953,"children":4954},{"style":403},[4955],{"type":51,"value":4956},"campaign_performance\n",{"type":42,"tag":391,"props":4958,"children":4959},{"class":393,"line":984},[4960,4964,4968],{"type":42,"tag":391,"props":4961,"children":4962},{"style":912},[4963],{"type":51,"value":2206},{"type":42,"tag":391,"props":4965,"children":4966},{"style":409},[4967],{"type":51,"value":976},{"type":42,"tag":391,"props":4969,"children":4970},{"style":403},[4971],{"type":51,"value":2215},{"type":42,"tag":391,"props":4973,"children":4974},{"class":393,"line":1002},[4975,4979,4983],{"type":42,"tag":391,"props":4976,"children":4977},{"style":912},[4978],{"type":51,"value":2223},{"type":42,"tag":391,"props":4980,"children":4981},{"style":409},[4982],{"type":51,"value":976},{"type":42,"tag":391,"props":4984,"children":4985},{"style":403},[4986],{"type":51,"value":4987},"date\n",{"type":42,"tag":391,"props":4989,"children":4990},{"class":393,"line":165},[4991,4995,4999],{"type":42,"tag":391,"props":4992,"children":4993},{"style":912},[4994],{"type":51,"value":2241},{"type":42,"tag":391,"props":4996,"children":4997},{"style":409},[4998],{"type":51,"value":976},{"type":42,"tag":391,"props":5000,"children":5001},{"style":403},[5002],{"type":51,"value":5003},"\"date,campaign_id\"\n",{"type":42,"tag":569,"props":5005,"children":5006},{"v-slot:tiktok-ads":7},[5007,5012,5017,5024,5045,5049,5098,5105],{"type":42,"tag":2058,"props":5008,"children":5010},{"id":5009},"tiktok-ads",[5011],{"type":51,"value":1716},{"type":42,"tag":43,"props":5013,"children":5014},{},[5015],{"type":51,"value":5016},"TikTok Ads covers your TikTok video ad spend and performance.",{"type":42,"tag":43,"props":5018,"children":5019},{},[5020],{"type":42,"tag":47,"props":5021,"children":5022},{},[5023],{"type":51,"value":4348},{"type":42,"tag":381,"props":5025,"children":5026},{"className":383,"code":617,"language":385,"meta":7,"style":7},[5027],{"type":42,"tag":240,"props":5028,"children":5029},{"__ignoreMap":7},[5030],{"type":42,"tag":391,"props":5031,"children":5032},{"class":393,"line":176},[5033,5037,5041],{"type":42,"tag":391,"props":5034,"children":5035},{"style":397},[5036],{"type":51,"value":445},{"type":42,"tag":391,"props":5038,"children":5039},{"style":403},[5040],{"type":51,"value":633},{"type":42,"tag":391,"props":5042,"children":5043},{"style":403},[5044],{"type":51,"value":638},{"type":42,"tag":43,"props":5046,"children":5047},{},[5048],{"type":51,"value":643},{"type":42,"tag":214,"props":5050,"children":5051},{},[5052,5066,5079,5088],{"type":42,"tag":218,"props":5053,"children":5054},{},[5055,5059,5060],{"type":42,"tag":47,"props":5056,"children":5057},{},[5058],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":5061,"children":5063},{"className":5062},[],[5064],{"type":51,"value":5065},"tiktok_ads",{"type":42,"tag":218,"props":5067,"children":5068},{},[5069,5073,5074],{"type":42,"tag":47,"props":5070,"children":5071},{},[5072],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":5075,"children":5077},{"className":5076},[],[5078],{"type":51,"value":5065},{"type":42,"tag":218,"props":5080,"children":5081},{},[5082,5086],{"type":42,"tag":47,"props":5083,"children":5084},{},[5085],{"type":51,"value":4411},{"type":51,"value":5087}," your TikTok Marketing API access token",{"type":42,"tag":218,"props":5089,"children":5090},{},[5091,5096],{"type":42,"tag":47,"props":5092,"children":5093},{},[5094],{"type":51,"value":5095},"Advertiser ID:",{"type":51,"value":5097}," your TikTok advertiser ID",{"type":42,"tag":43,"props":5099,"children":5100},{},[5101],{"type":42,"tag":47,"props":5102,"children":5103},{},[5104],{"type":51,"value":2864},{"type":42,"tag":563,"props":5106,"children":5108},{":variants":5107},"[{\"id\":\"tt-campaigns\",\"label\":\"Campaigns\"},{\"id\":\"tt-insights\",\"label\":\"Ad Insights\"}]",[5109,5207],{"type":42,"tag":569,"props":5110,"children":5111},{"v-slot:tt-campaigns":7},[5112],{"type":42,"tag":381,"props":5113,"children":5115},{"className":900,"code":5114,"language":902,"meta":7,"style":7},"name: raw.tiktok_campaigns\ntype: ingestr\nparameters:\n  source_connection: tiktok_ads\n  source_table: campaigns\n  incremental_strategy: replace\n",[5116],{"type":42,"tag":240,"props":5117,"children":5118},{"__ignoreMap":7},[5119,5135,5150,5161,5177,5192],{"type":42,"tag":391,"props":5120,"children":5121},{"class":393,"line":176},[5122,5126,5130],{"type":42,"tag":391,"props":5123,"children":5124},{"style":912},[5125],{"type":51,"value":971},{"type":42,"tag":391,"props":5127,"children":5128},{"style":409},[5129],{"type":51,"value":976},{"type":42,"tag":391,"props":5131,"children":5132},{"style":403},[5133],{"type":51,"value":5134},"raw.tiktok_campaigns\n",{"type":42,"tag":391,"props":5136,"children":5137},{"class":393,"line":99},[5138,5142,5146],{"type":42,"tag":391,"props":5139,"children":5140},{"style":912},[5141],{"type":51,"value":2126},{"type":42,"tag":391,"props":5143,"children":5144},{"style":409},[5145],{"type":51,"value":976},{"type":42,"tag":391,"props":5147,"children":5148},{"style":403},[5149],{"type":51,"value":2135},{"type":42,"tag":391,"props":5151,"children":5152},{"class":393,"line":439},[5153,5157],{"type":42,"tag":391,"props":5154,"children":5155},{"style":912},[5156],{"type":51,"value":2143},{"type":42,"tag":391,"props":5158,"children":5159},{"style":409},[5160],{"type":51,"value":920},{"type":42,"tag":391,"props":5162,"children":5163},{"class":393,"line":947},[5164,5168,5172],{"type":42,"tag":391,"props":5165,"children":5166},{"style":912},[5167],{"type":51,"value":2155},{"type":42,"tag":391,"props":5169,"children":5170},{"style":409},[5171],{"type":51,"value":976},{"type":42,"tag":391,"props":5173,"children":5174},{"style":403},[5175],{"type":51,"value":5176},"tiktok_ads\n",{"type":42,"tag":391,"props":5178,"children":5179},{"class":393,"line":960},[5180,5184,5188],{"type":42,"tag":391,"props":5181,"children":5182},{"style":912},[5183],{"type":51,"value":2172},{"type":42,"tag":391,"props":5185,"children":5186},{"style":409},[5187],{"type":51,"value":976},{"type":42,"tag":391,"props":5189,"children":5190},{"style":403},[5191],{"type":51,"value":3652},{"type":42,"tag":391,"props":5193,"children":5194},{"class":393,"line":984},[5195,5199,5203],{"type":42,"tag":391,"props":5196,"children":5197},{"style":912},[5198],{"type":51,"value":2206},{"type":42,"tag":391,"props":5200,"children":5201},{"style":409},[5202],{"type":51,"value":976},{"type":42,"tag":391,"props":5204,"children":5205},{"style":403},[5206],{"type":51,"value":2686},{"type":42,"tag":569,"props":5208,"children":5209},{"v-slot:tt-insights":7},[5210],{"type":42,"tag":381,"props":5211,"children":5213},{"className":900,"code":5212,"language":902,"meta":7,"style":7},"name: raw.tiktok_ad_insights\ntype: ingestr\nparameters:\n  source_connection: tiktok_ads\n  source_table: ads\n  incremental_strategy: merge\n  incremental_key: stat_datetime\n  primary_key: \"stat_datetime,campaign_id\"\n",[5214],{"type":42,"tag":240,"props":5215,"children":5216},{"__ignoreMap":7},[5217,5233,5248,5259,5274,5290,5305,5321],{"type":42,"tag":391,"props":5218,"children":5219},{"class":393,"line":176},[5220,5224,5228],{"type":42,"tag":391,"props":5221,"children":5222},{"style":912},[5223],{"type":51,"value":971},{"type":42,"tag":391,"props":5225,"children":5226},{"style":409},[5227],{"type":51,"value":976},{"type":42,"tag":391,"props":5229,"children":5230},{"style":403},[5231],{"type":51,"value":5232},"raw.tiktok_ad_insights\n",{"type":42,"tag":391,"props":5234,"children":5235},{"class":393,"line":99},[5236,5240,5244],{"type":42,"tag":391,"props":5237,"children":5238},{"style":912},[5239],{"type":51,"value":2126},{"type":42,"tag":391,"props":5241,"children":5242},{"style":409},[5243],{"type":51,"value":976},{"type":42,"tag":391,"props":5245,"children":5246},{"style":403},[5247],{"type":51,"value":2135},{"type":42,"tag":391,"props":5249,"children":5250},{"class":393,"line":439},[5251,5255],{"type":42,"tag":391,"props":5252,"children":5253},{"style":912},[5254],{"type":51,"value":2143},{"type":42,"tag":391,"props":5256,"children":5257},{"style":409},[5258],{"type":51,"value":920},{"type":42,"tag":391,"props":5260,"children":5261},{"class":393,"line":947},[5262,5266,5270],{"type":42,"tag":391,"props":5263,"children":5264},{"style":912},[5265],{"type":51,"value":2155},{"type":42,"tag":391,"props":5267,"children":5268},{"style":409},[5269],{"type":51,"value":976},{"type":42,"tag":391,"props":5271,"children":5272},{"style":403},[5273],{"type":51,"value":5176},{"type":42,"tag":391,"props":5275,"children":5276},{"class":393,"line":960},[5277,5281,5285],{"type":42,"tag":391,"props":5278,"children":5279},{"style":912},[5280],{"type":51,"value":2172},{"type":42,"tag":391,"props":5282,"children":5283},{"style":409},[5284],{"type":51,"value":976},{"type":42,"tag":391,"props":5286,"children":5287},{"style":403},[5288],{"type":51,"value":5289},"ads\n",{"type":42,"tag":391,"props":5291,"children":5292},{"class":393,"line":984},[5293,5297,5301],{"type":42,"tag":391,"props":5294,"children":5295},{"style":912},[5296],{"type":51,"value":2206},{"type":42,"tag":391,"props":5298,"children":5299},{"style":409},[5300],{"type":51,"value":976},{"type":42,"tag":391,"props":5302,"children":5303},{"style":403},[5304],{"type":51,"value":2215},{"type":42,"tag":391,"props":5306,"children":5307},{"class":393,"line":1002},[5308,5312,5316],{"type":42,"tag":391,"props":5309,"children":5310},{"style":912},[5311],{"type":51,"value":2223},{"type":42,"tag":391,"props":5313,"children":5314},{"style":409},[5315],{"type":51,"value":976},{"type":42,"tag":391,"props":5317,"children":5318},{"style":403},[5319],{"type":51,"value":5320},"stat_datetime\n",{"type":42,"tag":391,"props":5322,"children":5323},{"class":393,"line":165},[5324,5328,5332],{"type":42,"tag":391,"props":5325,"children":5326},{"style":912},[5327],{"type":51,"value":2241},{"type":42,"tag":391,"props":5329,"children":5330},{"style":409},[5331],{"type":51,"value":976},{"type":42,"tag":391,"props":5333,"children":5334},{"style":403},[5335],{"type":51,"value":5336},"\"stat_datetime,campaign_id\"\n",{"type":42,"tag":1959,"props":5338,"children":5339},{},[],{"type":42,"tag":361,"props":5341,"children":5343},{"id":5342},"web-analytics",[5344],{"type":51,"value":5345},"Web Analytics",{"type":42,"tag":563,"props":5347,"children":5350},{":variants":5348,"group":5349},"[{\"id\":\"ga4\",\"label\":\"GA4\"},{\"id\":\"mixpanel\",\"label\":\"Mixpanel\"}]","analytics",[5351,5722],{"type":42,"tag":569,"props":5352,"children":5353},{"v-slot:ga4":7},[5354,5359,5364,5371,5392,5396,5453,5460],{"type":42,"tag":2058,"props":5355,"children":5357},{"id":5356},"ga4",[5358],{"type":51,"value":1720},{"type":42,"tag":43,"props":5360,"children":5361},{},[5362],{"type":51,"value":5363},"GA4 gives you the website funnel: who's visiting, where they come from, and what they do.",{"type":42,"tag":43,"props":5365,"children":5366},{},[5367],{"type":42,"tag":47,"props":5368,"children":5369},{},[5370],{"type":51,"value":4348},{"type":42,"tag":381,"props":5372,"children":5373},{"className":383,"code":617,"language":385,"meta":7,"style":7},[5374],{"type":42,"tag":240,"props":5375,"children":5376},{"__ignoreMap":7},[5377],{"type":42,"tag":391,"props":5378,"children":5379},{"class":393,"line":176},[5380,5384,5388],{"type":42,"tag":391,"props":5381,"children":5382},{"style":397},[5383],{"type":51,"value":445},{"type":42,"tag":391,"props":5385,"children":5386},{"style":403},[5387],{"type":51,"value":633},{"type":42,"tag":391,"props":5389,"children":5390},{"style":403},[5391],{"type":51,"value":638},{"type":42,"tag":43,"props":5393,"children":5394},{},[5395],{"type":51,"value":643},{"type":42,"tag":214,"props":5397,"children":5398},{},[5399,5413,5426,5443],{"type":42,"tag":218,"props":5400,"children":5401},{},[5402,5406,5407],{"type":42,"tag":47,"props":5403,"children":5404},{},[5405],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":5408,"children":5410},{"className":5409},[],[5411],{"type":51,"value":5412},"google_analytics",{"type":42,"tag":218,"props":5414,"children":5415},{},[5416,5420,5421],{"type":42,"tag":47,"props":5417,"children":5418},{},[5419],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":5422,"children":5424},{"className":5423},[],[5425],{"type":51,"value":5412},{"type":42,"tag":218,"props":5427,"children":5428},{},[5429,5434,5436],{"type":42,"tag":47,"props":5430,"children":5431},{},[5432],{"type":51,"value":5433},"Credentials path:",{"type":51,"value":5435}," path to your ",{"type":42,"tag":229,"props":5437,"children":5440},{"href":5438,"rel":5439},"https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fkeys-create-delete",[233],[5441],{"type":51,"value":5442},"Google service account JSON",{"type":42,"tag":218,"props":5444,"children":5445},{},[5446,5451],{"type":42,"tag":47,"props":5447,"children":5448},{},[5449],{"type":51,"value":5450},"Property ID:",{"type":51,"value":5452}," your GA4 property ID (found in GA4 Admin > Property Settings)",{"type":42,"tag":43,"props":5454,"children":5455},{},[5456],{"type":42,"tag":47,"props":5457,"children":5458},{},[5459],{"type":51,"value":2864},{"type":42,"tag":563,"props":5461,"children":5463},{":variants":5462},"[{\"id\":\"ga4-events\",\"label\":\"Events\"},{\"id\":\"ga4-sessions\",\"label\":\"Sessions\"}]",[5464,5594],{"type":42,"tag":569,"props":5465,"children":5466},{"v-slot:ga4-events":7},[5467],{"type":42,"tag":381,"props":5468,"children":5470},{"className":900,"code":5469,"language":902,"meta":7,"style":7},"name: raw.ga4_events\ntype: ingestr\nparameters:\n  source_connection: google_analytics\n  source_table: events\n  incremental_strategy: merge\n  incremental_key: date\n  primary_key: \"date,event_name\"\n",[5471],{"type":42,"tag":240,"props":5472,"children":5473},{"__ignoreMap":7},[5474,5490,5505,5516,5532,5548,5563,5578],{"type":42,"tag":391,"props":5475,"children":5476},{"class":393,"line":176},[5477,5481,5485],{"type":42,"tag":391,"props":5478,"children":5479},{"style":912},[5480],{"type":51,"value":971},{"type":42,"tag":391,"props":5482,"children":5483},{"style":409},[5484],{"type":51,"value":976},{"type":42,"tag":391,"props":5486,"children":5487},{"style":403},[5488],{"type":51,"value":5489},"raw.ga4_events\n",{"type":42,"tag":391,"props":5491,"children":5492},{"class":393,"line":99},[5493,5497,5501],{"type":42,"tag":391,"props":5494,"children":5495},{"style":912},[5496],{"type":51,"value":2126},{"type":42,"tag":391,"props":5498,"children":5499},{"style":409},[5500],{"type":51,"value":976},{"type":42,"tag":391,"props":5502,"children":5503},{"style":403},[5504],{"type":51,"value":2135},{"type":42,"tag":391,"props":5506,"children":5507},{"class":393,"line":439},[5508,5512],{"type":42,"tag":391,"props":5509,"children":5510},{"style":912},[5511],{"type":51,"value":2143},{"type":42,"tag":391,"props":5513,"children":5514},{"style":409},[5515],{"type":51,"value":920},{"type":42,"tag":391,"props":5517,"children":5518},{"class":393,"line":947},[5519,5523,5527],{"type":42,"tag":391,"props":5520,"children":5521},{"style":912},[5522],{"type":51,"value":2155},{"type":42,"tag":391,"props":5524,"children":5525},{"style":409},[5526],{"type":51,"value":976},{"type":42,"tag":391,"props":5528,"children":5529},{"style":403},[5530],{"type":51,"value":5531},"google_analytics\n",{"type":42,"tag":391,"props":5533,"children":5534},{"class":393,"line":960},[5535,5539,5543],{"type":42,"tag":391,"props":5536,"children":5537},{"style":912},[5538],{"type":51,"value":2172},{"type":42,"tag":391,"props":5540,"children":5541},{"style":409},[5542],{"type":51,"value":976},{"type":42,"tag":391,"props":5544,"children":5545},{"style":403},[5546],{"type":51,"value":5547},"events\n",{"type":42,"tag":391,"props":5549,"children":5550},{"class":393,"line":984},[5551,5555,5559],{"type":42,"tag":391,"props":5552,"children":5553},{"style":912},[5554],{"type":51,"value":2206},{"type":42,"tag":391,"props":5556,"children":5557},{"style":409},[5558],{"type":51,"value":976},{"type":42,"tag":391,"props":5560,"children":5561},{"style":403},[5562],{"type":51,"value":2215},{"type":42,"tag":391,"props":5564,"children":5565},{"class":393,"line":1002},[5566,5570,5574],{"type":42,"tag":391,"props":5567,"children":5568},{"style":912},[5569],{"type":51,"value":2223},{"type":42,"tag":391,"props":5571,"children":5572},{"style":409},[5573],{"type":51,"value":976},{"type":42,"tag":391,"props":5575,"children":5576},{"style":403},[5577],{"type":51,"value":4987},{"type":42,"tag":391,"props":5579,"children":5580},{"class":393,"line":165},[5581,5585,5589],{"type":42,"tag":391,"props":5582,"children":5583},{"style":912},[5584],{"type":51,"value":2241},{"type":42,"tag":391,"props":5586,"children":5587},{"style":409},[5588],{"type":51,"value":976},{"type":42,"tag":391,"props":5590,"children":5591},{"style":403},[5592],{"type":51,"value":5593},"\"date,event_name\"\n",{"type":42,"tag":569,"props":5595,"children":5596},{"v-slot:ga4-sessions":7},[5597],{"type":42,"tag":381,"props":5598,"children":5600},{"className":900,"code":5599,"language":902,"meta":7,"style":7},"name: raw.ga4_sessions\ntype: ingestr\nparameters:\n  source_connection: google_analytics\n  source_table: sessions\n  incremental_strategy: merge\n  incremental_key: date\n  primary_key: date\n",[5601],{"type":42,"tag":240,"props":5602,"children":5603},{"__ignoreMap":7},[5604,5620,5635,5646,5661,5677,5692,5707],{"type":42,"tag":391,"props":5605,"children":5606},{"class":393,"line":176},[5607,5611,5615],{"type":42,"tag":391,"props":5608,"children":5609},{"style":912},[5610],{"type":51,"value":971},{"type":42,"tag":391,"props":5612,"children":5613},{"style":409},[5614],{"type":51,"value":976},{"type":42,"tag":391,"props":5616,"children":5617},{"style":403},[5618],{"type":51,"value":5619},"raw.ga4_sessions\n",{"type":42,"tag":391,"props":5621,"children":5622},{"class":393,"line":99},[5623,5627,5631],{"type":42,"tag":391,"props":5624,"children":5625},{"style":912},[5626],{"type":51,"value":2126},{"type":42,"tag":391,"props":5628,"children":5629},{"style":409},[5630],{"type":51,"value":976},{"type":42,"tag":391,"props":5632,"children":5633},{"style":403},[5634],{"type":51,"value":2135},{"type":42,"tag":391,"props":5636,"children":5637},{"class":393,"line":439},[5638,5642],{"type":42,"tag":391,"props":5639,"children":5640},{"style":912},[5641],{"type":51,"value":2143},{"type":42,"tag":391,"props":5643,"children":5644},{"style":409},[5645],{"type":51,"value":920},{"type":42,"tag":391,"props":5647,"children":5648},{"class":393,"line":947},[5649,5653,5657],{"type":42,"tag":391,"props":5650,"children":5651},{"style":912},[5652],{"type":51,"value":2155},{"type":42,"tag":391,"props":5654,"children":5655},{"style":409},[5656],{"type":51,"value":976},{"type":42,"tag":391,"props":5658,"children":5659},{"style":403},[5660],{"type":51,"value":5531},{"type":42,"tag":391,"props":5662,"children":5663},{"class":393,"line":960},[5664,5668,5672],{"type":42,"tag":391,"props":5665,"children":5666},{"style":912},[5667],{"type":51,"value":2172},{"type":42,"tag":391,"props":5669,"children":5670},{"style":409},[5671],{"type":51,"value":976},{"type":42,"tag":391,"props":5673,"children":5674},{"style":403},[5675],{"type":51,"value":5676},"sessions\n",{"type":42,"tag":391,"props":5678,"children":5679},{"class":393,"line":984},[5680,5684,5688],{"type":42,"tag":391,"props":5681,"children":5682},{"style":912},[5683],{"type":51,"value":2206},{"type":42,"tag":391,"props":5685,"children":5686},{"style":409},[5687],{"type":51,"value":976},{"type":42,"tag":391,"props":5689,"children":5690},{"style":403},[5691],{"type":51,"value":2215},{"type":42,"tag":391,"props":5693,"children":5694},{"class":393,"line":1002},[5695,5699,5703],{"type":42,"tag":391,"props":5696,"children":5697},{"style":912},[5698],{"type":51,"value":2223},{"type":42,"tag":391,"props":5700,"children":5701},{"style":409},[5702],{"type":51,"value":976},{"type":42,"tag":391,"props":5704,"children":5705},{"style":403},[5706],{"type":51,"value":4987},{"type":42,"tag":391,"props":5708,"children":5709},{"class":393,"line":165},[5710,5714,5718],{"type":42,"tag":391,"props":5711,"children":5712},{"style":912},[5713],{"type":51,"value":2241},{"type":42,"tag":391,"props":5715,"children":5716},{"style":409},[5717],{"type":51,"value":976},{"type":42,"tag":391,"props":5719,"children":5720},{"style":403},[5721],{"type":51,"value":4987},{"type":42,"tag":569,"props":5723,"children":5724},{"v-slot:mixpanel":7},[5725,5730,5735,5742,5763,5767,5806,5813],{"type":42,"tag":2058,"props":5726,"children":5728},{"id":5727},"mixpanel",[5729],{"type":51,"value":1718},{"type":42,"tag":43,"props":5731,"children":5732},{},[5733],{"type":51,"value":5734},"Mixpanel gives you product analytics: user events, funnels, and engagement data.",{"type":42,"tag":43,"props":5736,"children":5737},{},[5738],{"type":42,"tag":47,"props":5739,"children":5740},{},[5741],{"type":51,"value":4348},{"type":42,"tag":381,"props":5743,"children":5744},{"className":383,"code":617,"language":385,"meta":7,"style":7},[5745],{"type":42,"tag":240,"props":5746,"children":5747},{"__ignoreMap":7},[5748],{"type":42,"tag":391,"props":5749,"children":5750},{"class":393,"line":176},[5751,5755,5759],{"type":42,"tag":391,"props":5752,"children":5753},{"style":397},[5754],{"type":51,"value":445},{"type":42,"tag":391,"props":5756,"children":5757},{"style":403},[5758],{"type":51,"value":633},{"type":42,"tag":391,"props":5760,"children":5761},{"style":403},[5762],{"type":51,"value":638},{"type":42,"tag":43,"props":5764,"children":5765},{},[5766],{"type":51,"value":643},{"type":42,"tag":214,"props":5768,"children":5769},{},[5770,5783,5796],{"type":42,"tag":218,"props":5771,"children":5772},{},[5773,5777,5778],{"type":42,"tag":47,"props":5774,"children":5775},{},[5776],{"type":51,"value":654},{"type":51,"value":656},{"type":42,"tag":240,"props":5779,"children":5781},{"className":5780},[],[5782],{"type":51,"value":5727},{"type":42,"tag":218,"props":5784,"children":5785},{},[5786,5790,5791],{"type":42,"tag":47,"props":5787,"children":5788},{},[5789],{"type":51,"value":669},{"type":51,"value":656},{"type":42,"tag":240,"props":5792,"children":5794},{"className":5793},[],[5795],{"type":51,"value":5727},{"type":42,"tag":218,"props":5797,"children":5798},{},[5799,5804],{"type":42,"tag":47,"props":5800,"children":5801},{},[5802],{"type":51,"value":5803},"API secret:",{"type":51,"value":5805}," your Mixpanel API secret (found in Project Settings)",{"type":42,"tag":43,"props":5807,"children":5808},{},[5809],{"type":42,"tag":47,"props":5810,"children":5811},{},[5812],{"type":51,"value":2864},{"type":42,"tag":563,"props":5814,"children":5816},{":variants":5815},"[{\"id\":\"mp-events\",\"label\":\"Events\"},{\"id\":\"mp-funnels\",\"label\":\"Funnels\"}]",[5817,5947],{"type":42,"tag":569,"props":5818,"children":5819},{"v-slot:mp-events":7},[5820],{"type":42,"tag":381,"props":5821,"children":5823},{"className":900,"code":5822,"language":902,"meta":7,"style":7},"name: raw.mixpanel_events\ntype: ingestr\nparameters:\n  source_connection: mixpanel\n  source_table: events\n  incremental_strategy: merge\n  incremental_key: time\n  primary_key: \"distinct_id,time\"\n",[5824],{"type":42,"tag":240,"props":5825,"children":5826},{"__ignoreMap":7},[5827,5843,5858,5869,5885,5900,5915,5931],{"type":42,"tag":391,"props":5828,"children":5829},{"class":393,"line":176},[5830,5834,5838],{"type":42,"tag":391,"props":5831,"children":5832},{"style":912},[5833],{"type":51,"value":971},{"type":42,"tag":391,"props":5835,"children":5836},{"style":409},[5837],{"type":51,"value":976},{"type":42,"tag":391,"props":5839,"children":5840},{"style":403},[5841],{"type":51,"value":5842},"raw.mixpanel_events\n",{"type":42,"tag":391,"props":5844,"children":5845},{"class":393,"line":99},[5846,5850,5854],{"type":42,"tag":391,"props":5847,"children":5848},{"style":912},[5849],{"type":51,"value":2126},{"type":42,"tag":391,"props":5851,"children":5852},{"style":409},[5853],{"type":51,"value":976},{"type":42,"tag":391,"props":5855,"children":5856},{"style":403},[5857],{"type":51,"value":2135},{"type":42,"tag":391,"props":5859,"children":5860},{"class":393,"line":439},[5861,5865],{"type":42,"tag":391,"props":5862,"children":5863},{"style":912},[5864],{"type":51,"value":2143},{"type":42,"tag":391,"props":5866,"children":5867},{"style":409},[5868],{"type":51,"value":920},{"type":42,"tag":391,"props":5870,"children":5871},{"class":393,"line":947},[5872,5876,5880],{"type":42,"tag":391,"props":5873,"children":5874},{"style":912},[5875],{"type":51,"value":2155},{"type":42,"tag":391,"props":5877,"children":5878},{"style":409},[5879],{"type":51,"value":976},{"type":42,"tag":391,"props":5881,"children":5882},{"style":403},[5883],{"type":51,"value":5884},"mixpanel\n",{"type":42,"tag":391,"props":5886,"children":5887},{"class":393,"line":960},[5888,5892,5896],{"type":42,"tag":391,"props":5889,"children":5890},{"style":912},[5891],{"type":51,"value":2172},{"type":42,"tag":391,"props":5893,"children":5894},{"style":409},[5895],{"type":51,"value":976},{"type":42,"tag":391,"props":5897,"children":5898},{"style":403},[5899],{"type":51,"value":5547},{"type":42,"tag":391,"props":5901,"children":5902},{"class":393,"line":984},[5903,5907,5911],{"type":42,"tag":391,"props":5904,"children":5905},{"style":912},[5906],{"type":51,"value":2206},{"type":42,"tag":391,"props":5908,"children":5909},{"style":409},[5910],{"type":51,"value":976},{"type":42,"tag":391,"props":5912,"children":5913},{"style":403},[5914],{"type":51,"value":2215},{"type":42,"tag":391,"props":5916,"children":5917},{"class":393,"line":1002},[5918,5922,5926],{"type":42,"tag":391,"props":5919,"children":5920},{"style":912},[5921],{"type":51,"value":2223},{"type":42,"tag":391,"props":5923,"children":5924},{"style":409},[5925],{"type":51,"value":976},{"type":42,"tag":391,"props":5927,"children":5928},{"style":403},[5929],{"type":51,"value":5930},"time\n",{"type":42,"tag":391,"props":5932,"children":5933},{"class":393,"line":165},[5934,5938,5942],{"type":42,"tag":391,"props":5935,"children":5936},{"style":912},[5937],{"type":51,"value":2241},{"type":42,"tag":391,"props":5939,"children":5940},{"style":409},[5941],{"type":51,"value":976},{"type":42,"tag":391,"props":5943,"children":5944},{"style":403},[5945],{"type":51,"value":5946},"\"distinct_id,time\"\n",{"type":42,"tag":569,"props":5948,"children":5949},{"v-slot:mp-funnels":7},[5950],{"type":42,"tag":381,"props":5951,"children":5953},{"className":900,"code":5952,"language":902,"meta":7,"style":7},"name: raw.mixpanel_funnels\ntype: ingestr\nparameters:\n  source_connection: mixpanel\n  source_table: funnels\n  incremental_strategy: replace\n",[5954],{"type":42,"tag":240,"props":5955,"children":5956},{"__ignoreMap":7},[5957,5973,5988,5999,6014,6030],{"type":42,"tag":391,"props":5958,"children":5959},{"class":393,"line":176},[5960,5964,5968],{"type":42,"tag":391,"props":5961,"children":5962},{"style":912},[5963],{"type":51,"value":971},{"type":42,"tag":391,"props":5965,"children":5966},{"style":409},[5967],{"type":51,"value":976},{"type":42,"tag":391,"props":5969,"children":5970},{"style":403},[5971],{"type":51,"value":5972},"raw.mixpanel_funnels\n",{"type":42,"tag":391,"props":5974,"children":5975},{"class":393,"line":99},[5976,5980,5984],{"type":42,"tag":391,"props":5977,"children":5978},{"style":912},[5979],{"type":51,"value":2126},{"type":42,"tag":391,"props":5981,"children":5982},{"style":409},[5983],{"type":51,"value":976},{"type":42,"tag":391,"props":5985,"children":5986},{"style":403},[5987],{"type":51,"value":2135},{"type":42,"tag":391,"props":5989,"children":5990},{"class":393,"line":439},[5991,5995],{"type":42,"tag":391,"props":5992,"children":5993},{"style":912},[5994],{"type":51,"value":2143},{"type":42,"tag":391,"props":5996,"children":5997},{"style":409},[5998],{"type":51,"value":920},{"type":42,"tag":391,"props":6000,"children":6001},{"class":393,"line":947},[6002,6006,6010],{"type":42,"tag":391,"props":6003,"children":6004},{"style":912},[6005],{"type":51,"value":2155},{"type":42,"tag":391,"props":6007,"children":6008},{"style":409},[6009],{"type":51,"value":976},{"type":42,"tag":391,"props":6011,"children":6012},{"style":403},[6013],{"type":51,"value":5884},{"type":42,"tag":391,"props":6015,"children":6016},{"class":393,"line":960},[6017,6021,6025],{"type":42,"tag":391,"props":6018,"children":6019},{"style":912},[6020],{"type":51,"value":2172},{"type":42,"tag":391,"props":6022,"children":6023},{"style":409},[6024],{"type":51,"value":976},{"type":42,"tag":391,"props":6026,"children":6027},{"style":403},[6028],{"type":51,"value":6029},"funnels\n",{"type":42,"tag":391,"props":6031,"children":6032},{"class":393,"line":984},[6033,6037,6041],{"type":42,"tag":391,"props":6034,"children":6035},{"style":912},[6036],{"type":51,"value":2206},{"type":42,"tag":391,"props":6038,"children":6039},{"style":409},[6040],{"type":51,"value":976},{"type":42,"tag":391,"props":6042,"children":6043},{"style":403},[6044],{"type":51,"value":2686},{"type":42,"tag":1959,"props":6046,"children":6047},{},[],{"type":42,"tag":361,"props":6049,"children":6051},{"id":6050},"validate-and-run",[6052],{"type":51,"value":6053},"Validate and run",{"type":42,"tag":43,"props":6055,"children":6056},{},[6057],{"type":51,"value":6058},"Validate that all your asset definitions are correct:",{"type":42,"tag":381,"props":6060,"children":6061},{"className":383,"code":1629,"language":385,"meta":7,"style":7},[6062],{"type":42,"tag":240,"props":6063,"children":6064},{"__ignoreMap":7},[6065],{"type":42,"tag":391,"props":6066,"children":6067},{"class":393,"line":176},[6068,6072,6076],{"type":42,"tag":391,"props":6069,"children":6070},{"style":397},[6071],{"type":51,"value":445},{"type":42,"tag":391,"props":6073,"children":6074},{"style":403},[6075],{"type":51,"value":1645},{"type":42,"tag":391,"props":6077,"children":6078},{"style":403},[6079],{"type":51,"value":1650},{"type":42,"tag":43,"props":6081,"children":6082},{},[6083],{"type":51,"value":6084},"Or ask Claude Code:",{"type":42,"tag":1574,"props":6086,"children":6087},{},[6088],{"type":42,"tag":43,"props":6089,"children":6090},{},[6091],{"type":51,"value":6092},"Run bruin validate and fix any issues you find in the asset files.",{"type":42,"tag":43,"props":6094,"children":6095},{},[6096],{"type":51,"value":6097},"Fix any errors - the most common issue is a typo in a connection name or a missing required field.",{"type":42,"tag":43,"props":6099,"children":6100},{},[6101],{"type":51,"value":6102},"Then run the pipeline. For your first run, start with a small date range (about a month) to verify everything works before doing a full backfill:",{"type":42,"tag":381,"props":6104,"children":6106},{"className":383,"code":6105,"language":385,"meta":7,"style":7},"bruin run --start-date 2025-01-01 --end-date 2025-02-01 .\n",[6107],{"type":42,"tag":240,"props":6108,"children":6109},{"__ignoreMap":7},[6110],{"type":42,"tag":391,"props":6111,"children":6112},{"class":393,"line":176},[6113,6117,6122,6127,6132,6137,6142],{"type":42,"tag":391,"props":6114,"children":6115},{"style":397},[6116],{"type":51,"value":445},{"type":42,"tag":391,"props":6118,"children":6119},{"style":403},[6120],{"type":51,"value":6121}," run",{"type":42,"tag":391,"props":6123,"children":6124},{"style":415},[6125],{"type":51,"value":6126}," --start-date",{"type":42,"tag":391,"props":6128,"children":6129},{"style":403},[6130],{"type":51,"value":6131}," 2025-01-01",{"type":42,"tag":391,"props":6133,"children":6134},{"style":415},[6135],{"type":51,"value":6136}," --end-date",{"type":42,"tag":391,"props":6138,"children":6139},{"style":403},[6140],{"type":51,"value":6141}," 2025-02-01",{"type":42,"tag":391,"props":6143,"children":6144},{"style":403},[6145],{"type":51,"value":1650},{"type":42,"tag":43,"props":6147,"children":6148},{},[6149,6151,6157,6159,6165,6167,6172,6173,6177],{"type":51,"value":6150},"This tells Bruin to only pull data within that interval. The ",{"type":42,"tag":240,"props":6152,"children":6154},{"className":6153},[],[6155],{"type":51,"value":6156},"--start-date",{"type":51,"value":6158}," and ",{"type":42,"tag":240,"props":6160,"children":6162},{"className":6161},[],[6163],{"type":51,"value":6164},"--end-date",{"type":51,"value":6166}," flags control the date range passed to each ",{"type":42,"tag":229,"props":6168,"children":6169},{"href":302},[6170],{"type":51,"value":6171},"ingestor asset",{"type":51,"value":1897},{"type":42,"tag":229,"props":6174,"children":6175},{"href":317},[6176],{"type":51,"value":320},{"type":51,"value":6178}," for all available flags.",{"type":42,"tag":43,"props":6180,"children":6181},{},[6182,6184,6190,6191,6197],{"type":51,"value":6183},"If you have multiple environments (e.g. ",{"type":42,"tag":240,"props":6185,"children":6187},{"className":6186},[],[6188],{"type":51,"value":6189},"dev",{"type":51,"value":6158},{"type":42,"tag":240,"props":6192,"children":6194},{"className":6193},[],[6195],{"type":51,"value":6196},"prod",{"type":51,"value":6198},"), you can specify which one to use:",{"type":42,"tag":381,"props":6200,"children":6202},{"className":383,"code":6201,"language":385,"meta":7,"style":7},"bruin run --start-date 2025-01-01 --end-date 2025-02-01 -e default .\n",[6203],{"type":42,"tag":240,"props":6204,"children":6205},{"__ignoreMap":7},[6206],{"type":42,"tag":391,"props":6207,"children":6208},{"class":393,"line":176},[6209,6213,6217,6221,6225,6229,6233,6238,6243],{"type":42,"tag":391,"props":6210,"children":6211},{"style":397},[6212],{"type":51,"value":445},{"type":42,"tag":391,"props":6214,"children":6215},{"style":403},[6216],{"type":51,"value":6121},{"type":42,"tag":391,"props":6218,"children":6219},{"style":415},[6220],{"type":51,"value":6126},{"type":42,"tag":391,"props":6222,"children":6223},{"style":403},[6224],{"type":51,"value":6131},{"type":42,"tag":391,"props":6226,"children":6227},{"style":415},[6228],{"type":51,"value":6136},{"type":42,"tag":391,"props":6230,"children":6231},{"style":403},[6232],{"type":51,"value":6141},{"type":42,"tag":391,"props":6234,"children":6235},{"style":415},[6236],{"type":51,"value":6237}," -e",{"type":42,"tag":391,"props":6239,"children":6240},{"style":403},[6241],{"type":51,"value":6242}," default",{"type":42,"tag":391,"props":6244,"children":6245},{"style":403},[6246],{"type":51,"value":1650},{"type":42,"tag":43,"props":6248,"children":6249},{},[6250],{"type":51,"value":6251},"Once you've confirmed the data looks right, do a full backfill with a wider range:",{"type":42,"tag":381,"props":6253,"children":6255},{"className":383,"code":6254,"language":385,"meta":7,"style":7},"bruin run --start-date 2024-01-01 --end-date 2026-04-01 .\n",[6256],{"type":42,"tag":240,"props":6257,"children":6258},{"__ignoreMap":7},[6259],{"type":42,"tag":391,"props":6260,"children":6261},{"class":393,"line":176},[6262,6266,6270,6274,6279,6283,6288],{"type":42,"tag":391,"props":6263,"children":6264},{"style":397},[6265],{"type":51,"value":445},{"type":42,"tag":391,"props":6267,"children":6268},{"style":403},[6269],{"type":51,"value":6121},{"type":42,"tag":391,"props":6271,"children":6272},{"style":415},[6273],{"type":51,"value":6126},{"type":42,"tag":391,"props":6275,"children":6276},{"style":403},[6277],{"type":51,"value":6278}," 2024-01-01",{"type":42,"tag":391,"props":6280,"children":6281},{"style":415},[6282],{"type":51,"value":6136},{"type":42,"tag":391,"props":6284,"children":6285},{"style":403},[6286],{"type":51,"value":6287}," 2026-04-01",{"type":42,"tag":391,"props":6289,"children":6290},{"style":403},[6291],{"type":51,"value":1650},{"type":42,"tag":361,"props":6293,"children":6295},{"id":6294},"verify-data-landed",[6296],{"type":51,"value":6297},"Verify data landed",{"type":42,"tag":43,"props":6299,"children":6300},{},[6301],{"type":51,"value":6302},"Ask Claude Code to check all your tables at once:",{"type":42,"tag":1574,"props":6304,"children":6305},{},[6306],{"type":42,"tag":43,"props":6307,"children":6308},{},[6309],{"type":51,"value":6310},"Query each raw table in the warehouse and give me the row count for every source we ingested.",{"type":42,"tag":43,"props":6312,"children":6313},{},[6314],{"type":51,"value":6315},"If you see row counts greater than zero, your ingestion is working. If a table is empty, ask Claude Code to troubleshoot:",{"type":42,"tag":1574,"props":6317,"children":6318},{},[6319],{"type":42,"tag":43,"props":6320,"children":6321},{},[6322],{"type":51,"value":6323},"The raw.shopify_orders table is empty after running the pipeline. Check the asset definition and connection, and tell me what might be wrong.",{"type":42,"tag":86,"props":6325,"children":6326},{"id":1671},[6327],{"type":51,"value":1674},{"type":42,"tag":43,"props":6329,"children":6330},{},[6331,6333,6337],{"type":51,"value":6332},"You now have raw ecommerce data flowing from your SaaS sources into your warehouse. Each ",{"type":42,"tag":229,"props":6334,"children":6335},{"href":302},[6336],{"type":51,"value":6171},{"type":51,"value":6338}," uses incremental loading - on subsequent runs, it only pulls new and updated records instead of re-fetching everything.",{"type":42,"tag":43,"props":6340,"children":6341},{},[6342],{"type":51,"value":6343},"Next, you'll build a staging layer on top of this raw data to clean, join, and deduplicate across sources.",{"type":42,"tag":1681,"props":6345,"children":6346},{},[6347],{"type":51,"value":1685},{"title":7,"searchDepth":99,"depth":99,"links":6349},[6350,6351,6354,6364],{"id":193,"depth":99,"text":196},{"id":324,"depth":99,"text":327,"children":6352},[6353],{"id":1768,"depth":439,"text":1771},{"id":356,"depth":99,"text":359,"children":6355},[6356,6357,6358,6359,6360,6361,6362,6363],{"id":1796,"depth":439,"text":1799},{"id":1964,"depth":439,"text":1967},{"id":2716,"depth":439,"text":2719},{"id":3465,"depth":439,"text":3468},{"id":4319,"depth":439,"text":4322},{"id":5342,"depth":439,"text":5345},{"id":6050,"depth":439,"text":6053},{"id":6294,"depth":439,"text":6297},{"id":1671,"depth":99,"text":1674},"content:tutorials:ecommerce-pipeline:ingest-data.md","tutorials\u002Fecommerce-pipeline\u002Fingest-data.md","tutorials\u002Fecommerce-pipeline\u002Fingest-data",{"_path":6369,"_dir":12,"_draft":6,"_partial":6,"_locale":7,"title":6370,"description":6371,"date":10,"readingTime":1707,"category":166,"tags":6372,"difficulty":6374,"module":12,"subSteps":13,"step":439,"variants":6375,"journeys":6376,"learnMore":6377,"author":6387,"body":6388,"_type":102,"_id":14361,"_source":104,"_file":14362,"_stem":14363,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline\u002Fdata-preparation","Clean & Join Your Data","Build a staging layer that cleans, deduplicates, and joins data across Shopify, Stripe, and your marketing, ads, and analytics sources into consistent, analysis-ready tables.",[168,169,6373,171,172,173,174],"SQL","Intermediate",[171,172,173],[179,180],[6378,6381,6384],{"label":6379,"url":6380},"Materialization strategies","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fassets\u002Fmaterialization.html",{"label":6382,"url":6383},"Quality checks","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fquality\u002Foverview.html",{"label":6385,"url":6386},"Asset dependencies","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fassets\u002Fdefinition-schema.html",{"name":35,"role":36,"image":37},{"type":39,"children":6389,"toc":14341},[6390,6394,6399,6403,6408,6413,6417,6430,6454,6460,6465,6473,6478,6483,6632,6644,6649,6737,6753,9494,9514,9526,9560,9630,9644,10313,10331,10343,10362,10392,10406,10723,10735,10740,10754,10782,10788,11809,11815,11828,12435,12465,12477,12482,12496,12502,12530,13562,13568,13601,14085,14093,14099,14120,14125,14162,14173,14212,14218,14223,14231,14236,14244,14248,14325,14337],{"type":42,"tag":86,"props":6391,"children":6392},{"id":193},[6393],{"type":51,"value":196},{"type":42,"tag":43,"props":6395,"children":6396},{},[6397],{"type":51,"value":6398},"Write SQL assets that clean and join the raw data from Step 2 into a staging layer - five consistent tables that the report layer builds on.",{"type":42,"tag":86,"props":6400,"children":6401},{"id":324},[6402],{"type":51,"value":327},{"type":42,"tag":43,"props":6404,"children":6405},{},[6406],{"type":51,"value":6407},"Raw data from five different SaaS tools has different formats, timestamps, IDs, and conventions. Shopify stores amounts in dollars, Stripe stores them in cents. Your email platform tracks opens, your ads platform tracks impressions - both are \"engagement\" but they look nothing alike.",{"type":42,"tag":43,"props":6409,"children":6410},{},[6411],{"type":51,"value":6412},"The staging layer normalizes everything into a consistent format so that reports are accurate and trustworthy.",{"type":42,"tag":86,"props":6414,"children":6415},{"id":356},[6416],{"type":51,"value":359},{"type":42,"tag":43,"props":6418,"children":6419},{},[6420,6422,6428],{"type":51,"value":6421},"Create a ",{"type":42,"tag":240,"props":6423,"children":6425},{"className":6424},[],[6426],{"type":51,"value":6427},"staging\u002F",{"type":51,"value":6429}," subfolder to keep your staging assets organized:",{"type":42,"tag":381,"props":6431,"children":6433},{"className":383,"code":6432,"language":385,"meta":7,"style":7},"mkdir -p ecommerce\u002Fassets\u002Fstaging\n",[6434],{"type":42,"tag":240,"props":6435,"children":6436},{"__ignoreMap":7},[6437],{"type":42,"tag":391,"props":6438,"children":6439},{"class":393,"line":176},[6440,6444,6449],{"type":42,"tag":391,"props":6441,"children":6442},{"style":397},[6443],{"type":51,"value":400},{"type":42,"tag":391,"props":6445,"children":6446},{"style":415},[6447],{"type":51,"value":6448}," -p",{"type":42,"tag":391,"props":6450,"children":6451},{"style":403},[6452],{"type":51,"value":6453}," ecommerce\u002Fassets\u002Fstaging\n",{"type":42,"tag":361,"props":6455,"children":6457},{"id":6456},"using-claude-code-to-write-staging-sql",[6458],{"type":51,"value":6459},"Using Claude Code to write staging SQL",{"type":42,"tag":43,"props":6461,"children":6462},{},[6463],{"type":51,"value":6464},"This is where Claude Code really helps. Instead of writing every SQL file from scratch, you can ask Claude Code to look at your raw tables and generate the staging queries for you:",{"type":42,"tag":1574,"props":6466,"children":6467},{},[6468],{"type":42,"tag":43,"props":6469,"children":6470},{},[6471],{"type":51,"value":6472},"Look at the schemas for raw.shopify_orders and raw.stripe_charges in my warehouse. Write a Bruin SQL asset that joins them into a staging.stg_orders table - deduplicate, convert Stripe cents to dollars, and add not_null and unique checks on order_id. Put it in ecommerce\u002Fassets\u002Fstaging\u002Fstg_orders.sql.",{"type":42,"tag":43,"props":6474,"children":6475},{},[6476],{"type":51,"value":6477},"Claude Code will use the Bruin MCP to inspect the actual column names and types in your warehouse, then write SQL that matches your real data. You can do this for each staging table below.",{"type":42,"tag":43,"props":6479,"children":6480},{},[6481],{"type":51,"value":6482},"The SQL examples below are what the files should look like. You can create them manually, or have Claude Code generate them and just review the output.",{"type":42,"tag":339,"props":6484,"children":6485},{"type":2689},[6486,6496],{"type":42,"tag":43,"props":6487,"children":6488},{},[6489,6494],{"type":42,"tag":47,"props":6490,"children":6491},{},[6492],{"type":51,"value":6493},"Production tips from a real Shopify pipeline:",{"type":51,"value":6495}," Shopify's raw data has some quirks to handle in staging:",{"type":42,"tag":214,"props":6497,"children":6498},{},[6499,6517,6535,6575,6601],{"type":42,"tag":218,"props":6500,"children":6501},{},[6502,6507,6509,6515],{"type":42,"tag":47,"props":6503,"children":6504},{},[6505],{"type":51,"value":6506},"Test orders:",{"type":51,"value":6508}," Filter with ",{"type":42,"tag":240,"props":6510,"children":6512},{"className":6511},[],[6513],{"type":51,"value":6514},"WHERE test IS NOT TRUE",{"type":51,"value":6516}," to exclude test transactions",{"type":42,"tag":218,"props":6518,"children":6519},{},[6520,6525,6527,6533],{"type":42,"tag":47,"props":6521,"children":6522},{},[6523],{"type":51,"value":6524},"Deduplication:",{"type":51,"value":6526}," Shopify can send the same order multiple times. Add ",{"type":42,"tag":240,"props":6528,"children":6530},{"className":6529},[],[6531],{"type":51,"value":6532},"QUALIFY ROW_NUMBER() OVER (PARTITION BY id ORDER BY updated_at DESC) = 1",{"type":51,"value":6534}," to keep only the latest version",{"type":42,"tag":218,"props":6536,"children":6537},{},[6538,6543,6545,6551,6552,6558,6559,6565,6567,6573],{"type":42,"tag":47,"props":6539,"children":6540},{},[6541],{"type":51,"value":6542},"JSON fields:",{"type":51,"value":6544}," Fields like ",{"type":42,"tag":240,"props":6546,"children":6548},{"className":6547},[],[6549],{"type":51,"value":6550},"customer",{"type":51,"value":292},{"type":42,"tag":240,"props":6553,"children":6555},{"className":6554},[],[6556],{"type":51,"value":6557},"shipping_address",{"type":51,"value":314},{"type":42,"tag":240,"props":6560,"children":6562},{"className":6561},[],[6563],{"type":51,"value":6564},"line_items",{"type":51,"value":6566}," are nested JSON. Extract them with ",{"type":42,"tag":240,"props":6568,"children":6570},{"className":6569},[],[6571],{"type":51,"value":6572},"JSON_EXTRACT_SCALAR(customer, '$.id')",{"type":51,"value":6574}," (BigQuery) or equivalent",{"type":42,"tag":218,"props":6576,"children":6577},{},[6578,6583,6585,6591,6593,6599],{"type":42,"tag":47,"props":6579,"children":6580},{},[6581],{"type":51,"value":6582},"Product IDs:",{"type":51,"value":6584}," Shopify product IDs come in GID format (",{"type":42,"tag":240,"props":6586,"children":6588},{"className":6587},[],[6589],{"type":51,"value":6590},"gid:\u002F\u002Fshopify\u002FProduct\u002F123456789",{"type":51,"value":6592},"). Parse with ",{"type":42,"tag":240,"props":6594,"children":6596},{"className":6595},[],[6597],{"type":51,"value":6598},"REPLACE(id, 'gid:\u002F\u002Fshopify\u002FProduct\u002F', '')",{"type":51,"value":6600}," in your products staging table",{"type":42,"tag":218,"props":6602,"children":6603},{},[6604,6609,6611,6617,6619,6624,6626],{"type":42,"tag":47,"props":6605,"children":6606},{},[6607],{"type":51,"value":6608},"Line items:",{"type":51,"value":6610}," For product-level analytics, create a ",{"type":42,"tag":240,"props":6612,"children":6614},{"className":6613},[],[6615],{"type":51,"value":6616},"staging.stg_order_line_items",{"type":51,"value":6618}," table that flattens the ",{"type":42,"tag":240,"props":6620,"children":6622},{"className":6621},[],[6623],{"type":51,"value":6564},{"type":51,"value":6625}," JSON array using ",{"type":42,"tag":240,"props":6627,"children":6629},{"className":6628},[],[6630],{"type":51,"value":6631},"UNNEST(JSON_EXTRACT_ARRAY(line_items))",{"type":42,"tag":361,"props":6633,"children":6635},{"id":6634},"_1-staged-orders-stg_orderssql",[6636,6638],{"type":51,"value":6637},"1) Staged orders - ",{"type":42,"tag":240,"props":6639,"children":6641},{"className":6640},[],[6642],{"type":51,"value":6643},"stg_orders.sql",{"type":42,"tag":43,"props":6645,"children":6646},{},[6647],{"type":51,"value":6648},"This is the core table: every order, enriched with Stripe payment data.",{"type":42,"tag":339,"props":6650,"children":6652},{"type":6651},"warning",[6653],{"type":42,"tag":43,"props":6654,"children":6655},{},[6656,6658,6664,6666,6672,6674,6680,6682,6686,6688,6693,6695,6700,6702,6707,6709,6715,6717,6722,6724,6729,6730,6735],{"type":51,"value":6657},"The SQL below includes a ",{"type":42,"tag":240,"props":6659,"children":6661},{"className":6660},[],[6662],{"type":51,"value":6663},"LEFT JOIN",{"type":51,"value":6665}," to ",{"type":42,"tag":240,"props":6667,"children":6669},{"className":6668},[],[6670],{"type":51,"value":6671},"raw.stripe_charges",{"type":51,"value":6673}," and lists it in ",{"type":42,"tag":240,"props":6675,"children":6677},{"className":6676},[],[6678],{"type":51,"value":6679},"depends",{"type":51,"value":6681},". This only applies if you set up Stripe in Step 2. If you're using ",{"type":42,"tag":47,"props":6683,"children":6684},{},[6685],{"type":51,"value":2732},{"type":51,"value":6687},", remove ",{"type":42,"tag":240,"props":6689,"children":6691},{"className":6690},[],[6692],{"type":51,"value":6671},{"type":51,"value":6694}," from the ",{"type":42,"tag":240,"props":6696,"children":6698},{"className":6697},[],[6699],{"type":51,"value":6679},{"type":51,"value":6701}," list and remove the ",{"type":42,"tag":240,"props":6703,"children":6705},{"className":6704},[],[6706],{"type":51,"value":6663},{"type":51,"value":6708}," and the three ",{"type":42,"tag":240,"props":6710,"children":6712},{"className":6711},[],[6713],{"type":51,"value":6714},"stripe_*",{"type":51,"value":6716}," columns from the SELECT. The payment data is already in ",{"type":42,"tag":240,"props":6718,"children":6720},{"className":6719},[],[6721],{"type":51,"value":2763},{"type":51,"value":6723}," (the ",{"type":42,"tag":240,"props":6725,"children":6727},{"className":6726},[],[6728],{"type":51,"value":2743},{"type":51,"value":6158},{"type":42,"tag":240,"props":6731,"children":6733},{"className":6732},[],[6734],{"type":51,"value":2750},{"type":51,"value":6736}," fields). Ask Claude Code to adjust the query for you if needed.",{"type":42,"tag":43,"props":6738,"children":6739},{},[6740,6742,6751],{"type":51,"value":6741},"Create ",{"type":42,"tag":47,"props":6743,"children":6744},{},[6745],{"type":42,"tag":240,"props":6746,"children":6748},{"className":6747},[],[6749],{"type":51,"value":6750},"ecommerce\u002Fassets\u002Fstaging\u002Fstg_orders.sql",{"type":51,"value":6752},":",{"type":42,"tag":563,"props":6754,"children":6755},{":variants":565,"group":566},[6756,7701,8666],{"type":42,"tag":569,"props":6757,"children":6758},{"v-slot:clickhouse":7},[6759],{"type":42,"tag":381,"props":6760,"children":6764},{"className":6761,"code":6762,"language":6763,"meta":7,"style":7},"language-sql shiki shiki-themes github-dark","\u002F* @bruin\nname: staging.stg_orders\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.shopify_orders\n  - raw.stripe_charges\ncolumns:\n  - name: order_id\n    type: varchar\n    checks:\n      - name: not_null\n      - name: unique\n  - name: order_date\n    type: timestamp\n    checks:\n      - name: not_null\ncustom_checks:\n  - name: has_rows\n    query: \"SELECT count(*) > 0 FROM staging.stg_orders\"\n    value: 1\n@bruin *\u002F\n\nSELECT\n    o.id AS order_id,\n    o.order_number,\n    o.email AS customer_email,\n    o.created_at AS order_date,\n    o.financial_status AS payment_status,\n    o.fulfillment_status,\n    CAST(o.total_price AS DECIMAL(12,2)) AS order_total,\n    CAST(o.subtotal_price AS DECIMAL(12,2)) AS subtotal,\n    CAST(o.total_tax AS DECIMAL(12,2)) AS tax_amount,\n    CAST(o.total_discounts AS DECIMAL(12,2)) AS discount_amount,\n    o.currency,\n    o.cancel_reason,\n    o.cancelled_at,\n    c.amount \u002F 100.0 AS stripe_charge_amount,\n    c.status AS stripe_status,\n    c.paid AS stripe_paid\nFROM raw.shopify_orders o\nLEFT JOIN raw.stripe_charges c\n    ON o.email = c.receipt_email\n    AND toDate(o.created_at) = toDate(c.created)\n","sql",[6765],{"type":42,"tag":240,"props":6766,"children":6767},{"__ignoreMap":7},[6768,6777,6785,6793,6801,6809,6817,6825,6833,6841,6850,6859,6868,6877,6886,6894,6903,6911,6919,6928,6937,6946,6955,6964,6973,6982,7010,7032,7058,7084,7109,7130,7200,7262,7324,7386,7407,7428,7449,7495,7521,7547,7575,7601,7642],{"type":42,"tag":391,"props":6769,"children":6770},{"class":393,"line":176},[6771],{"type":42,"tag":391,"props":6772,"children":6774},{"style":6773},"--shiki-default:#6A737D",[6775],{"type":51,"value":6776},"\u002F* @bruin\n",{"type":42,"tag":391,"props":6778,"children":6779},{"class":393,"line":99},[6780],{"type":42,"tag":391,"props":6781,"children":6782},{"style":6773},[6783],{"type":51,"value":6784},"name: staging.stg_orders\n",{"type":42,"tag":391,"props":6786,"children":6787},{"class":393,"line":439},[6788],{"type":42,"tag":391,"props":6789,"children":6790},{"style":6773},[6791],{"type":51,"value":6792},"type: sql\n",{"type":42,"tag":391,"props":6794,"children":6795},{"class":393,"line":947},[6796],{"type":42,"tag":391,"props":6797,"children":6798},{"style":6773},[6799],{"type":51,"value":6800},"materialization:\n",{"type":42,"tag":391,"props":6802,"children":6803},{"class":393,"line":960},[6804],{"type":42,"tag":391,"props":6805,"children":6806},{"style":6773},[6807],{"type":51,"value":6808},"  type: table\n",{"type":42,"tag":391,"props":6810,"children":6811},{"class":393,"line":984},[6812],{"type":42,"tag":391,"props":6813,"children":6814},{"style":6773},[6815],{"type":51,"value":6816},"depends:\n",{"type":42,"tag":391,"props":6818,"children":6819},{"class":393,"line":1002},[6820],{"type":42,"tag":391,"props":6821,"children":6822},{"style":6773},[6823],{"type":51,"value":6824},"  - raw.shopify_orders\n",{"type":42,"tag":391,"props":6826,"children":6827},{"class":393,"line":165},[6828],{"type":42,"tag":391,"props":6829,"children":6830},{"style":6773},[6831],{"type":51,"value":6832},"  - raw.stripe_charges\n",{"type":42,"tag":391,"props":6834,"children":6835},{"class":393,"line":2235},[6836],{"type":42,"tag":391,"props":6837,"children":6838},{"style":6773},[6839],{"type":51,"value":6840},"columns:\n",{"type":42,"tag":391,"props":6842,"children":6844},{"class":393,"line":6843},10,[6845],{"type":42,"tag":391,"props":6846,"children":6847},{"style":6773},[6848],{"type":51,"value":6849},"  - name: order_id\n",{"type":42,"tag":391,"props":6851,"children":6853},{"class":393,"line":6852},11,[6854],{"type":42,"tag":391,"props":6855,"children":6856},{"style":6773},[6857],{"type":51,"value":6858},"    type: varchar\n",{"type":42,"tag":391,"props":6860,"children":6862},{"class":393,"line":6861},12,[6863],{"type":42,"tag":391,"props":6864,"children":6865},{"style":6773},[6866],{"type":51,"value":6867},"    checks:\n",{"type":42,"tag":391,"props":6869,"children":6871},{"class":393,"line":6870},13,[6872],{"type":42,"tag":391,"props":6873,"children":6874},{"style":6773},[6875],{"type":51,"value":6876},"      - name: not_null\n",{"type":42,"tag":391,"props":6878,"children":6880},{"class":393,"line":6879},14,[6881],{"type":42,"tag":391,"props":6882,"children":6883},{"style":6773},[6884],{"type":51,"value":6885},"      - name: unique\n",{"type":42,"tag":391,"props":6887,"children":6888},{"class":393,"line":1707},[6889],{"type":42,"tag":391,"props":6890,"children":6891},{"style":6773},[6892],{"type":51,"value":6893},"  - name: order_date\n",{"type":42,"tag":391,"props":6895,"children":6897},{"class":393,"line":6896},16,[6898],{"type":42,"tag":391,"props":6899,"children":6900},{"style":6773},[6901],{"type":51,"value":6902},"    type: timestamp\n",{"type":42,"tag":391,"props":6904,"children":6906},{"class":393,"line":6905},17,[6907],{"type":42,"tag":391,"props":6908,"children":6909},{"style":6773},[6910],{"type":51,"value":6867},{"type":42,"tag":391,"props":6912,"children":6914},{"class":393,"line":6913},18,[6915],{"type":42,"tag":391,"props":6916,"children":6917},{"style":6773},[6918],{"type":51,"value":6876},{"type":42,"tag":391,"props":6920,"children":6922},{"class":393,"line":6921},19,[6923],{"type":42,"tag":391,"props":6924,"children":6925},{"style":6773},[6926],{"type":51,"value":6927},"custom_checks:\n",{"type":42,"tag":391,"props":6929,"children":6931},{"class":393,"line":6930},20,[6932],{"type":42,"tag":391,"props":6933,"children":6934},{"style":6773},[6935],{"type":51,"value":6936},"  - name: has_rows\n",{"type":42,"tag":391,"props":6938,"children":6940},{"class":393,"line":6939},21,[6941],{"type":42,"tag":391,"props":6942,"children":6943},{"style":6773},[6944],{"type":51,"value":6945},"    query: \"SELECT count(*) > 0 FROM staging.stg_orders\"\n",{"type":42,"tag":391,"props":6947,"children":6949},{"class":393,"line":6948},22,[6950],{"type":42,"tag":391,"props":6951,"children":6952},{"style":6773},[6953],{"type":51,"value":6954},"    value: 1\n",{"type":42,"tag":391,"props":6956,"children":6958},{"class":393,"line":6957},23,[6959],{"type":42,"tag":391,"props":6960,"children":6961},{"style":6773},[6962],{"type":51,"value":6963},"@bruin *\u002F\n",{"type":42,"tag":391,"props":6965,"children":6967},{"class":393,"line":6966},24,[6968],{"type":42,"tag":391,"props":6969,"children":6970},{"emptyLinePlaceholder":13},[6971],{"type":51,"value":6972},"\n",{"type":42,"tag":391,"props":6974,"children":6976},{"class":393,"line":6975},25,[6977],{"type":42,"tag":391,"props":6978,"children":6979},{"style":515},[6980],{"type":51,"value":6981},"SELECT\n",{"type":42,"tag":391,"props":6983,"children":6985},{"class":393,"line":6984},26,[6986,6991,6995,7000,7005],{"type":42,"tag":391,"props":6987,"children":6988},{"style":415},[6989],{"type":51,"value":6990},"    o",{"type":42,"tag":391,"props":6992,"children":6993},{"style":409},[6994],{"type":51,"value":247},{"type":42,"tag":391,"props":6996,"children":6997},{"style":415},[6998],{"type":51,"value":6999},"id",{"type":42,"tag":391,"props":7001,"children":7002},{"style":515},[7003],{"type":51,"value":7004}," AS",{"type":42,"tag":391,"props":7006,"children":7007},{"style":409},[7008],{"type":51,"value":7009}," order_id,\n",{"type":42,"tag":391,"props":7011,"children":7013},{"class":393,"line":7012},27,[7014,7018,7022,7027],{"type":42,"tag":391,"props":7015,"children":7016},{"style":415},[7017],{"type":51,"value":6990},{"type":42,"tag":391,"props":7019,"children":7020},{"style":409},[7021],{"type":51,"value":247},{"type":42,"tag":391,"props":7023,"children":7024},{"style":415},[7025],{"type":51,"value":7026},"order_number",{"type":42,"tag":391,"props":7028,"children":7029},{"style":409},[7030],{"type":51,"value":7031},",\n",{"type":42,"tag":391,"props":7033,"children":7035},{"class":393,"line":7034},28,[7036,7040,7044,7049,7053],{"type":42,"tag":391,"props":7037,"children":7038},{"style":415},[7039],{"type":51,"value":6990},{"type":42,"tag":391,"props":7041,"children":7042},{"style":409},[7043],{"type":51,"value":247},{"type":42,"tag":391,"props":7045,"children":7046},{"style":415},[7047],{"type":51,"value":7048},"email",{"type":42,"tag":391,"props":7050,"children":7051},{"style":515},[7052],{"type":51,"value":7004},{"type":42,"tag":391,"props":7054,"children":7055},{"style":409},[7056],{"type":51,"value":7057}," customer_email,\n",{"type":42,"tag":391,"props":7059,"children":7061},{"class":393,"line":7060},29,[7062,7066,7070,7075,7079],{"type":42,"tag":391,"props":7063,"children":7064},{"style":415},[7065],{"type":51,"value":6990},{"type":42,"tag":391,"props":7067,"children":7068},{"style":409},[7069],{"type":51,"value":247},{"type":42,"tag":391,"props":7071,"children":7072},{"style":415},[7073],{"type":51,"value":7074},"created_at",{"type":42,"tag":391,"props":7076,"children":7077},{"style":515},[7078],{"type":51,"value":7004},{"type":42,"tag":391,"props":7080,"children":7081},{"style":409},[7082],{"type":51,"value":7083}," order_date,\n",{"type":42,"tag":391,"props":7085,"children":7087},{"class":393,"line":7086},30,[7088,7092,7096,7100,7104],{"type":42,"tag":391,"props":7089,"children":7090},{"style":415},[7091],{"type":51,"value":6990},{"type":42,"tag":391,"props":7093,"children":7094},{"style":409},[7095],{"type":51,"value":247},{"type":42,"tag":391,"props":7097,"children":7098},{"style":415},[7099],{"type":51,"value":2743},{"type":42,"tag":391,"props":7101,"children":7102},{"style":515},[7103],{"type":51,"value":7004},{"type":42,"tag":391,"props":7105,"children":7106},{"style":409},[7107],{"type":51,"value":7108}," payment_status,\n",{"type":42,"tag":391,"props":7110,"children":7112},{"class":393,"line":7111},31,[7113,7117,7121,7126],{"type":42,"tag":391,"props":7114,"children":7115},{"style":415},[7116],{"type":51,"value":6990},{"type":42,"tag":391,"props":7118,"children":7119},{"style":409},[7120],{"type":51,"value":247},{"type":42,"tag":391,"props":7122,"children":7123},{"style":415},[7124],{"type":51,"value":7125},"fulfillment_status",{"type":42,"tag":391,"props":7127,"children":7128},{"style":409},[7129],{"type":51,"value":7031},{"type":42,"tag":391,"props":7131,"children":7133},{"class":393,"line":7132},32,[7134,7139,7144,7149,7153,7157,7161,7166,7170,7175,7180,7185,7190,7195],{"type":42,"tag":391,"props":7135,"children":7136},{"style":415},[7137],{"type":51,"value":7138},"    CAST",{"type":42,"tag":391,"props":7140,"children":7141},{"style":409},[7142],{"type":51,"value":7143},"(",{"type":42,"tag":391,"props":7145,"children":7146},{"style":415},[7147],{"type":51,"value":7148},"o",{"type":42,"tag":391,"props":7150,"children":7151},{"style":409},[7152],{"type":51,"value":247},{"type":42,"tag":391,"props":7154,"children":7155},{"style":415},[7156],{"type":51,"value":2750},{"type":42,"tag":391,"props":7158,"children":7159},{"style":515},[7160],{"type":51,"value":7004},{"type":42,"tag":391,"props":7162,"children":7163},{"style":515},[7164],{"type":51,"value":7165}," DECIMAL",{"type":42,"tag":391,"props":7167,"children":7168},{"style":409},[7169],{"type":51,"value":7143},{"type":42,"tag":391,"props":7171,"children":7172},{"style":415},[7173],{"type":51,"value":7174},"12",{"type":42,"tag":391,"props":7176,"children":7177},{"style":409},[7178],{"type":51,"value":7179},",",{"type":42,"tag":391,"props":7181,"children":7182},{"style":415},[7183],{"type":51,"value":7184},"2",{"type":42,"tag":391,"props":7186,"children":7187},{"style":409},[7188],{"type":51,"value":7189},")) ",{"type":42,"tag":391,"props":7191,"children":7192},{"style":515},[7193],{"type":51,"value":7194},"AS",{"type":42,"tag":391,"props":7196,"children":7197},{"style":409},[7198],{"type":51,"value":7199}," order_total,\n",{"type":42,"tag":391,"props":7201,"children":7203},{"class":393,"line":7202},33,[7204,7208,7212,7216,7220,7225,7229,7233,7237,7241,7245,7249,7253,7257],{"type":42,"tag":391,"props":7205,"children":7206},{"style":415},[7207],{"type":51,"value":7138},{"type":42,"tag":391,"props":7209,"children":7210},{"style":409},[7211],{"type":51,"value":7143},{"type":42,"tag":391,"props":7213,"children":7214},{"style":415},[7215],{"type":51,"value":7148},{"type":42,"tag":391,"props":7217,"children":7218},{"style":409},[7219],{"type":51,"value":247},{"type":42,"tag":391,"props":7221,"children":7222},{"style":415},[7223],{"type":51,"value":7224},"subtotal_price",{"type":42,"tag":391,"props":7226,"children":7227},{"style":515},[7228],{"type":51,"value":7004},{"type":42,"tag":391,"props":7230,"children":7231},{"style":515},[7232],{"type":51,"value":7165},{"type":42,"tag":391,"props":7234,"children":7235},{"style":409},[7236],{"type":51,"value":7143},{"type":42,"tag":391,"props":7238,"children":7239},{"style":415},[7240],{"type":51,"value":7174},{"type":42,"tag":391,"props":7242,"children":7243},{"style":409},[7244],{"type":51,"value":7179},{"type":42,"tag":391,"props":7246,"children":7247},{"style":415},[7248],{"type":51,"value":7184},{"type":42,"tag":391,"props":7250,"children":7251},{"style":409},[7252],{"type":51,"value":7189},{"type":42,"tag":391,"props":7254,"children":7255},{"style":515},[7256],{"type":51,"value":7194},{"type":42,"tag":391,"props":7258,"children":7259},{"style":409},[7260],{"type":51,"value":7261}," subtotal,\n",{"type":42,"tag":391,"props":7263,"children":7265},{"class":393,"line":7264},34,[7266,7270,7274,7278,7282,7287,7291,7295,7299,7303,7307,7311,7315,7319],{"type":42,"tag":391,"props":7267,"children":7268},{"style":415},[7269],{"type":51,"value":7138},{"type":42,"tag":391,"props":7271,"children":7272},{"style":409},[7273],{"type":51,"value":7143},{"type":42,"tag":391,"props":7275,"children":7276},{"style":415},[7277],{"type":51,"value":7148},{"type":42,"tag":391,"props":7279,"children":7280},{"style":409},[7281],{"type":51,"value":247},{"type":42,"tag":391,"props":7283,"children":7284},{"style":415},[7285],{"type":51,"value":7286},"total_tax",{"type":42,"tag":391,"props":7288,"children":7289},{"style":515},[7290],{"type":51,"value":7004},{"type":42,"tag":391,"props":7292,"children":7293},{"style":515},[7294],{"type":51,"value":7165},{"type":42,"tag":391,"props":7296,"children":7297},{"style":409},[7298],{"type":51,"value":7143},{"type":42,"tag":391,"props":7300,"children":7301},{"style":415},[7302],{"type":51,"value":7174},{"type":42,"tag":391,"props":7304,"children":7305},{"style":409},[7306],{"type":51,"value":7179},{"type":42,"tag":391,"props":7308,"children":7309},{"style":415},[7310],{"type":51,"value":7184},{"type":42,"tag":391,"props":7312,"children":7313},{"style":409},[7314],{"type":51,"value":7189},{"type":42,"tag":391,"props":7316,"children":7317},{"style":515},[7318],{"type":51,"value":7194},{"type":42,"tag":391,"props":7320,"children":7321},{"style":409},[7322],{"type":51,"value":7323}," tax_amount,\n",{"type":42,"tag":391,"props":7325,"children":7327},{"class":393,"line":7326},35,[7328,7332,7336,7340,7344,7349,7353,7357,7361,7365,7369,7373,7377,7381],{"type":42,"tag":391,"props":7329,"children":7330},{"style":415},[7331],{"type":51,"value":7138},{"type":42,"tag":391,"props":7333,"children":7334},{"style":409},[7335],{"type":51,"value":7143},{"type":42,"tag":391,"props":7337,"children":7338},{"style":415},[7339],{"type":51,"value":7148},{"type":42,"tag":391,"props":7341,"children":7342},{"style":409},[7343],{"type":51,"value":247},{"type":42,"tag":391,"props":7345,"children":7346},{"style":415},[7347],{"type":51,"value":7348},"total_discounts",{"type":42,"tag":391,"props":7350,"children":7351},{"style":515},[7352],{"type":51,"value":7004},{"type":42,"tag":391,"props":7354,"children":7355},{"style":515},[7356],{"type":51,"value":7165},{"type":42,"tag":391,"props":7358,"children":7359},{"style":409},[7360],{"type":51,"value":7143},{"type":42,"tag":391,"props":7362,"children":7363},{"style":415},[7364],{"type":51,"value":7174},{"type":42,"tag":391,"props":7366,"children":7367},{"style":409},[7368],{"type":51,"value":7179},{"type":42,"tag":391,"props":7370,"children":7371},{"style":415},[7372],{"type":51,"value":7184},{"type":42,"tag":391,"props":7374,"children":7375},{"style":409},[7376],{"type":51,"value":7189},{"type":42,"tag":391,"props":7378,"children":7379},{"style":515},[7380],{"type":51,"value":7194},{"type":42,"tag":391,"props":7382,"children":7383},{"style":409},[7384],{"type":51,"value":7385}," discount_amount,\n",{"type":42,"tag":391,"props":7387,"children":7389},{"class":393,"line":7388},36,[7390,7394,7398,7403],{"type":42,"tag":391,"props":7391,"children":7392},{"style":415},[7393],{"type":51,"value":6990},{"type":42,"tag":391,"props":7395,"children":7396},{"style":409},[7397],{"type":51,"value":247},{"type":42,"tag":391,"props":7399,"children":7400},{"style":415},[7401],{"type":51,"value":7402},"currency",{"type":42,"tag":391,"props":7404,"children":7405},{"style":409},[7406],{"type":51,"value":7031},{"type":42,"tag":391,"props":7408,"children":7410},{"class":393,"line":7409},37,[7411,7415,7419,7424],{"type":42,"tag":391,"props":7412,"children":7413},{"style":415},[7414],{"type":51,"value":6990},{"type":42,"tag":391,"props":7416,"children":7417},{"style":409},[7418],{"type":51,"value":247},{"type":42,"tag":391,"props":7420,"children":7421},{"style":415},[7422],{"type":51,"value":7423},"cancel_reason",{"type":42,"tag":391,"props":7425,"children":7426},{"style":409},[7427],{"type":51,"value":7031},{"type":42,"tag":391,"props":7429,"children":7431},{"class":393,"line":7430},38,[7432,7436,7440,7445],{"type":42,"tag":391,"props":7433,"children":7434},{"style":415},[7435],{"type":51,"value":6990},{"type":42,"tag":391,"props":7437,"children":7438},{"style":409},[7439],{"type":51,"value":247},{"type":42,"tag":391,"props":7441,"children":7442},{"style":415},[7443],{"type":51,"value":7444},"cancelled_at",{"type":42,"tag":391,"props":7446,"children":7447},{"style":409},[7448],{"type":51,"value":7031},{"type":42,"tag":391,"props":7450,"children":7452},{"class":393,"line":7451},39,[7453,7458,7462,7467,7472,7477,7481,7486,7490],{"type":42,"tag":391,"props":7454,"children":7455},{"style":415},[7456],{"type":51,"value":7457},"    c",{"type":42,"tag":391,"props":7459,"children":7460},{"style":409},[7461],{"type":51,"value":247},{"type":42,"tag":391,"props":7463,"children":7464},{"style":415},[7465],{"type":51,"value":7466},"amount",{"type":42,"tag":391,"props":7468,"children":7469},{"style":515},[7470],{"type":51,"value":7471}," \u002F",{"type":42,"tag":391,"props":7473,"children":7474},{"style":415},[7475],{"type":51,"value":7476}," 100",{"type":42,"tag":391,"props":7478,"children":7479},{"style":409},[7480],{"type":51,"value":247},{"type":42,"tag":391,"props":7482,"children":7483},{"style":415},[7484],{"type":51,"value":7485},"0",{"type":42,"tag":391,"props":7487,"children":7488},{"style":515},[7489],{"type":51,"value":7004},{"type":42,"tag":391,"props":7491,"children":7492},{"style":409},[7493],{"type":51,"value":7494}," stripe_charge_amount,\n",{"type":42,"tag":391,"props":7496,"children":7498},{"class":393,"line":7497},40,[7499,7503,7507,7512,7516],{"type":42,"tag":391,"props":7500,"children":7501},{"style":415},[7502],{"type":51,"value":7457},{"type":42,"tag":391,"props":7504,"children":7505},{"style":409},[7506],{"type":51,"value":247},{"type":42,"tag":391,"props":7508,"children":7509},{"style":415},[7510],{"type":51,"value":7511},"status",{"type":42,"tag":391,"props":7513,"children":7514},{"style":515},[7515],{"type":51,"value":7004},{"type":42,"tag":391,"props":7517,"children":7518},{"style":409},[7519],{"type":51,"value":7520}," stripe_status,\n",{"type":42,"tag":391,"props":7522,"children":7524},{"class":393,"line":7523},41,[7525,7529,7533,7538,7542],{"type":42,"tag":391,"props":7526,"children":7527},{"style":415},[7528],{"type":51,"value":7457},{"type":42,"tag":391,"props":7530,"children":7531},{"style":409},[7532],{"type":51,"value":247},{"type":42,"tag":391,"props":7534,"children":7535},{"style":415},[7536],{"type":51,"value":7537},"paid",{"type":42,"tag":391,"props":7539,"children":7540},{"style":515},[7541],{"type":51,"value":7004},{"type":42,"tag":391,"props":7543,"children":7544},{"style":409},[7545],{"type":51,"value":7546}," stripe_paid\n",{"type":42,"tag":391,"props":7548,"children":7550},{"class":393,"line":7549},42,[7551,7556,7561,7565,7570],{"type":42,"tag":391,"props":7552,"children":7553},{"style":515},[7554],{"type":51,"value":7555},"FROM",{"type":42,"tag":391,"props":7557,"children":7558},{"style":415},[7559],{"type":51,"value":7560}," raw",{"type":42,"tag":391,"props":7562,"children":7563},{"style":409},[7564],{"type":51,"value":247},{"type":42,"tag":391,"props":7566,"children":7567},{"style":415},[7568],{"type":51,"value":7569},"shopify_orders",{"type":42,"tag":391,"props":7571,"children":7572},{"style":409},[7573],{"type":51,"value":7574}," o\n",{"type":42,"tag":391,"props":7576,"children":7578},{"class":393,"line":7577},43,[7579,7583,7587,7591,7596],{"type":42,"tag":391,"props":7580,"children":7581},{"style":515},[7582],{"type":51,"value":6663},{"type":42,"tag":391,"props":7584,"children":7585},{"style":415},[7586],{"type":51,"value":7560},{"type":42,"tag":391,"props":7588,"children":7589},{"style":409},[7590],{"type":51,"value":247},{"type":42,"tag":391,"props":7592,"children":7593},{"style":415},[7594],{"type":51,"value":7595},"stripe_charges",{"type":42,"tag":391,"props":7597,"children":7598},{"style":409},[7599],{"type":51,"value":7600}," c\n",{"type":42,"tag":391,"props":7602,"children":7604},{"class":393,"line":7603},44,[7605,7610,7615,7619,7623,7628,7633,7637],{"type":42,"tag":391,"props":7606,"children":7607},{"style":515},[7608],{"type":51,"value":7609},"    ON",{"type":42,"tag":391,"props":7611,"children":7612},{"style":415},[7613],{"type":51,"value":7614}," o",{"type":42,"tag":391,"props":7616,"children":7617},{"style":409},[7618],{"type":51,"value":247},{"type":42,"tag":391,"props":7620,"children":7621},{"style":415},[7622],{"type":51,"value":7048},{"type":42,"tag":391,"props":7624,"children":7625},{"style":515},[7626],{"type":51,"value":7627}," =",{"type":42,"tag":391,"props":7629,"children":7630},{"style":415},[7631],{"type":51,"value":7632}," c",{"type":42,"tag":391,"props":7634,"children":7635},{"style":409},[7636],{"type":51,"value":247},{"type":42,"tag":391,"props":7638,"children":7639},{"style":415},[7640],{"type":51,"value":7641},"receipt_email\n",{"type":42,"tag":391,"props":7643,"children":7645},{"class":393,"line":7644},45,[7646,7651,7656,7660,7664,7668,7673,7678,7682,7687,7691,7696],{"type":42,"tag":391,"props":7647,"children":7648},{"style":515},[7649],{"type":51,"value":7650},"    AND",{"type":42,"tag":391,"props":7652,"children":7653},{"style":409},[7654],{"type":51,"value":7655}," toDate(",{"type":42,"tag":391,"props":7657,"children":7658},{"style":415},[7659],{"type":51,"value":7148},{"type":42,"tag":391,"props":7661,"children":7662},{"style":409},[7663],{"type":51,"value":247},{"type":42,"tag":391,"props":7665,"children":7666},{"style":415},[7667],{"type":51,"value":7074},{"type":42,"tag":391,"props":7669,"children":7670},{"style":409},[7671],{"type":51,"value":7672},") ",{"type":42,"tag":391,"props":7674,"children":7675},{"style":515},[7676],{"type":51,"value":7677},"=",{"type":42,"tag":391,"props":7679,"children":7680},{"style":409},[7681],{"type":51,"value":7655},{"type":42,"tag":391,"props":7683,"children":7684},{"style":415},[7685],{"type":51,"value":7686},"c",{"type":42,"tag":391,"props":7688,"children":7689},{"style":409},[7690],{"type":51,"value":247},{"type":42,"tag":391,"props":7692,"children":7693},{"style":415},[7694],{"type":51,"value":7695},"created",{"type":42,"tag":391,"props":7697,"children":7698},{"style":409},[7699],{"type":51,"value":7700},")\n",{"type":42,"tag":569,"props":7702,"children":7703},{"v-slot:bigquery":7},[7704],{"type":42,"tag":381,"props":7705,"children":7707},{"className":6761,"code":7706,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_orders\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.shopify_orders\n  - raw.stripe_charges\ncolumns:\n  - name: order_id\n    type: varchar\n    checks:\n      - name: not_null\n      - name: unique\n  - name: order_date\n    type: timestamp\n    checks:\n      - name: not_null\ncustom_checks:\n  - name: has_rows\n    query: \"SELECT count(*) > 0 FROM staging.stg_orders\"\n    value: 1\n@bruin *\u002F\n\nSELECT\n    o.id AS order_id,\n    o.order_number,\n    o.email AS customer_email,\n    o.created_at AS order_date,\n    o.financial_status AS payment_status,\n    o.fulfillment_status,\n    SAFE_CAST(o.total_price AS DECIMAL(12,2)) AS order_total,\n    SAFE_CAST(o.subtotal_price AS DECIMAL(12,2)) AS subtotal,\n    SAFE_CAST(o.total_tax AS DECIMAL(12,2)) AS tax_amount,\n    SAFE_CAST(o.total_discounts AS DECIMAL(12,2)) AS discount_amount,\n    o.currency,\n    o.cancel_reason,\n    o.cancelled_at,\n    c.amount \u002F 100.0 AS stripe_charge_amount,\n    c.status AS stripe_status,\n    c.paid AS stripe_paid\nFROM raw.shopify_orders o\nLEFT JOIN raw.stripe_charges c\n    ON o.email = c.receipt_email\n    AND DATE(o.created_at) = DATE(c.created)\nWHERE o.test IS NOT TRUE AND o.financial_status IS NOT NULL\nQUALIFY ROW_NUMBER() OVER (PARTITION BY o.id ORDER BY o.updated_at DESC) = 1\n",[7708],{"type":42,"tag":240,"props":7709,"children":7710},{"__ignoreMap":7},[7711,7718,7725,7732,7739,7746,7753,7760,7767,7774,7781,7788,7795,7802,7809,7816,7823,7830,7837,7844,7851,7858,7865,7872,7879,7886,7909,7928,7951,7974,7997,8016,8072,8127,8182,8237,8256,8275,8294,8333,8356,8379,8402,8425,8460,8520,8579],{"type":42,"tag":391,"props":7712,"children":7713},{"class":393,"line":176},[7714],{"type":42,"tag":391,"props":7715,"children":7716},{"style":6773},[7717],{"type":51,"value":6776},{"type":42,"tag":391,"props":7719,"children":7720},{"class":393,"line":99},[7721],{"type":42,"tag":391,"props":7722,"children":7723},{"style":6773},[7724],{"type":51,"value":6784},{"type":42,"tag":391,"props":7726,"children":7727},{"class":393,"line":439},[7728],{"type":42,"tag":391,"props":7729,"children":7730},{"style":6773},[7731],{"type":51,"value":6792},{"type":42,"tag":391,"props":7733,"children":7734},{"class":393,"line":947},[7735],{"type":42,"tag":391,"props":7736,"children":7737},{"style":6773},[7738],{"type":51,"value":6800},{"type":42,"tag":391,"props":7740,"children":7741},{"class":393,"line":960},[7742],{"type":42,"tag":391,"props":7743,"children":7744},{"style":6773},[7745],{"type":51,"value":6808},{"type":42,"tag":391,"props":7747,"children":7748},{"class":393,"line":984},[7749],{"type":42,"tag":391,"props":7750,"children":7751},{"style":6773},[7752],{"type":51,"value":6816},{"type":42,"tag":391,"props":7754,"children":7755},{"class":393,"line":1002},[7756],{"type":42,"tag":391,"props":7757,"children":7758},{"style":6773},[7759],{"type":51,"value":6824},{"type":42,"tag":391,"props":7761,"children":7762},{"class":393,"line":165},[7763],{"type":42,"tag":391,"props":7764,"children":7765},{"style":6773},[7766],{"type":51,"value":6832},{"type":42,"tag":391,"props":7768,"children":7769},{"class":393,"line":2235},[7770],{"type":42,"tag":391,"props":7771,"children":7772},{"style":6773},[7773],{"type":51,"value":6840},{"type":42,"tag":391,"props":7775,"children":7776},{"class":393,"line":6843},[7777],{"type":42,"tag":391,"props":7778,"children":7779},{"style":6773},[7780],{"type":51,"value":6849},{"type":42,"tag":391,"props":7782,"children":7783},{"class":393,"line":6852},[7784],{"type":42,"tag":391,"props":7785,"children":7786},{"style":6773},[7787],{"type":51,"value":6858},{"type":42,"tag":391,"props":7789,"children":7790},{"class":393,"line":6861},[7791],{"type":42,"tag":391,"props":7792,"children":7793},{"style":6773},[7794],{"type":51,"value":6867},{"type":42,"tag":391,"props":7796,"children":7797},{"class":393,"line":6870},[7798],{"type":42,"tag":391,"props":7799,"children":7800},{"style":6773},[7801],{"type":51,"value":6876},{"type":42,"tag":391,"props":7803,"children":7804},{"class":393,"line":6879},[7805],{"type":42,"tag":391,"props":7806,"children":7807},{"style":6773},[7808],{"type":51,"value":6885},{"type":42,"tag":391,"props":7810,"children":7811},{"class":393,"line":1707},[7812],{"type":42,"tag":391,"props":7813,"children":7814},{"style":6773},[7815],{"type":51,"value":6893},{"type":42,"tag":391,"props":7817,"children":7818},{"class":393,"line":6896},[7819],{"type":42,"tag":391,"props":7820,"children":7821},{"style":6773},[7822],{"type":51,"value":6902},{"type":42,"tag":391,"props":7824,"children":7825},{"class":393,"line":6905},[7826],{"type":42,"tag":391,"props":7827,"children":7828},{"style":6773},[7829],{"type":51,"value":6867},{"type":42,"tag":391,"props":7831,"children":7832},{"class":393,"line":6913},[7833],{"type":42,"tag":391,"props":7834,"children":7835},{"style":6773},[7836],{"type":51,"value":6876},{"type":42,"tag":391,"props":7838,"children":7839},{"class":393,"line":6921},[7840],{"type":42,"tag":391,"props":7841,"children":7842},{"style":6773},[7843],{"type":51,"value":6927},{"type":42,"tag":391,"props":7845,"children":7846},{"class":393,"line":6930},[7847],{"type":42,"tag":391,"props":7848,"children":7849},{"style":6773},[7850],{"type":51,"value":6936},{"type":42,"tag":391,"props":7852,"children":7853},{"class":393,"line":6939},[7854],{"type":42,"tag":391,"props":7855,"children":7856},{"style":6773},[7857],{"type":51,"value":6945},{"type":42,"tag":391,"props":7859,"children":7860},{"class":393,"line":6948},[7861],{"type":42,"tag":391,"props":7862,"children":7863},{"style":6773},[7864],{"type":51,"value":6954},{"type":42,"tag":391,"props":7866,"children":7867},{"class":393,"line":6957},[7868],{"type":42,"tag":391,"props":7869,"children":7870},{"style":6773},[7871],{"type":51,"value":6963},{"type":42,"tag":391,"props":7873,"children":7874},{"class":393,"line":6966},[7875],{"type":42,"tag":391,"props":7876,"children":7877},{"emptyLinePlaceholder":13},[7878],{"type":51,"value":6972},{"type":42,"tag":391,"props":7880,"children":7881},{"class":393,"line":6975},[7882],{"type":42,"tag":391,"props":7883,"children":7884},{"style":515},[7885],{"type":51,"value":6981},{"type":42,"tag":391,"props":7887,"children":7888},{"class":393,"line":6984},[7889,7893,7897,7901,7905],{"type":42,"tag":391,"props":7890,"children":7891},{"style":415},[7892],{"type":51,"value":6990},{"type":42,"tag":391,"props":7894,"children":7895},{"style":409},[7896],{"type":51,"value":247},{"type":42,"tag":391,"props":7898,"children":7899},{"style":415},[7900],{"type":51,"value":6999},{"type":42,"tag":391,"props":7902,"children":7903},{"style":515},[7904],{"type":51,"value":7004},{"type":42,"tag":391,"props":7906,"children":7907},{"style":409},[7908],{"type":51,"value":7009},{"type":42,"tag":391,"props":7910,"children":7911},{"class":393,"line":7012},[7912,7916,7920,7924],{"type":42,"tag":391,"props":7913,"children":7914},{"style":415},[7915],{"type":51,"value":6990},{"type":42,"tag":391,"props":7917,"children":7918},{"style":409},[7919],{"type":51,"value":247},{"type":42,"tag":391,"props":7921,"children":7922},{"style":415},[7923],{"type":51,"value":7026},{"type":42,"tag":391,"props":7925,"children":7926},{"style":409},[7927],{"type":51,"value":7031},{"type":42,"tag":391,"props":7929,"children":7930},{"class":393,"line":7034},[7931,7935,7939,7943,7947],{"type":42,"tag":391,"props":7932,"children":7933},{"style":415},[7934],{"type":51,"value":6990},{"type":42,"tag":391,"props":7936,"children":7937},{"style":409},[7938],{"type":51,"value":247},{"type":42,"tag":391,"props":7940,"children":7941},{"style":415},[7942],{"type":51,"value":7048},{"type":42,"tag":391,"props":7944,"children":7945},{"style":515},[7946],{"type":51,"value":7004},{"type":42,"tag":391,"props":7948,"children":7949},{"style":409},[7950],{"type":51,"value":7057},{"type":42,"tag":391,"props":7952,"children":7953},{"class":393,"line":7060},[7954,7958,7962,7966,7970],{"type":42,"tag":391,"props":7955,"children":7956},{"style":415},[7957],{"type":51,"value":6990},{"type":42,"tag":391,"props":7959,"children":7960},{"style":409},[7961],{"type":51,"value":247},{"type":42,"tag":391,"props":7963,"children":7964},{"style":415},[7965],{"type":51,"value":7074},{"type":42,"tag":391,"props":7967,"children":7968},{"style":515},[7969],{"type":51,"value":7004},{"type":42,"tag":391,"props":7971,"children":7972},{"style":409},[7973],{"type":51,"value":7083},{"type":42,"tag":391,"props":7975,"children":7976},{"class":393,"line":7086},[7977,7981,7985,7989,7993],{"type":42,"tag":391,"props":7978,"children":7979},{"style":415},[7980],{"type":51,"value":6990},{"type":42,"tag":391,"props":7982,"children":7983},{"style":409},[7984],{"type":51,"value":247},{"type":42,"tag":391,"props":7986,"children":7987},{"style":415},[7988],{"type":51,"value":2743},{"type":42,"tag":391,"props":7990,"children":7991},{"style":515},[7992],{"type":51,"value":7004},{"type":42,"tag":391,"props":7994,"children":7995},{"style":409},[7996],{"type":51,"value":7108},{"type":42,"tag":391,"props":7998,"children":7999},{"class":393,"line":7111},[8000,8004,8008,8012],{"type":42,"tag":391,"props":8001,"children":8002},{"style":415},[8003],{"type":51,"value":6990},{"type":42,"tag":391,"props":8005,"children":8006},{"style":409},[8007],{"type":51,"value":247},{"type":42,"tag":391,"props":8009,"children":8010},{"style":415},[8011],{"type":51,"value":7125},{"type":42,"tag":391,"props":8013,"children":8014},{"style":409},[8015],{"type":51,"value":7031},{"type":42,"tag":391,"props":8017,"children":8018},{"class":393,"line":7132},[8019,8024,8028,8032,8036,8040,8044,8048,8052,8056,8060,8064,8068],{"type":42,"tag":391,"props":8020,"children":8021},{"style":409},[8022],{"type":51,"value":8023},"    SAFE_CAST(",{"type":42,"tag":391,"props":8025,"children":8026},{"style":415},[8027],{"type":51,"value":7148},{"type":42,"tag":391,"props":8029,"children":8030},{"style":409},[8031],{"type":51,"value":247},{"type":42,"tag":391,"props":8033,"children":8034},{"style":415},[8035],{"type":51,"value":2750},{"type":42,"tag":391,"props":8037,"children":8038},{"style":515},[8039],{"type":51,"value":7004},{"type":42,"tag":391,"props":8041,"children":8042},{"style":515},[8043],{"type":51,"value":7165},{"type":42,"tag":391,"props":8045,"children":8046},{"style":409},[8047],{"type":51,"value":7143},{"type":42,"tag":391,"props":8049,"children":8050},{"style":415},[8051],{"type":51,"value":7174},{"type":42,"tag":391,"props":8053,"children":8054},{"style":409},[8055],{"type":51,"value":7179},{"type":42,"tag":391,"props":8057,"children":8058},{"style":415},[8059],{"type":51,"value":7184},{"type":42,"tag":391,"props":8061,"children":8062},{"style":409},[8063],{"type":51,"value":7189},{"type":42,"tag":391,"props":8065,"children":8066},{"style":515},[8067],{"type":51,"value":7194},{"type":42,"tag":391,"props":8069,"children":8070},{"style":409},[8071],{"type":51,"value":7199},{"type":42,"tag":391,"props":8073,"children":8074},{"class":393,"line":7202},[8075,8079,8083,8087,8091,8095,8099,8103,8107,8111,8115,8119,8123],{"type":42,"tag":391,"props":8076,"children":8077},{"style":409},[8078],{"type":51,"value":8023},{"type":42,"tag":391,"props":8080,"children":8081},{"style":415},[8082],{"type":51,"value":7148},{"type":42,"tag":391,"props":8084,"children":8085},{"style":409},[8086],{"type":51,"value":247},{"type":42,"tag":391,"props":8088,"children":8089},{"style":415},[8090],{"type":51,"value":7224},{"type":42,"tag":391,"props":8092,"children":8093},{"style":515},[8094],{"type":51,"value":7004},{"type":42,"tag":391,"props":8096,"children":8097},{"style":515},[8098],{"type":51,"value":7165},{"type":42,"tag":391,"props":8100,"children":8101},{"style":409},[8102],{"type":51,"value":7143},{"type":42,"tag":391,"props":8104,"children":8105},{"style":415},[8106],{"type":51,"value":7174},{"type":42,"tag":391,"props":8108,"children":8109},{"style":409},[8110],{"type":51,"value":7179},{"type":42,"tag":391,"props":8112,"children":8113},{"style":415},[8114],{"type":51,"value":7184},{"type":42,"tag":391,"props":8116,"children":8117},{"style":409},[8118],{"type":51,"value":7189},{"type":42,"tag":391,"props":8120,"children":8121},{"style":515},[8122],{"type":51,"value":7194},{"type":42,"tag":391,"props":8124,"children":8125},{"style":409},[8126],{"type":51,"value":7261},{"type":42,"tag":391,"props":8128,"children":8129},{"class":393,"line":7264},[8130,8134,8138,8142,8146,8150,8154,8158,8162,8166,8170,8174,8178],{"type":42,"tag":391,"props":8131,"children":8132},{"style":409},[8133],{"type":51,"value":8023},{"type":42,"tag":391,"props":8135,"children":8136},{"style":415},[8137],{"type":51,"value":7148},{"type":42,"tag":391,"props":8139,"children":8140},{"style":409},[8141],{"type":51,"value":247},{"type":42,"tag":391,"props":8143,"children":8144},{"style":415},[8145],{"type":51,"value":7286},{"type":42,"tag":391,"props":8147,"children":8148},{"style":515},[8149],{"type":51,"value":7004},{"type":42,"tag":391,"props":8151,"children":8152},{"style":515},[8153],{"type":51,"value":7165},{"type":42,"tag":391,"props":8155,"children":8156},{"style":409},[8157],{"type":51,"value":7143},{"type":42,"tag":391,"props":8159,"children":8160},{"style":415},[8161],{"type":51,"value":7174},{"type":42,"tag":391,"props":8163,"children":8164},{"style":409},[8165],{"type":51,"value":7179},{"type":42,"tag":391,"props":8167,"children":8168},{"style":415},[8169],{"type":51,"value":7184},{"type":42,"tag":391,"props":8171,"children":8172},{"style":409},[8173],{"type":51,"value":7189},{"type":42,"tag":391,"props":8175,"children":8176},{"style":515},[8177],{"type":51,"value":7194},{"type":42,"tag":391,"props":8179,"children":8180},{"style":409},[8181],{"type":51,"value":7323},{"type":42,"tag":391,"props":8183,"children":8184},{"class":393,"line":7326},[8185,8189,8193,8197,8201,8205,8209,8213,8217,8221,8225,8229,8233],{"type":42,"tag":391,"props":8186,"children":8187},{"style":409},[8188],{"type":51,"value":8023},{"type":42,"tag":391,"props":8190,"children":8191},{"style":415},[8192],{"type":51,"value":7148},{"type":42,"tag":391,"props":8194,"children":8195},{"style":409},[8196],{"type":51,"value":247},{"type":42,"tag":391,"props":8198,"children":8199},{"style":415},[8200],{"type":51,"value":7348},{"type":42,"tag":391,"props":8202,"children":8203},{"style":515},[8204],{"type":51,"value":7004},{"type":42,"tag":391,"props":8206,"children":8207},{"style":515},[8208],{"type":51,"value":7165},{"type":42,"tag":391,"props":8210,"children":8211},{"style":409},[8212],{"type":51,"value":7143},{"type":42,"tag":391,"props":8214,"children":8215},{"style":415},[8216],{"type":51,"value":7174},{"type":42,"tag":391,"props":8218,"children":8219},{"style":409},[8220],{"type":51,"value":7179},{"type":42,"tag":391,"props":8222,"children":8223},{"style":415},[8224],{"type":51,"value":7184},{"type":42,"tag":391,"props":8226,"children":8227},{"style":409},[8228],{"type":51,"value":7189},{"type":42,"tag":391,"props":8230,"children":8231},{"style":515},[8232],{"type":51,"value":7194},{"type":42,"tag":391,"props":8234,"children":8235},{"style":409},[8236],{"type":51,"value":7385},{"type":42,"tag":391,"props":8238,"children":8239},{"class":393,"line":7388},[8240,8244,8248,8252],{"type":42,"tag":391,"props":8241,"children":8242},{"style":415},[8243],{"type":51,"value":6990},{"type":42,"tag":391,"props":8245,"children":8246},{"style":409},[8247],{"type":51,"value":247},{"type":42,"tag":391,"props":8249,"children":8250},{"style":415},[8251],{"type":51,"value":7402},{"type":42,"tag":391,"props":8253,"children":8254},{"style":409},[8255],{"type":51,"value":7031},{"type":42,"tag":391,"props":8257,"children":8258},{"class":393,"line":7409},[8259,8263,8267,8271],{"type":42,"tag":391,"props":8260,"children":8261},{"style":415},[8262],{"type":51,"value":6990},{"type":42,"tag":391,"props":8264,"children":8265},{"style":409},[8266],{"type":51,"value":247},{"type":42,"tag":391,"props":8268,"children":8269},{"style":415},[8270],{"type":51,"value":7423},{"type":42,"tag":391,"props":8272,"children":8273},{"style":409},[8274],{"type":51,"value":7031},{"type":42,"tag":391,"props":8276,"children":8277},{"class":393,"line":7430},[8278,8282,8286,8290],{"type":42,"tag":391,"props":8279,"children":8280},{"style":415},[8281],{"type":51,"value":6990},{"type":42,"tag":391,"props":8283,"children":8284},{"style":409},[8285],{"type":51,"value":247},{"type":42,"tag":391,"props":8287,"children":8288},{"style":415},[8289],{"type":51,"value":7444},{"type":42,"tag":391,"props":8291,"children":8292},{"style":409},[8293],{"type":51,"value":7031},{"type":42,"tag":391,"props":8295,"children":8296},{"class":393,"line":7451},[8297,8301,8305,8309,8313,8317,8321,8325,8329],{"type":42,"tag":391,"props":8298,"children":8299},{"style":415},[8300],{"type":51,"value":7457},{"type":42,"tag":391,"props":8302,"children":8303},{"style":409},[8304],{"type":51,"value":247},{"type":42,"tag":391,"props":8306,"children":8307},{"style":415},[8308],{"type":51,"value":7466},{"type":42,"tag":391,"props":8310,"children":8311},{"style":515},[8312],{"type":51,"value":7471},{"type":42,"tag":391,"props":8314,"children":8315},{"style":415},[8316],{"type":51,"value":7476},{"type":42,"tag":391,"props":8318,"children":8319},{"style":409},[8320],{"type":51,"value":247},{"type":42,"tag":391,"props":8322,"children":8323},{"style":415},[8324],{"type":51,"value":7485},{"type":42,"tag":391,"props":8326,"children":8327},{"style":515},[8328],{"type":51,"value":7004},{"type":42,"tag":391,"props":8330,"children":8331},{"style":409},[8332],{"type":51,"value":7494},{"type":42,"tag":391,"props":8334,"children":8335},{"class":393,"line":7497},[8336,8340,8344,8348,8352],{"type":42,"tag":391,"props":8337,"children":8338},{"style":415},[8339],{"type":51,"value":7457},{"type":42,"tag":391,"props":8341,"children":8342},{"style":409},[8343],{"type":51,"value":247},{"type":42,"tag":391,"props":8345,"children":8346},{"style":415},[8347],{"type":51,"value":7511},{"type":42,"tag":391,"props":8349,"children":8350},{"style":515},[8351],{"type":51,"value":7004},{"type":42,"tag":391,"props":8353,"children":8354},{"style":409},[8355],{"type":51,"value":7520},{"type":42,"tag":391,"props":8357,"children":8358},{"class":393,"line":7523},[8359,8363,8367,8371,8375],{"type":42,"tag":391,"props":8360,"children":8361},{"style":415},[8362],{"type":51,"value":7457},{"type":42,"tag":391,"props":8364,"children":8365},{"style":409},[8366],{"type":51,"value":247},{"type":42,"tag":391,"props":8368,"children":8369},{"style":415},[8370],{"type":51,"value":7537},{"type":42,"tag":391,"props":8372,"children":8373},{"style":515},[8374],{"type":51,"value":7004},{"type":42,"tag":391,"props":8376,"children":8377},{"style":409},[8378],{"type":51,"value":7546},{"type":42,"tag":391,"props":8380,"children":8381},{"class":393,"line":7549},[8382,8386,8390,8394,8398],{"type":42,"tag":391,"props":8383,"children":8384},{"style":515},[8385],{"type":51,"value":7555},{"type":42,"tag":391,"props":8387,"children":8388},{"style":415},[8389],{"type":51,"value":7560},{"type":42,"tag":391,"props":8391,"children":8392},{"style":409},[8393],{"type":51,"value":247},{"type":42,"tag":391,"props":8395,"children":8396},{"style":415},[8397],{"type":51,"value":7569},{"type":42,"tag":391,"props":8399,"children":8400},{"style":409},[8401],{"type":51,"value":7574},{"type":42,"tag":391,"props":8403,"children":8404},{"class":393,"line":7577},[8405,8409,8413,8417,8421],{"type":42,"tag":391,"props":8406,"children":8407},{"style":515},[8408],{"type":51,"value":6663},{"type":42,"tag":391,"props":8410,"children":8411},{"style":415},[8412],{"type":51,"value":7560},{"type":42,"tag":391,"props":8414,"children":8415},{"style":409},[8416],{"type":51,"value":247},{"type":42,"tag":391,"props":8418,"children":8419},{"style":415},[8420],{"type":51,"value":7595},{"type":42,"tag":391,"props":8422,"children":8423},{"style":409},[8424],{"type":51,"value":7600},{"type":42,"tag":391,"props":8426,"children":8427},{"class":393,"line":7603},[8428,8432,8436,8440,8444,8448,8452,8456],{"type":42,"tag":391,"props":8429,"children":8430},{"style":515},[8431],{"type":51,"value":7609},{"type":42,"tag":391,"props":8433,"children":8434},{"style":415},[8435],{"type":51,"value":7614},{"type":42,"tag":391,"props":8437,"children":8438},{"style":409},[8439],{"type":51,"value":247},{"type":42,"tag":391,"props":8441,"children":8442},{"style":415},[8443],{"type":51,"value":7048},{"type":42,"tag":391,"props":8445,"children":8446},{"style":515},[8447],{"type":51,"value":7627},{"type":42,"tag":391,"props":8449,"children":8450},{"style":415},[8451],{"type":51,"value":7632},{"type":42,"tag":391,"props":8453,"children":8454},{"style":409},[8455],{"type":51,"value":247},{"type":42,"tag":391,"props":8457,"children":8458},{"style":415},[8459],{"type":51,"value":7641},{"type":42,"tag":391,"props":8461,"children":8462},{"class":393,"line":7644},[8463,8467,8472,8476,8480,8484,8488,8492,8496,8500,8504,8508,8512,8516],{"type":42,"tag":391,"props":8464,"children":8465},{"style":515},[8466],{"type":51,"value":7650},{"type":42,"tag":391,"props":8468,"children":8469},{"style":515},[8470],{"type":51,"value":8471}," DATE",{"type":42,"tag":391,"props":8473,"children":8474},{"style":409},[8475],{"type":51,"value":7143},{"type":42,"tag":391,"props":8477,"children":8478},{"style":415},[8479],{"type":51,"value":7148},{"type":42,"tag":391,"props":8481,"children":8482},{"style":409},[8483],{"type":51,"value":247},{"type":42,"tag":391,"props":8485,"children":8486},{"style":415},[8487],{"type":51,"value":7074},{"type":42,"tag":391,"props":8489,"children":8490},{"style":409},[8491],{"type":51,"value":7672},{"type":42,"tag":391,"props":8493,"children":8494},{"style":515},[8495],{"type":51,"value":7677},{"type":42,"tag":391,"props":8497,"children":8498},{"style":515},[8499],{"type":51,"value":8471},{"type":42,"tag":391,"props":8501,"children":8502},{"style":409},[8503],{"type":51,"value":7143},{"type":42,"tag":391,"props":8505,"children":8506},{"style":415},[8507],{"type":51,"value":7686},{"type":42,"tag":391,"props":8509,"children":8510},{"style":409},[8511],{"type":51,"value":247},{"type":42,"tag":391,"props":8513,"children":8514},{"style":415},[8515],{"type":51,"value":7695},{"type":42,"tag":391,"props":8517,"children":8518},{"style":409},[8519],{"type":51,"value":7700},{"type":42,"tag":391,"props":8521,"children":8523},{"class":393,"line":8522},46,[8524,8529,8533,8537,8542,8547,8552,8557,8562,8566,8570,8574],{"type":42,"tag":391,"props":8525,"children":8526},{"style":515},[8527],{"type":51,"value":8528},"WHERE",{"type":42,"tag":391,"props":8530,"children":8531},{"style":415},[8532],{"type":51,"value":7614},{"type":42,"tag":391,"props":8534,"children":8535},{"style":409},[8536],{"type":51,"value":247},{"type":42,"tag":391,"props":8538,"children":8539},{"style":415},[8540],{"type":51,"value":8541},"test",{"type":42,"tag":391,"props":8543,"children":8544},{"style":515},[8545],{"type":51,"value":8546}," IS",{"type":42,"tag":391,"props":8548,"children":8549},{"style":515},[8550],{"type":51,"value":8551}," NOT",{"type":42,"tag":391,"props":8553,"children":8554},{"style":409},[8555],{"type":51,"value":8556}," TRUE ",{"type":42,"tag":391,"props":8558,"children":8559},{"style":515},[8560],{"type":51,"value":8561},"AND",{"type":42,"tag":391,"props":8563,"children":8564},{"style":415},[8565],{"type":51,"value":7614},{"type":42,"tag":391,"props":8567,"children":8568},{"style":409},[8569],{"type":51,"value":247},{"type":42,"tag":391,"props":8571,"children":8572},{"style":415},[8573],{"type":51,"value":2743},{"type":42,"tag":391,"props":8575,"children":8576},{"style":515},[8577],{"type":51,"value":8578}," IS NOT NULL\n",{"type":42,"tag":391,"props":8580,"children":8582},{"class":393,"line":8581},47,[8583,8588,8593,8598,8603,8608,8613,8618,8622,8626,8630,8635,8639,8643,8648,8653,8657,8661],{"type":42,"tag":391,"props":8584,"children":8585},{"style":409},[8586],{"type":51,"value":8587},"QUALIFY ",{"type":42,"tag":391,"props":8589,"children":8590},{"style":415},[8591],{"type":51,"value":8592},"ROW_NUMBER",{"type":42,"tag":391,"props":8594,"children":8595},{"style":409},[8596],{"type":51,"value":8597},"() ",{"type":42,"tag":391,"props":8599,"children":8600},{"style":515},[8601],{"type":51,"value":8602},"OVER",{"type":42,"tag":391,"props":8604,"children":8605},{"style":409},[8606],{"type":51,"value":8607}," (",{"type":42,"tag":391,"props":8609,"children":8610},{"style":515},[8611],{"type":51,"value":8612},"PARTITION",{"type":42,"tag":391,"props":8614,"children":8615},{"style":515},[8616],{"type":51,"value":8617}," BY",{"type":42,"tag":391,"props":8619,"children":8620},{"style":415},[8621],{"type":51,"value":7614},{"type":42,"tag":391,"props":8623,"children":8624},{"style":409},[8625],{"type":51,"value":247},{"type":42,"tag":391,"props":8627,"children":8628},{"style":415},[8629],{"type":51,"value":6999},{"type":42,"tag":391,"props":8631,"children":8632},{"style":515},[8633],{"type":51,"value":8634}," ORDER BY",{"type":42,"tag":391,"props":8636,"children":8637},{"style":415},[8638],{"type":51,"value":7614},{"type":42,"tag":391,"props":8640,"children":8641},{"style":409},[8642],{"type":51,"value":247},{"type":42,"tag":391,"props":8644,"children":8645},{"style":415},[8646],{"type":51,"value":8647},"updated_at",{"type":42,"tag":391,"props":8649,"children":8650},{"style":515},[8651],{"type":51,"value":8652}," DESC",{"type":42,"tag":391,"props":8654,"children":8655},{"style":409},[8656],{"type":51,"value":7672},{"type":42,"tag":391,"props":8658,"children":8659},{"style":515},[8660],{"type":51,"value":7677},{"type":42,"tag":391,"props":8662,"children":8663},{"style":415},[8664],{"type":51,"value":8665}," 1\n",{"type":42,"tag":569,"props":8667,"children":8668},{"v-slot:snowflake":7},[8669],{"type":42,"tag":381,"props":8670,"children":8672},{"className":6761,"code":8671,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_orders\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.shopify_orders\n  - raw.stripe_charges\ncolumns:\n  - name: order_id\n    type: varchar\n    checks:\n      - name: not_null\n      - name: unique\n  - name: order_date\n    type: timestamp\n    checks:\n      - name: not_null\ncustom_checks:\n  - name: has_rows\n    query: \"SELECT count(*) > 0 FROM staging.stg_orders\"\n    value: 1\n@bruin *\u002F\n\nSELECT\n    o.id AS order_id,\n    o.order_number,\n    o.email AS customer_email,\n    o.created_at AS order_date,\n    o.financial_status AS payment_status,\n    o.fulfillment_status,\n    CAST(o.total_price AS DECIMAL(12,2)) AS order_total,\n    CAST(o.subtotal_price AS DECIMAL(12,2)) AS subtotal,\n    CAST(o.total_tax AS DECIMAL(12,2)) AS tax_amount,\n    CAST(o.total_discounts AS DECIMAL(12,2)) AS discount_amount,\n    o.currency,\n    o.cancel_reason,\n    o.cancelled_at,\n    c.amount \u002F 100.0 AS stripe_charge_amount,\n    c.status AS stripe_status,\n    c.paid AS stripe_paid\nFROM raw.shopify_orders o\nLEFT JOIN raw.stripe_charges c\n    ON o.email = c.receipt_email\n    AND o.created_at::DATE = c.created::DATE\n",[8673],{"type":42,"tag":240,"props":8674,"children":8675},{"__ignoreMap":7},[8676,8683,8690,8697,8704,8711,8718,8725,8732,8739,8746,8753,8760,8767,8774,8781,8788,8795,8802,8809,8816,8823,8830,8837,8844,8851,8874,8893,8916,8939,8962,8981,9040,9099,9158,9217,9236,9255,9274,9313,9336,9359,9382,9405,9440],{"type":42,"tag":391,"props":8677,"children":8678},{"class":393,"line":176},[8679],{"type":42,"tag":391,"props":8680,"children":8681},{"style":6773},[8682],{"type":51,"value":6776},{"type":42,"tag":391,"props":8684,"children":8685},{"class":393,"line":99},[8686],{"type":42,"tag":391,"props":8687,"children":8688},{"style":6773},[8689],{"type":51,"value":6784},{"type":42,"tag":391,"props":8691,"children":8692},{"class":393,"line":439},[8693],{"type":42,"tag":391,"props":8694,"children":8695},{"style":6773},[8696],{"type":51,"value":6792},{"type":42,"tag":391,"props":8698,"children":8699},{"class":393,"line":947},[8700],{"type":42,"tag":391,"props":8701,"children":8702},{"style":6773},[8703],{"type":51,"value":6800},{"type":42,"tag":391,"props":8705,"children":8706},{"class":393,"line":960},[8707],{"type":42,"tag":391,"props":8708,"children":8709},{"style":6773},[8710],{"type":51,"value":6808},{"type":42,"tag":391,"props":8712,"children":8713},{"class":393,"line":984},[8714],{"type":42,"tag":391,"props":8715,"children":8716},{"style":6773},[8717],{"type":51,"value":6816},{"type":42,"tag":391,"props":8719,"children":8720},{"class":393,"line":1002},[8721],{"type":42,"tag":391,"props":8722,"children":8723},{"style":6773},[8724],{"type":51,"value":6824},{"type":42,"tag":391,"props":8726,"children":8727},{"class":393,"line":165},[8728],{"type":42,"tag":391,"props":8729,"children":8730},{"style":6773},[8731],{"type":51,"value":6832},{"type":42,"tag":391,"props":8733,"children":8734},{"class":393,"line":2235},[8735],{"type":42,"tag":391,"props":8736,"children":8737},{"style":6773},[8738],{"type":51,"value":6840},{"type":42,"tag":391,"props":8740,"children":8741},{"class":393,"line":6843},[8742],{"type":42,"tag":391,"props":8743,"children":8744},{"style":6773},[8745],{"type":51,"value":6849},{"type":42,"tag":391,"props":8747,"children":8748},{"class":393,"line":6852},[8749],{"type":42,"tag":391,"props":8750,"children":8751},{"style":6773},[8752],{"type":51,"value":6858},{"type":42,"tag":391,"props":8754,"children":8755},{"class":393,"line":6861},[8756],{"type":42,"tag":391,"props":8757,"children":8758},{"style":6773},[8759],{"type":51,"value":6867},{"type":42,"tag":391,"props":8761,"children":8762},{"class":393,"line":6870},[8763],{"type":42,"tag":391,"props":8764,"children":8765},{"style":6773},[8766],{"type":51,"value":6876},{"type":42,"tag":391,"props":8768,"children":8769},{"class":393,"line":6879},[8770],{"type":42,"tag":391,"props":8771,"children":8772},{"style":6773},[8773],{"type":51,"value":6885},{"type":42,"tag":391,"props":8775,"children":8776},{"class":393,"line":1707},[8777],{"type":42,"tag":391,"props":8778,"children":8779},{"style":6773},[8780],{"type":51,"value":6893},{"type":42,"tag":391,"props":8782,"children":8783},{"class":393,"line":6896},[8784],{"type":42,"tag":391,"props":8785,"children":8786},{"style":6773},[8787],{"type":51,"value":6902},{"type":42,"tag":391,"props":8789,"children":8790},{"class":393,"line":6905},[8791],{"type":42,"tag":391,"props":8792,"children":8793},{"style":6773},[8794],{"type":51,"value":6867},{"type":42,"tag":391,"props":8796,"children":8797},{"class":393,"line":6913},[8798],{"type":42,"tag":391,"props":8799,"children":8800},{"style":6773},[8801],{"type":51,"value":6876},{"type":42,"tag":391,"props":8803,"children":8804},{"class":393,"line":6921},[8805],{"type":42,"tag":391,"props":8806,"children":8807},{"style":6773},[8808],{"type":51,"value":6927},{"type":42,"tag":391,"props":8810,"children":8811},{"class":393,"line":6930},[8812],{"type":42,"tag":391,"props":8813,"children":8814},{"style":6773},[8815],{"type":51,"value":6936},{"type":42,"tag":391,"props":8817,"children":8818},{"class":393,"line":6939},[8819],{"type":42,"tag":391,"props":8820,"children":8821},{"style":6773},[8822],{"type":51,"value":6945},{"type":42,"tag":391,"props":8824,"children":8825},{"class":393,"line":6948},[8826],{"type":42,"tag":391,"props":8827,"children":8828},{"style":6773},[8829],{"type":51,"value":6954},{"type":42,"tag":391,"props":8831,"children":8832},{"class":393,"line":6957},[8833],{"type":42,"tag":391,"props":8834,"children":8835},{"style":6773},[8836],{"type":51,"value":6963},{"type":42,"tag":391,"props":8838,"children":8839},{"class":393,"line":6966},[8840],{"type":42,"tag":391,"props":8841,"children":8842},{"emptyLinePlaceholder":13},[8843],{"type":51,"value":6972},{"type":42,"tag":391,"props":8845,"children":8846},{"class":393,"line":6975},[8847],{"type":42,"tag":391,"props":8848,"children":8849},{"style":515},[8850],{"type":51,"value":6981},{"type":42,"tag":391,"props":8852,"children":8853},{"class":393,"line":6984},[8854,8858,8862,8866,8870],{"type":42,"tag":391,"props":8855,"children":8856},{"style":415},[8857],{"type":51,"value":6990},{"type":42,"tag":391,"props":8859,"children":8860},{"style":409},[8861],{"type":51,"value":247},{"type":42,"tag":391,"props":8863,"children":8864},{"style":415},[8865],{"type":51,"value":6999},{"type":42,"tag":391,"props":8867,"children":8868},{"style":515},[8869],{"type":51,"value":7004},{"type":42,"tag":391,"props":8871,"children":8872},{"style":409},[8873],{"type":51,"value":7009},{"type":42,"tag":391,"props":8875,"children":8876},{"class":393,"line":7012},[8877,8881,8885,8889],{"type":42,"tag":391,"props":8878,"children":8879},{"style":415},[8880],{"type":51,"value":6990},{"type":42,"tag":391,"props":8882,"children":8883},{"style":409},[8884],{"type":51,"value":247},{"type":42,"tag":391,"props":8886,"children":8887},{"style":415},[8888],{"type":51,"value":7026},{"type":42,"tag":391,"props":8890,"children":8891},{"style":409},[8892],{"type":51,"value":7031},{"type":42,"tag":391,"props":8894,"children":8895},{"class":393,"line":7034},[8896,8900,8904,8908,8912],{"type":42,"tag":391,"props":8897,"children":8898},{"style":415},[8899],{"type":51,"value":6990},{"type":42,"tag":391,"props":8901,"children":8902},{"style":409},[8903],{"type":51,"value":247},{"type":42,"tag":391,"props":8905,"children":8906},{"style":415},[8907],{"type":51,"value":7048},{"type":42,"tag":391,"props":8909,"children":8910},{"style":515},[8911],{"type":51,"value":7004},{"type":42,"tag":391,"props":8913,"children":8914},{"style":409},[8915],{"type":51,"value":7057},{"type":42,"tag":391,"props":8917,"children":8918},{"class":393,"line":7060},[8919,8923,8927,8931,8935],{"type":42,"tag":391,"props":8920,"children":8921},{"style":415},[8922],{"type":51,"value":6990},{"type":42,"tag":391,"props":8924,"children":8925},{"style":409},[8926],{"type":51,"value":247},{"type":42,"tag":391,"props":8928,"children":8929},{"style":415},[8930],{"type":51,"value":7074},{"type":42,"tag":391,"props":8932,"children":8933},{"style":515},[8934],{"type":51,"value":7004},{"type":42,"tag":391,"props":8936,"children":8937},{"style":409},[8938],{"type":51,"value":7083},{"type":42,"tag":391,"props":8940,"children":8941},{"class":393,"line":7086},[8942,8946,8950,8954,8958],{"type":42,"tag":391,"props":8943,"children":8944},{"style":415},[8945],{"type":51,"value":6990},{"type":42,"tag":391,"props":8947,"children":8948},{"style":409},[8949],{"type":51,"value":247},{"type":42,"tag":391,"props":8951,"children":8952},{"style":415},[8953],{"type":51,"value":2743},{"type":42,"tag":391,"props":8955,"children":8956},{"style":515},[8957],{"type":51,"value":7004},{"type":42,"tag":391,"props":8959,"children":8960},{"style":409},[8961],{"type":51,"value":7108},{"type":42,"tag":391,"props":8963,"children":8964},{"class":393,"line":7111},[8965,8969,8973,8977],{"type":42,"tag":391,"props":8966,"children":8967},{"style":415},[8968],{"type":51,"value":6990},{"type":42,"tag":391,"props":8970,"children":8971},{"style":409},[8972],{"type":51,"value":247},{"type":42,"tag":391,"props":8974,"children":8975},{"style":415},[8976],{"type":51,"value":7125},{"type":42,"tag":391,"props":8978,"children":8979},{"style":409},[8980],{"type":51,"value":7031},{"type":42,"tag":391,"props":8982,"children":8983},{"class":393,"line":7132},[8984,8988,8992,8996,9000,9004,9008,9012,9016,9020,9024,9028,9032,9036],{"type":42,"tag":391,"props":8985,"children":8986},{"style":415},[8987],{"type":51,"value":7138},{"type":42,"tag":391,"props":8989,"children":8990},{"style":409},[8991],{"type":51,"value":7143},{"type":42,"tag":391,"props":8993,"children":8994},{"style":415},[8995],{"type":51,"value":7148},{"type":42,"tag":391,"props":8997,"children":8998},{"style":409},[8999],{"type":51,"value":247},{"type":42,"tag":391,"props":9001,"children":9002},{"style":415},[9003],{"type":51,"value":2750},{"type":42,"tag":391,"props":9005,"children":9006},{"style":515},[9007],{"type":51,"value":7004},{"type":42,"tag":391,"props":9009,"children":9010},{"style":515},[9011],{"type":51,"value":7165},{"type":42,"tag":391,"props":9013,"children":9014},{"style":409},[9015],{"type":51,"value":7143},{"type":42,"tag":391,"props":9017,"children":9018},{"style":415},[9019],{"type":51,"value":7174},{"type":42,"tag":391,"props":9021,"children":9022},{"style":409},[9023],{"type":51,"value":7179},{"type":42,"tag":391,"props":9025,"children":9026},{"style":415},[9027],{"type":51,"value":7184},{"type":42,"tag":391,"props":9029,"children":9030},{"style":409},[9031],{"type":51,"value":7189},{"type":42,"tag":391,"props":9033,"children":9034},{"style":515},[9035],{"type":51,"value":7194},{"type":42,"tag":391,"props":9037,"children":9038},{"style":409},[9039],{"type":51,"value":7199},{"type":42,"tag":391,"props":9041,"children":9042},{"class":393,"line":7202},[9043,9047,9051,9055,9059,9063,9067,9071,9075,9079,9083,9087,9091,9095],{"type":42,"tag":391,"props":9044,"children":9045},{"style":415},[9046],{"type":51,"value":7138},{"type":42,"tag":391,"props":9048,"children":9049},{"style":409},[9050],{"type":51,"value":7143},{"type":42,"tag":391,"props":9052,"children":9053},{"style":415},[9054],{"type":51,"value":7148},{"type":42,"tag":391,"props":9056,"children":9057},{"style":409},[9058],{"type":51,"value":247},{"type":42,"tag":391,"props":9060,"children":9061},{"style":415},[9062],{"type":51,"value":7224},{"type":42,"tag":391,"props":9064,"children":9065},{"style":515},[9066],{"type":51,"value":7004},{"type":42,"tag":391,"props":9068,"children":9069},{"style":515},[9070],{"type":51,"value":7165},{"type":42,"tag":391,"props":9072,"children":9073},{"style":409},[9074],{"type":51,"value":7143},{"type":42,"tag":391,"props":9076,"children":9077},{"style":415},[9078],{"type":51,"value":7174},{"type":42,"tag":391,"props":9080,"children":9081},{"style":409},[9082],{"type":51,"value":7179},{"type":42,"tag":391,"props":9084,"children":9085},{"style":415},[9086],{"type":51,"value":7184},{"type":42,"tag":391,"props":9088,"children":9089},{"style":409},[9090],{"type":51,"value":7189},{"type":42,"tag":391,"props":9092,"children":9093},{"style":515},[9094],{"type":51,"value":7194},{"type":42,"tag":391,"props":9096,"children":9097},{"style":409},[9098],{"type":51,"value":7261},{"type":42,"tag":391,"props":9100,"children":9101},{"class":393,"line":7264},[9102,9106,9110,9114,9118,9122,9126,9130,9134,9138,9142,9146,9150,9154],{"type":42,"tag":391,"props":9103,"children":9104},{"style":415},[9105],{"type":51,"value":7138},{"type":42,"tag":391,"props":9107,"children":9108},{"style":409},[9109],{"type":51,"value":7143},{"type":42,"tag":391,"props":9111,"children":9112},{"style":415},[9113],{"type":51,"value":7148},{"type":42,"tag":391,"props":9115,"children":9116},{"style":409},[9117],{"type":51,"value":247},{"type":42,"tag":391,"props":9119,"children":9120},{"style":415},[9121],{"type":51,"value":7286},{"type":42,"tag":391,"props":9123,"children":9124},{"style":515},[9125],{"type":51,"value":7004},{"type":42,"tag":391,"props":9127,"children":9128},{"style":515},[9129],{"type":51,"value":7165},{"type":42,"tag":391,"props":9131,"children":9132},{"style":409},[9133],{"type":51,"value":7143},{"type":42,"tag":391,"props":9135,"children":9136},{"style":415},[9137],{"type":51,"value":7174},{"type":42,"tag":391,"props":9139,"children":9140},{"style":409},[9141],{"type":51,"value":7179},{"type":42,"tag":391,"props":9143,"children":9144},{"style":415},[9145],{"type":51,"value":7184},{"type":42,"tag":391,"props":9147,"children":9148},{"style":409},[9149],{"type":51,"value":7189},{"type":42,"tag":391,"props":9151,"children":9152},{"style":515},[9153],{"type":51,"value":7194},{"type":42,"tag":391,"props":9155,"children":9156},{"style":409},[9157],{"type":51,"value":7323},{"type":42,"tag":391,"props":9159,"children":9160},{"class":393,"line":7326},[9161,9165,9169,9173,9177,9181,9185,9189,9193,9197,9201,9205,9209,9213],{"type":42,"tag":391,"props":9162,"children":9163},{"style":415},[9164],{"type":51,"value":7138},{"type":42,"tag":391,"props":9166,"children":9167},{"style":409},[9168],{"type":51,"value":7143},{"type":42,"tag":391,"props":9170,"children":9171},{"style":415},[9172],{"type":51,"value":7148},{"type":42,"tag":391,"props":9174,"children":9175},{"style":409},[9176],{"type":51,"value":247},{"type":42,"tag":391,"props":9178,"children":9179},{"style":415},[9180],{"type":51,"value":7348},{"type":42,"tag":391,"props":9182,"children":9183},{"style":515},[9184],{"type":51,"value":7004},{"type":42,"tag":391,"props":9186,"children":9187},{"style":515},[9188],{"type":51,"value":7165},{"type":42,"tag":391,"props":9190,"children":9191},{"style":409},[9192],{"type":51,"value":7143},{"type":42,"tag":391,"props":9194,"children":9195},{"style":415},[9196],{"type":51,"value":7174},{"type":42,"tag":391,"props":9198,"children":9199},{"style":409},[9200],{"type":51,"value":7179},{"type":42,"tag":391,"props":9202,"children":9203},{"style":415},[9204],{"type":51,"value":7184},{"type":42,"tag":391,"props":9206,"children":9207},{"style":409},[9208],{"type":51,"value":7189},{"type":42,"tag":391,"props":9210,"children":9211},{"style":515},[9212],{"type":51,"value":7194},{"type":42,"tag":391,"props":9214,"children":9215},{"style":409},[9216],{"type":51,"value":7385},{"type":42,"tag":391,"props":9218,"children":9219},{"class":393,"line":7388},[9220,9224,9228,9232],{"type":42,"tag":391,"props":9221,"children":9222},{"style":415},[9223],{"type":51,"value":6990},{"type":42,"tag":391,"props":9225,"children":9226},{"style":409},[9227],{"type":51,"value":247},{"type":42,"tag":391,"props":9229,"children":9230},{"style":415},[9231],{"type":51,"value":7402},{"type":42,"tag":391,"props":9233,"children":9234},{"style":409},[9235],{"type":51,"value":7031},{"type":42,"tag":391,"props":9237,"children":9238},{"class":393,"line":7409},[9239,9243,9247,9251],{"type":42,"tag":391,"props":9240,"children":9241},{"style":415},[9242],{"type":51,"value":6990},{"type":42,"tag":391,"props":9244,"children":9245},{"style":409},[9246],{"type":51,"value":247},{"type":42,"tag":391,"props":9248,"children":9249},{"style":415},[9250],{"type":51,"value":7423},{"type":42,"tag":391,"props":9252,"children":9253},{"style":409},[9254],{"type":51,"value":7031},{"type":42,"tag":391,"props":9256,"children":9257},{"class":393,"line":7430},[9258,9262,9266,9270],{"type":42,"tag":391,"props":9259,"children":9260},{"style":415},[9261],{"type":51,"value":6990},{"type":42,"tag":391,"props":9263,"children":9264},{"style":409},[9265],{"type":51,"value":247},{"type":42,"tag":391,"props":9267,"children":9268},{"style":415},[9269],{"type":51,"value":7444},{"type":42,"tag":391,"props":9271,"children":9272},{"style":409},[9273],{"type":51,"value":7031},{"type":42,"tag":391,"props":9275,"children":9276},{"class":393,"line":7451},[9277,9281,9285,9289,9293,9297,9301,9305,9309],{"type":42,"tag":391,"props":9278,"children":9279},{"style":415},[9280],{"type":51,"value":7457},{"type":42,"tag":391,"props":9282,"children":9283},{"style":409},[9284],{"type":51,"value":247},{"type":42,"tag":391,"props":9286,"children":9287},{"style":415},[9288],{"type":51,"value":7466},{"type":42,"tag":391,"props":9290,"children":9291},{"style":515},[9292],{"type":51,"value":7471},{"type":42,"tag":391,"props":9294,"children":9295},{"style":415},[9296],{"type":51,"value":7476},{"type":42,"tag":391,"props":9298,"children":9299},{"style":409},[9300],{"type":51,"value":247},{"type":42,"tag":391,"props":9302,"children":9303},{"style":415},[9304],{"type":51,"value":7485},{"type":42,"tag":391,"props":9306,"children":9307},{"style":515},[9308],{"type":51,"value":7004},{"type":42,"tag":391,"props":9310,"children":9311},{"style":409},[9312],{"type":51,"value":7494},{"type":42,"tag":391,"props":9314,"children":9315},{"class":393,"line":7497},[9316,9320,9324,9328,9332],{"type":42,"tag":391,"props":9317,"children":9318},{"style":415},[9319],{"type":51,"value":7457},{"type":42,"tag":391,"props":9321,"children":9322},{"style":409},[9323],{"type":51,"value":247},{"type":42,"tag":391,"props":9325,"children":9326},{"style":415},[9327],{"type":51,"value":7511},{"type":42,"tag":391,"props":9329,"children":9330},{"style":515},[9331],{"type":51,"value":7004},{"type":42,"tag":391,"props":9333,"children":9334},{"style":409},[9335],{"type":51,"value":7520},{"type":42,"tag":391,"props":9337,"children":9338},{"class":393,"line":7523},[9339,9343,9347,9351,9355],{"type":42,"tag":391,"props":9340,"children":9341},{"style":415},[9342],{"type":51,"value":7457},{"type":42,"tag":391,"props":9344,"children":9345},{"style":409},[9346],{"type":51,"value":247},{"type":42,"tag":391,"props":9348,"children":9349},{"style":415},[9350],{"type":51,"value":7537},{"type":42,"tag":391,"props":9352,"children":9353},{"style":515},[9354],{"type":51,"value":7004},{"type":42,"tag":391,"props":9356,"children":9357},{"style":409},[9358],{"type":51,"value":7546},{"type":42,"tag":391,"props":9360,"children":9361},{"class":393,"line":7549},[9362,9366,9370,9374,9378],{"type":42,"tag":391,"props":9363,"children":9364},{"style":515},[9365],{"type":51,"value":7555},{"type":42,"tag":391,"props":9367,"children":9368},{"style":415},[9369],{"type":51,"value":7560},{"type":42,"tag":391,"props":9371,"children":9372},{"style":409},[9373],{"type":51,"value":247},{"type":42,"tag":391,"props":9375,"children":9376},{"style":415},[9377],{"type":51,"value":7569},{"type":42,"tag":391,"props":9379,"children":9380},{"style":409},[9381],{"type":51,"value":7574},{"type":42,"tag":391,"props":9383,"children":9384},{"class":393,"line":7577},[9385,9389,9393,9397,9401],{"type":42,"tag":391,"props":9386,"children":9387},{"style":515},[9388],{"type":51,"value":6663},{"type":42,"tag":391,"props":9390,"children":9391},{"style":415},[9392],{"type":51,"value":7560},{"type":42,"tag":391,"props":9394,"children":9395},{"style":409},[9396],{"type":51,"value":247},{"type":42,"tag":391,"props":9398,"children":9399},{"style":415},[9400],{"type":51,"value":7595},{"type":42,"tag":391,"props":9402,"children":9403},{"style":409},[9404],{"type":51,"value":7600},{"type":42,"tag":391,"props":9406,"children":9407},{"class":393,"line":7603},[9408,9412,9416,9420,9424,9428,9432,9436],{"type":42,"tag":391,"props":9409,"children":9410},{"style":515},[9411],{"type":51,"value":7609},{"type":42,"tag":391,"props":9413,"children":9414},{"style":415},[9415],{"type":51,"value":7614},{"type":42,"tag":391,"props":9417,"children":9418},{"style":409},[9419],{"type":51,"value":247},{"type":42,"tag":391,"props":9421,"children":9422},{"style":415},[9423],{"type":51,"value":7048},{"type":42,"tag":391,"props":9425,"children":9426},{"style":515},[9427],{"type":51,"value":7627},{"type":42,"tag":391,"props":9429,"children":9430},{"style":415},[9431],{"type":51,"value":7632},{"type":42,"tag":391,"props":9433,"children":9434},{"style":409},[9435],{"type":51,"value":247},{"type":42,"tag":391,"props":9437,"children":9438},{"style":415},[9439],{"type":51,"value":7641},{"type":42,"tag":391,"props":9441,"children":9442},{"class":393,"line":7644},[9443,9447,9451,9455,9459,9464,9469,9473,9477,9481,9485,9489],{"type":42,"tag":391,"props":9444,"children":9445},{"style":515},[9446],{"type":51,"value":7650},{"type":42,"tag":391,"props":9448,"children":9449},{"style":415},[9450],{"type":51,"value":7614},{"type":42,"tag":391,"props":9452,"children":9453},{"style":409},[9454],{"type":51,"value":247},{"type":42,"tag":391,"props":9456,"children":9457},{"style":415},[9458],{"type":51,"value":7074},{"type":42,"tag":391,"props":9460,"children":9461},{"style":409},[9462],{"type":51,"value":9463},"::",{"type":42,"tag":391,"props":9465,"children":9466},{"style":515},[9467],{"type":51,"value":9468},"DATE",{"type":42,"tag":391,"props":9470,"children":9471},{"style":515},[9472],{"type":51,"value":7627},{"type":42,"tag":391,"props":9474,"children":9475},{"style":415},[9476],{"type":51,"value":7632},{"type":42,"tag":391,"props":9478,"children":9479},{"style":409},[9480],{"type":51,"value":247},{"type":42,"tag":391,"props":9482,"children":9483},{"style":415},[9484],{"type":51,"value":7695},{"type":42,"tag":391,"props":9486,"children":9487},{"style":409},[9488],{"type":51,"value":9463},{"type":42,"tag":391,"props":9490,"children":9491},{"style":515},[9492],{"type":51,"value":9493},"DATE\n",{"type":42,"tag":43,"props":9495,"children":9496},{},[9497,9499,9504,9506,9512],{"type":51,"value":9498},"The ",{"type":42,"tag":240,"props":9500,"children":9502},{"className":9501},[],[9503],{"type":51,"value":6663},{"type":51,"value":9505}," keeps all Shopify orders even if the Stripe charge hasn't synced yet. The ",{"type":42,"tag":240,"props":9507,"children":9509},{"className":9508},[],[9510],{"type":51,"value":9511},"\u002F 100.0",{"type":51,"value":9513}," converts Stripe's cent-based amounts to dollars.",{"type":42,"tag":361,"props":9515,"children":9517},{"id":9516},"_2-staged-customers-stg_customerssql",[9518,9520],{"type":51,"value":9519},"2) Staged customers - ",{"type":42,"tag":240,"props":9521,"children":9523},{"className":9522},[],[9524],{"type":51,"value":9525},"stg_customers.sql",{"type":42,"tag":43,"props":9527,"children":9528},{},[9529,9531,9537,9538,9544,9545,9551,9552,9558],{"type":51,"value":9530},"A unified customer table that merges Shopify and Stripe profiles. This query uses ",{"type":42,"tag":240,"props":9532,"children":9534},{"className":9533},[],[9535],{"type":51,"value":9536},"COALESCE",{"type":51,"value":292},{"type":42,"tag":240,"props":9539,"children":9541},{"className":9540},[],[9542],{"type":51,"value":9543},"LEAST",{"type":51,"value":292},{"type":42,"tag":240,"props":9546,"children":9548},{"className":9547},[],[9549],{"type":51,"value":9550},"FULL OUTER JOIN",{"type":51,"value":314},{"type":42,"tag":240,"props":9553,"children":9555},{"className":9554},[],[9556],{"type":51,"value":9557},"lower()",{"type":51,"value":9559}," - all of which work the same across warehouses, so there is no warehouse-specific variant needed.",{"type":42,"tag":339,"props":9561,"children":9562},{"type":6651},[9563],{"type":42,"tag":43,"props":9564,"children":9565},{},[9566,9568,9574,9576,9582,9583,9587,9588,9593,9594,9599,9601,9606,9608,9614,9616,9621,9623,9628],{"type":51,"value":9567},"The SQL below joins ",{"type":42,"tag":240,"props":9569,"children":9571},{"className":9570},[],[9572],{"type":51,"value":9573},"raw.shopify_customers",{"type":51,"value":9575}," with ",{"type":42,"tag":240,"props":9577,"children":9579},{"className":9578},[],[9580],{"type":51,"value":9581},"raw.stripe_customers",{"type":51,"value":6681},{"type":42,"tag":47,"props":9584,"children":9585},{},[9586],{"type":51,"value":2732},{"type":51,"value":6687},{"type":42,"tag":240,"props":9589,"children":9591},{"className":9590},[],[9592],{"type":51,"value":9581},{"type":51,"value":6694},{"type":42,"tag":240,"props":9595,"children":9597},{"className":9596},[],[9598],{"type":51,"value":6679},{"type":51,"value":9600}," list, replace the ",{"type":42,"tag":240,"props":9602,"children":9604},{"className":9603},[],[9605],{"type":51,"value":9550},{"type":51,"value":9607}," with a plain ",{"type":42,"tag":240,"props":9609,"children":9611},{"className":9610},[],[9612],{"type":51,"value":9613},"SELECT",{"type":51,"value":9615}," from ",{"type":42,"tag":240,"props":9617,"children":9619},{"className":9618},[],[9620],{"type":51,"value":9573},{"type":51,"value":9622},", and drop the ",{"type":42,"tag":240,"props":9624,"children":9626},{"className":9625},[],[9627],{"type":51,"value":6714},{"type":51,"value":9629}," columns. Ask Claude Code to adjust the query for you if needed.",{"type":42,"tag":43,"props":9631,"children":9632},{},[9633,9634,9643],{"type":51,"value":6741},{"type":42,"tag":47,"props":9635,"children":9636},{},[9637],{"type":42,"tag":240,"props":9638,"children":9640},{"className":9639},[],[9641],{"type":51,"value":9642},"ecommerce\u002Fassets\u002Fstaging\u002Fstg_customers.sql",{"type":51,"value":6752},{"type":42,"tag":381,"props":9645,"children":9647},{"className":6761,"code":9646,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_customers\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.shopify_customers\n  - raw.stripe_customers\ncolumns:\n  - name: customer_email\n    type: varchar\n    checks:\n      - name: not_null\n      - name: unique\n@bruin *\u002F\n\nSELECT\n    COALESCE(sc.email, st.email) AS customer_email,\n    sc.id AS shopify_customer_id,\n    st.id AS stripe_customer_id,\n    sc.first_name,\n    sc.last_name,\n    sc.created_at AS shopify_created_at,\n    st.created AS stripe_created_at,\n    LEAST(sc.created_at, st.created) AS first_seen_at,\n    sc.orders_count,\n    CAST(sc.total_spent AS DECIMAL(12,2)) AS shopify_total_spent,\n    sc.tags AS customer_tags,\n    sc.state AS customer_state\nFROM raw.shopify_customers sc\nFULL OUTER JOIN raw.stripe_customers st\n    ON lower(sc.email) = lower(st.email)\nWHERE COALESCE(sc.email, st.email) IS NOT NULL\n",[9648],{"type":42,"tag":240,"props":9649,"children":9650},{"__ignoreMap":7},[9651,9658,9666,9673,9680,9687,9694,9702,9710,9717,9725,9732,9739,9746,9753,9760,9767,9774,9828,9853,9878,9898,9918,9942,9966,10019,10039,10100,10125,10150,10175,10200,10260],{"type":42,"tag":391,"props":9652,"children":9653},{"class":393,"line":176},[9654],{"type":42,"tag":391,"props":9655,"children":9656},{"style":6773},[9657],{"type":51,"value":6776},{"type":42,"tag":391,"props":9659,"children":9660},{"class":393,"line":99},[9661],{"type":42,"tag":391,"props":9662,"children":9663},{"style":6773},[9664],{"type":51,"value":9665},"name: staging.stg_customers\n",{"type":42,"tag":391,"props":9667,"children":9668},{"class":393,"line":439},[9669],{"type":42,"tag":391,"props":9670,"children":9671},{"style":6773},[9672],{"type":51,"value":6792},{"type":42,"tag":391,"props":9674,"children":9675},{"class":393,"line":947},[9676],{"type":42,"tag":391,"props":9677,"children":9678},{"style":6773},[9679],{"type":51,"value":6800},{"type":42,"tag":391,"props":9681,"children":9682},{"class":393,"line":960},[9683],{"type":42,"tag":391,"props":9684,"children":9685},{"style":6773},[9686],{"type":51,"value":6808},{"type":42,"tag":391,"props":9688,"children":9689},{"class":393,"line":984},[9690],{"type":42,"tag":391,"props":9691,"children":9692},{"style":6773},[9693],{"type":51,"value":6816},{"type":42,"tag":391,"props":9695,"children":9696},{"class":393,"line":1002},[9697],{"type":42,"tag":391,"props":9698,"children":9699},{"style":6773},[9700],{"type":51,"value":9701},"  - raw.shopify_customers\n",{"type":42,"tag":391,"props":9703,"children":9704},{"class":393,"line":165},[9705],{"type":42,"tag":391,"props":9706,"children":9707},{"style":6773},[9708],{"type":51,"value":9709},"  - raw.stripe_customers\n",{"type":42,"tag":391,"props":9711,"children":9712},{"class":393,"line":2235},[9713],{"type":42,"tag":391,"props":9714,"children":9715},{"style":6773},[9716],{"type":51,"value":6840},{"type":42,"tag":391,"props":9718,"children":9719},{"class":393,"line":6843},[9720],{"type":42,"tag":391,"props":9721,"children":9722},{"style":6773},[9723],{"type":51,"value":9724},"  - name: customer_email\n",{"type":42,"tag":391,"props":9726,"children":9727},{"class":393,"line":6852},[9728],{"type":42,"tag":391,"props":9729,"children":9730},{"style":6773},[9731],{"type":51,"value":6858},{"type":42,"tag":391,"props":9733,"children":9734},{"class":393,"line":6861},[9735],{"type":42,"tag":391,"props":9736,"children":9737},{"style":6773},[9738],{"type":51,"value":6867},{"type":42,"tag":391,"props":9740,"children":9741},{"class":393,"line":6870},[9742],{"type":42,"tag":391,"props":9743,"children":9744},{"style":6773},[9745],{"type":51,"value":6876},{"type":42,"tag":391,"props":9747,"children":9748},{"class":393,"line":6879},[9749],{"type":42,"tag":391,"props":9750,"children":9751},{"style":6773},[9752],{"type":51,"value":6885},{"type":42,"tag":391,"props":9754,"children":9755},{"class":393,"line":1707},[9756],{"type":42,"tag":391,"props":9757,"children":9758},{"style":6773},[9759],{"type":51,"value":6963},{"type":42,"tag":391,"props":9761,"children":9762},{"class":393,"line":6896},[9763],{"type":42,"tag":391,"props":9764,"children":9765},{"emptyLinePlaceholder":13},[9766],{"type":51,"value":6972},{"type":42,"tag":391,"props":9768,"children":9769},{"class":393,"line":6905},[9770],{"type":42,"tag":391,"props":9771,"children":9772},{"style":515},[9773],{"type":51,"value":6981},{"type":42,"tag":391,"props":9775,"children":9776},{"class":393,"line":6913},[9777,9782,9786,9791,9795,9799,9803,9808,9812,9816,9820,9824],{"type":42,"tag":391,"props":9778,"children":9779},{"style":415},[9780],{"type":51,"value":9781},"    COALESCE",{"type":42,"tag":391,"props":9783,"children":9784},{"style":409},[9785],{"type":51,"value":7143},{"type":42,"tag":391,"props":9787,"children":9788},{"style":415},[9789],{"type":51,"value":9790},"sc",{"type":42,"tag":391,"props":9792,"children":9793},{"style":409},[9794],{"type":51,"value":247},{"type":42,"tag":391,"props":9796,"children":9797},{"style":415},[9798],{"type":51,"value":7048},{"type":42,"tag":391,"props":9800,"children":9801},{"style":409},[9802],{"type":51,"value":292},{"type":42,"tag":391,"props":9804,"children":9805},{"style":415},[9806],{"type":51,"value":9807},"st",{"type":42,"tag":391,"props":9809,"children":9810},{"style":409},[9811],{"type":51,"value":247},{"type":42,"tag":391,"props":9813,"children":9814},{"style":415},[9815],{"type":51,"value":7048},{"type":42,"tag":391,"props":9817,"children":9818},{"style":409},[9819],{"type":51,"value":7672},{"type":42,"tag":391,"props":9821,"children":9822},{"style":515},[9823],{"type":51,"value":7194},{"type":42,"tag":391,"props":9825,"children":9826},{"style":409},[9827],{"type":51,"value":7057},{"type":42,"tag":391,"props":9829,"children":9830},{"class":393,"line":6921},[9831,9836,9840,9844,9848],{"type":42,"tag":391,"props":9832,"children":9833},{"style":415},[9834],{"type":51,"value":9835},"    sc",{"type":42,"tag":391,"props":9837,"children":9838},{"style":409},[9839],{"type":51,"value":247},{"type":42,"tag":391,"props":9841,"children":9842},{"style":415},[9843],{"type":51,"value":6999},{"type":42,"tag":391,"props":9845,"children":9846},{"style":515},[9847],{"type":51,"value":7004},{"type":42,"tag":391,"props":9849,"children":9850},{"style":409},[9851],{"type":51,"value":9852}," shopify_customer_id,\n",{"type":42,"tag":391,"props":9854,"children":9855},{"class":393,"line":6930},[9856,9861,9865,9869,9873],{"type":42,"tag":391,"props":9857,"children":9858},{"style":415},[9859],{"type":51,"value":9860},"    st",{"type":42,"tag":391,"props":9862,"children":9863},{"style":409},[9864],{"type":51,"value":247},{"type":42,"tag":391,"props":9866,"children":9867},{"style":415},[9868],{"type":51,"value":6999},{"type":42,"tag":391,"props":9870,"children":9871},{"style":515},[9872],{"type":51,"value":7004},{"type":42,"tag":391,"props":9874,"children":9875},{"style":409},[9876],{"type":51,"value":9877}," stripe_customer_id,\n",{"type":42,"tag":391,"props":9879,"children":9880},{"class":393,"line":6939},[9881,9885,9889,9894],{"type":42,"tag":391,"props":9882,"children":9883},{"style":415},[9884],{"type":51,"value":9835},{"type":42,"tag":391,"props":9886,"children":9887},{"style":409},[9888],{"type":51,"value":247},{"type":42,"tag":391,"props":9890,"children":9891},{"style":415},[9892],{"type":51,"value":9893},"first_name",{"type":42,"tag":391,"props":9895,"children":9896},{"style":409},[9897],{"type":51,"value":7031},{"type":42,"tag":391,"props":9899,"children":9900},{"class":393,"line":6948},[9901,9905,9909,9914],{"type":42,"tag":391,"props":9902,"children":9903},{"style":415},[9904],{"type":51,"value":9835},{"type":42,"tag":391,"props":9906,"children":9907},{"style":409},[9908],{"type":51,"value":247},{"type":42,"tag":391,"props":9910,"children":9911},{"style":415},[9912],{"type":51,"value":9913},"last_name",{"type":42,"tag":391,"props":9915,"children":9916},{"style":409},[9917],{"type":51,"value":7031},{"type":42,"tag":391,"props":9919,"children":9920},{"class":393,"line":6957},[9921,9925,9929,9933,9937],{"type":42,"tag":391,"props":9922,"children":9923},{"style":415},[9924],{"type":51,"value":9835},{"type":42,"tag":391,"props":9926,"children":9927},{"style":409},[9928],{"type":51,"value":247},{"type":42,"tag":391,"props":9930,"children":9931},{"style":415},[9932],{"type":51,"value":7074},{"type":42,"tag":391,"props":9934,"children":9935},{"style":515},[9936],{"type":51,"value":7004},{"type":42,"tag":391,"props":9938,"children":9939},{"style":409},[9940],{"type":51,"value":9941}," shopify_created_at,\n",{"type":42,"tag":391,"props":9943,"children":9944},{"class":393,"line":6966},[9945,9949,9953,9957,9961],{"type":42,"tag":391,"props":9946,"children":9947},{"style":415},[9948],{"type":51,"value":9860},{"type":42,"tag":391,"props":9950,"children":9951},{"style":409},[9952],{"type":51,"value":247},{"type":42,"tag":391,"props":9954,"children":9955},{"style":415},[9956],{"type":51,"value":7695},{"type":42,"tag":391,"props":9958,"children":9959},{"style":515},[9960],{"type":51,"value":7004},{"type":42,"tag":391,"props":9962,"children":9963},{"style":409},[9964],{"type":51,"value":9965}," stripe_created_at,\n",{"type":42,"tag":391,"props":9967,"children":9968},{"class":393,"line":6975},[9969,9974,9978,9982,9986,9990,9994,9998,10002,10006,10010,10014],{"type":42,"tag":391,"props":9970,"children":9971},{"style":415},[9972],{"type":51,"value":9973},"    LEAST",{"type":42,"tag":391,"props":9975,"children":9976},{"style":409},[9977],{"type":51,"value":7143},{"type":42,"tag":391,"props":9979,"children":9980},{"style":415},[9981],{"type":51,"value":9790},{"type":42,"tag":391,"props":9983,"children":9984},{"style":409},[9985],{"type":51,"value":247},{"type":42,"tag":391,"props":9987,"children":9988},{"style":415},[9989],{"type":51,"value":7074},{"type":42,"tag":391,"props":9991,"children":9992},{"style":409},[9993],{"type":51,"value":292},{"type":42,"tag":391,"props":9995,"children":9996},{"style":415},[9997],{"type":51,"value":9807},{"type":42,"tag":391,"props":9999,"children":10000},{"style":409},[10001],{"type":51,"value":247},{"type":42,"tag":391,"props":10003,"children":10004},{"style":415},[10005],{"type":51,"value":7695},{"type":42,"tag":391,"props":10007,"children":10008},{"style":409},[10009],{"type":51,"value":7672},{"type":42,"tag":391,"props":10011,"children":10012},{"style":515},[10013],{"type":51,"value":7194},{"type":42,"tag":391,"props":10015,"children":10016},{"style":409},[10017],{"type":51,"value":10018}," first_seen_at,\n",{"type":42,"tag":391,"props":10020,"children":10021},{"class":393,"line":6984},[10022,10026,10030,10035],{"type":42,"tag":391,"props":10023,"children":10024},{"style":415},[10025],{"type":51,"value":9835},{"type":42,"tag":391,"props":10027,"children":10028},{"style":409},[10029],{"type":51,"value":247},{"type":42,"tag":391,"props":10031,"children":10032},{"style":415},[10033],{"type":51,"value":10034},"orders_count",{"type":42,"tag":391,"props":10036,"children":10037},{"style":409},[10038],{"type":51,"value":7031},{"type":42,"tag":391,"props":10040,"children":10041},{"class":393,"line":7012},[10042,10046,10050,10054,10058,10063,10067,10071,10075,10079,10083,10087,10091,10095],{"type":42,"tag":391,"props":10043,"children":10044},{"style":415},[10045],{"type":51,"value":7138},{"type":42,"tag":391,"props":10047,"children":10048},{"style":409},[10049],{"type":51,"value":7143},{"type":42,"tag":391,"props":10051,"children":10052},{"style":415},[10053],{"type":51,"value":9790},{"type":42,"tag":391,"props":10055,"children":10056},{"style":409},[10057],{"type":51,"value":247},{"type":42,"tag":391,"props":10059,"children":10060},{"style":415},[10061],{"type":51,"value":10062},"total_spent",{"type":42,"tag":391,"props":10064,"children":10065},{"style":515},[10066],{"type":51,"value":7004},{"type":42,"tag":391,"props":10068,"children":10069},{"style":515},[10070],{"type":51,"value":7165},{"type":42,"tag":391,"props":10072,"children":10073},{"style":409},[10074],{"type":51,"value":7143},{"type":42,"tag":391,"props":10076,"children":10077},{"style":415},[10078],{"type":51,"value":7174},{"type":42,"tag":391,"props":10080,"children":10081},{"style":409},[10082],{"type":51,"value":7179},{"type":42,"tag":391,"props":10084,"children":10085},{"style":415},[10086],{"type":51,"value":7184},{"type":42,"tag":391,"props":10088,"children":10089},{"style":409},[10090],{"type":51,"value":7189},{"type":42,"tag":391,"props":10092,"children":10093},{"style":515},[10094],{"type":51,"value":7194},{"type":42,"tag":391,"props":10096,"children":10097},{"style":409},[10098],{"type":51,"value":10099}," shopify_total_spent,\n",{"type":42,"tag":391,"props":10101,"children":10102},{"class":393,"line":7034},[10103,10107,10111,10116,10120],{"type":42,"tag":391,"props":10104,"children":10105},{"style":415},[10106],{"type":51,"value":9835},{"type":42,"tag":391,"props":10108,"children":10109},{"style":409},[10110],{"type":51,"value":247},{"type":42,"tag":391,"props":10112,"children":10113},{"style":415},[10114],{"type":51,"value":10115},"tags",{"type":42,"tag":391,"props":10117,"children":10118},{"style":515},[10119],{"type":51,"value":7004},{"type":42,"tag":391,"props":10121,"children":10122},{"style":409},[10123],{"type":51,"value":10124}," customer_tags,\n",{"type":42,"tag":391,"props":10126,"children":10127},{"class":393,"line":7060},[10128,10132,10136,10141,10145],{"type":42,"tag":391,"props":10129,"children":10130},{"style":415},[10131],{"type":51,"value":9835},{"type":42,"tag":391,"props":10133,"children":10134},{"style":409},[10135],{"type":51,"value":247},{"type":42,"tag":391,"props":10137,"children":10138},{"style":415},[10139],{"type":51,"value":10140},"state",{"type":42,"tag":391,"props":10142,"children":10143},{"style":515},[10144],{"type":51,"value":7004},{"type":42,"tag":391,"props":10146,"children":10147},{"style":409},[10148],{"type":51,"value":10149}," customer_state\n",{"type":42,"tag":391,"props":10151,"children":10152},{"class":393,"line":7086},[10153,10157,10161,10165,10170],{"type":42,"tag":391,"props":10154,"children":10155},{"style":515},[10156],{"type":51,"value":7555},{"type":42,"tag":391,"props":10158,"children":10159},{"style":415},[10160],{"type":51,"value":7560},{"type":42,"tag":391,"props":10162,"children":10163},{"style":409},[10164],{"type":51,"value":247},{"type":42,"tag":391,"props":10166,"children":10167},{"style":415},[10168],{"type":51,"value":10169},"shopify_customers",{"type":42,"tag":391,"props":10171,"children":10172},{"style":409},[10173],{"type":51,"value":10174}," sc\n",{"type":42,"tag":391,"props":10176,"children":10177},{"class":393,"line":7111},[10178,10182,10186,10190,10195],{"type":42,"tag":391,"props":10179,"children":10180},{"style":515},[10181],{"type":51,"value":9550},{"type":42,"tag":391,"props":10183,"children":10184},{"style":415},[10185],{"type":51,"value":7560},{"type":42,"tag":391,"props":10187,"children":10188},{"style":409},[10189],{"type":51,"value":247},{"type":42,"tag":391,"props":10191,"children":10192},{"style":415},[10193],{"type":51,"value":10194},"stripe_customers",{"type":42,"tag":391,"props":10196,"children":10197},{"style":409},[10198],{"type":51,"value":10199}," st\n",{"type":42,"tag":391,"props":10201,"children":10202},{"class":393,"line":7132},[10203,10207,10212,10216,10220,10224,10228,10232,10236,10240,10244,10248,10252,10256],{"type":42,"tag":391,"props":10204,"children":10205},{"style":515},[10206],{"type":51,"value":7609},{"type":42,"tag":391,"props":10208,"children":10209},{"style":415},[10210],{"type":51,"value":10211}," lower",{"type":42,"tag":391,"props":10213,"children":10214},{"style":409},[10215],{"type":51,"value":7143},{"type":42,"tag":391,"props":10217,"children":10218},{"style":415},[10219],{"type":51,"value":9790},{"type":42,"tag":391,"props":10221,"children":10222},{"style":409},[10223],{"type":51,"value":247},{"type":42,"tag":391,"props":10225,"children":10226},{"style":415},[10227],{"type":51,"value":7048},{"type":42,"tag":391,"props":10229,"children":10230},{"style":409},[10231],{"type":51,"value":7672},{"type":42,"tag":391,"props":10233,"children":10234},{"style":515},[10235],{"type":51,"value":7677},{"type":42,"tag":391,"props":10237,"children":10238},{"style":415},[10239],{"type":51,"value":10211},{"type":42,"tag":391,"props":10241,"children":10242},{"style":409},[10243],{"type":51,"value":7143},{"type":42,"tag":391,"props":10245,"children":10246},{"style":415},[10247],{"type":51,"value":9807},{"type":42,"tag":391,"props":10249,"children":10250},{"style":409},[10251],{"type":51,"value":247},{"type":42,"tag":391,"props":10253,"children":10254},{"style":415},[10255],{"type":51,"value":7048},{"type":42,"tag":391,"props":10257,"children":10258},{"style":409},[10259],{"type":51,"value":7700},{"type":42,"tag":391,"props":10261,"children":10262},{"class":393,"line":7202},[10263,10267,10272,10276,10280,10284,10288,10292,10296,10300,10304,10308],{"type":42,"tag":391,"props":10264,"children":10265},{"style":515},[10266],{"type":51,"value":8528},{"type":42,"tag":391,"props":10268,"children":10269},{"style":415},[10270],{"type":51,"value":10271}," COALESCE",{"type":42,"tag":391,"props":10273,"children":10274},{"style":409},[10275],{"type":51,"value":7143},{"type":42,"tag":391,"props":10277,"children":10278},{"style":415},[10279],{"type":51,"value":9790},{"type":42,"tag":391,"props":10281,"children":10282},{"style":409},[10283],{"type":51,"value":247},{"type":42,"tag":391,"props":10285,"children":10286},{"style":415},[10287],{"type":51,"value":7048},{"type":42,"tag":391,"props":10289,"children":10290},{"style":409},[10291],{"type":51,"value":292},{"type":42,"tag":391,"props":10293,"children":10294},{"style":415},[10295],{"type":51,"value":9807},{"type":42,"tag":391,"props":10297,"children":10298},{"style":409},[10299],{"type":51,"value":247},{"type":42,"tag":391,"props":10301,"children":10302},{"style":415},[10303],{"type":51,"value":7048},{"type":42,"tag":391,"props":10305,"children":10306},{"style":409},[10307],{"type":51,"value":7672},{"type":42,"tag":391,"props":10309,"children":10310},{"style":515},[10311],{"type":51,"value":10312},"IS NOT NULL\n",{"type":42,"tag":43,"props":10314,"children":10315},{},[10316,10317,10322,10324,10329],{"type":51,"value":9498},{"type":42,"tag":240,"props":10318,"children":10320},{"className":10319},[],[10321],{"type":51,"value":9550},{"type":51,"value":10323}," catches customers who only exist in one system. ",{"type":42,"tag":240,"props":10325,"children":10327},{"className":10326},[],[10328],{"type":51,"value":9536},{"type":51,"value":10330}," gives priority to Shopify's email since it's the primary ecommerce platform.",{"type":42,"tag":361,"props":10332,"children":10334},{"id":10333},"_3-staged-products-stg_productssql",[10335,10337],{"type":51,"value":10336},"3) Staged products - ",{"type":42,"tag":240,"props":10338,"children":10340},{"className":10339},[],[10341],{"type":51,"value":10342},"stg_products.sql",{"type":42,"tag":43,"props":10344,"children":10345},{},[10346,10348,10354,10355,10360],{"type":51,"value":10347},"A clean product catalog. This query uses only standard SQL (",{"type":42,"tag":240,"props":10349,"children":10351},{"className":10350},[],[10352],{"type":51,"value":10353},"CAST",{"type":51,"value":292},{"type":42,"tag":240,"props":10356,"children":10358},{"className":10357},[],[10359],{"type":51,"value":8528},{"type":51,"value":10361},"), so it works identically on every warehouse.",{"type":42,"tag":339,"props":10363,"children":10365},{"type":10364},"info",[10366],{"type":42,"tag":43,"props":10367,"children":10368},{},[10369,10371,10376,10378,10383,10385,10390],{"type":51,"value":10370},"Shopify product IDs are in GID format (e.g. ",{"type":42,"tag":240,"props":10372,"children":10374},{"className":10373},[],[10375],{"type":51,"value":6590},{"type":51,"value":10377},"). Depending on how your Shopify data lands in the warehouse, the raw ",{"type":42,"tag":240,"props":10379,"children":10381},{"className":10380},[],[10382],{"type":51,"value":6999},{"type":51,"value":10384}," column may need parsing with ",{"type":42,"tag":240,"props":10386,"children":10388},{"className":10387},[],[10389],{"type":51,"value":6598},{"type":51,"value":10391}," to extract the numeric ID.",{"type":42,"tag":43,"props":10393,"children":10394},{},[10395,10396,10405],{"type":51,"value":6741},{"type":42,"tag":47,"props":10397,"children":10398},{},[10399],{"type":42,"tag":240,"props":10400,"children":10402},{"className":10401},[],[10403],{"type":51,"value":10404},"ecommerce\u002Fassets\u002Fstaging\u002Fstg_products.sql",{"type":51,"value":6752},{"type":42,"tag":381,"props":10407,"children":10409},{"className":6761,"code":10408,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_products\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.shopify_products\ncolumns:\n  - name: product_id\n    type: varchar\n    checks:\n      - name: not_null\n      - name: unique\n@bruin *\u002F\n\nSELECT\n    id AS product_id,\n    title AS product_name,\n    product_type AS category,\n    vendor,\n    status AS product_status,\n    CAST(price AS DECIMAL(12,2)) AS price,  -- column name depends on how your Shopify data is structured; ask Claude Code to check raw.shopify_products\n    tags,\n    created_at,\n    updated_at\nFROM raw.shopify_products\nWHERE status = 'active'\n",[10410],{"type":42,"tag":240,"props":10411,"children":10412},{"__ignoreMap":7},[10413,10420,10428,10435,10442,10449,10456,10464,10471,10479,10486,10493,10500,10507,10514,10521,10528,10545,10562,10579,10587,10604,10658,10666,10674,10682,10702],{"type":42,"tag":391,"props":10414,"children":10415},{"class":393,"line":176},[10416],{"type":42,"tag":391,"props":10417,"children":10418},{"style":6773},[10419],{"type":51,"value":6776},{"type":42,"tag":391,"props":10421,"children":10422},{"class":393,"line":99},[10423],{"type":42,"tag":391,"props":10424,"children":10425},{"style":6773},[10426],{"type":51,"value":10427},"name: staging.stg_products\n",{"type":42,"tag":391,"props":10429,"children":10430},{"class":393,"line":439},[10431],{"type":42,"tag":391,"props":10432,"children":10433},{"style":6773},[10434],{"type":51,"value":6792},{"type":42,"tag":391,"props":10436,"children":10437},{"class":393,"line":947},[10438],{"type":42,"tag":391,"props":10439,"children":10440},{"style":6773},[10441],{"type":51,"value":6800},{"type":42,"tag":391,"props":10443,"children":10444},{"class":393,"line":960},[10445],{"type":42,"tag":391,"props":10446,"children":10447},{"style":6773},[10448],{"type":51,"value":6808},{"type":42,"tag":391,"props":10450,"children":10451},{"class":393,"line":984},[10452],{"type":42,"tag":391,"props":10453,"children":10454},{"style":6773},[10455],{"type":51,"value":6816},{"type":42,"tag":391,"props":10457,"children":10458},{"class":393,"line":1002},[10459],{"type":42,"tag":391,"props":10460,"children":10461},{"style":6773},[10462],{"type":51,"value":10463},"  - raw.shopify_products\n",{"type":42,"tag":391,"props":10465,"children":10466},{"class":393,"line":165},[10467],{"type":42,"tag":391,"props":10468,"children":10469},{"style":6773},[10470],{"type":51,"value":6840},{"type":42,"tag":391,"props":10472,"children":10473},{"class":393,"line":2235},[10474],{"type":42,"tag":391,"props":10475,"children":10476},{"style":6773},[10477],{"type":51,"value":10478},"  - name: product_id\n",{"type":42,"tag":391,"props":10480,"children":10481},{"class":393,"line":6843},[10482],{"type":42,"tag":391,"props":10483,"children":10484},{"style":6773},[10485],{"type":51,"value":6858},{"type":42,"tag":391,"props":10487,"children":10488},{"class":393,"line":6852},[10489],{"type":42,"tag":391,"props":10490,"children":10491},{"style":6773},[10492],{"type":51,"value":6867},{"type":42,"tag":391,"props":10494,"children":10495},{"class":393,"line":6861},[10496],{"type":42,"tag":391,"props":10497,"children":10498},{"style":6773},[10499],{"type":51,"value":6876},{"type":42,"tag":391,"props":10501,"children":10502},{"class":393,"line":6870},[10503],{"type":42,"tag":391,"props":10504,"children":10505},{"style":6773},[10506],{"type":51,"value":6885},{"type":42,"tag":391,"props":10508,"children":10509},{"class":393,"line":6879},[10510],{"type":42,"tag":391,"props":10511,"children":10512},{"style":6773},[10513],{"type":51,"value":6963},{"type":42,"tag":391,"props":10515,"children":10516},{"class":393,"line":1707},[10517],{"type":42,"tag":391,"props":10518,"children":10519},{"emptyLinePlaceholder":13},[10520],{"type":51,"value":6972},{"type":42,"tag":391,"props":10522,"children":10523},{"class":393,"line":6896},[10524],{"type":42,"tag":391,"props":10525,"children":10526},{"style":515},[10527],{"type":51,"value":6981},{"type":42,"tag":391,"props":10529,"children":10530},{"class":393,"line":6905},[10531,10536,10540],{"type":42,"tag":391,"props":10532,"children":10533},{"style":409},[10534],{"type":51,"value":10535},"    id ",{"type":42,"tag":391,"props":10537,"children":10538},{"style":515},[10539],{"type":51,"value":7194},{"type":42,"tag":391,"props":10541,"children":10542},{"style":409},[10543],{"type":51,"value":10544}," product_id,\n",{"type":42,"tag":391,"props":10546,"children":10547},{"class":393,"line":6913},[10548,10553,10557],{"type":42,"tag":391,"props":10549,"children":10550},{"style":409},[10551],{"type":51,"value":10552},"    title ",{"type":42,"tag":391,"props":10554,"children":10555},{"style":515},[10556],{"type":51,"value":7194},{"type":42,"tag":391,"props":10558,"children":10559},{"style":409},[10560],{"type":51,"value":10561}," product_name,\n",{"type":42,"tag":391,"props":10563,"children":10564},{"class":393,"line":6921},[10565,10570,10574],{"type":42,"tag":391,"props":10566,"children":10567},{"style":409},[10568],{"type":51,"value":10569},"    product_type ",{"type":42,"tag":391,"props":10571,"children":10572},{"style":515},[10573],{"type":51,"value":7194},{"type":42,"tag":391,"props":10575,"children":10576},{"style":409},[10577],{"type":51,"value":10578}," category,\n",{"type":42,"tag":391,"props":10580,"children":10581},{"class":393,"line":6930},[10582],{"type":42,"tag":391,"props":10583,"children":10584},{"style":409},[10585],{"type":51,"value":10586},"    vendor,\n",{"type":42,"tag":391,"props":10588,"children":10589},{"class":393,"line":6939},[10590,10595,10599],{"type":42,"tag":391,"props":10591,"children":10592},{"style":515},[10593],{"type":51,"value":10594},"    status",{"type":42,"tag":391,"props":10596,"children":10597},{"style":515},[10598],{"type":51,"value":7004},{"type":42,"tag":391,"props":10600,"children":10601},{"style":409},[10602],{"type":51,"value":10603}," product_status,\n",{"type":42,"tag":391,"props":10605,"children":10606},{"class":393,"line":6948},[10607,10611,10616,10620,10624,10628,10632,10636,10640,10644,10648,10653],{"type":42,"tag":391,"props":10608,"children":10609},{"style":415},[10610],{"type":51,"value":7138},{"type":42,"tag":391,"props":10612,"children":10613},{"style":409},[10614],{"type":51,"value":10615},"(price ",{"type":42,"tag":391,"props":10617,"children":10618},{"style":515},[10619],{"type":51,"value":7194},{"type":42,"tag":391,"props":10621,"children":10622},{"style":515},[10623],{"type":51,"value":7165},{"type":42,"tag":391,"props":10625,"children":10626},{"style":409},[10627],{"type":51,"value":7143},{"type":42,"tag":391,"props":10629,"children":10630},{"style":415},[10631],{"type":51,"value":7174},{"type":42,"tag":391,"props":10633,"children":10634},{"style":409},[10635],{"type":51,"value":7179},{"type":42,"tag":391,"props":10637,"children":10638},{"style":415},[10639],{"type":51,"value":7184},{"type":42,"tag":391,"props":10641,"children":10642},{"style":409},[10643],{"type":51,"value":7189},{"type":42,"tag":391,"props":10645,"children":10646},{"style":515},[10647],{"type":51,"value":7194},{"type":42,"tag":391,"props":10649,"children":10650},{"style":409},[10651],{"type":51,"value":10652}," price,  ",{"type":42,"tag":391,"props":10654,"children":10655},{"style":6773},[10656],{"type":51,"value":10657},"-- column name depends on how your Shopify data is structured; ask Claude Code to check raw.shopify_products\n",{"type":42,"tag":391,"props":10659,"children":10660},{"class":393,"line":6957},[10661],{"type":42,"tag":391,"props":10662,"children":10663},{"style":409},[10664],{"type":51,"value":10665},"    tags,\n",{"type":42,"tag":391,"props":10667,"children":10668},{"class":393,"line":6966},[10669],{"type":42,"tag":391,"props":10670,"children":10671},{"style":409},[10672],{"type":51,"value":10673},"    created_at,\n",{"type":42,"tag":391,"props":10675,"children":10676},{"class":393,"line":6975},[10677],{"type":42,"tag":391,"props":10678,"children":10679},{"style":409},[10680],{"type":51,"value":10681},"    updated_at\n",{"type":42,"tag":391,"props":10683,"children":10684},{"class":393,"line":6984},[10685,10689,10693,10697],{"type":42,"tag":391,"props":10686,"children":10687},{"style":515},[10688],{"type":51,"value":7555},{"type":42,"tag":391,"props":10690,"children":10691},{"style":415},[10692],{"type":51,"value":7560},{"type":42,"tag":391,"props":10694,"children":10695},{"style":409},[10696],{"type":51,"value":247},{"type":42,"tag":391,"props":10698,"children":10699},{"style":415},[10700],{"type":51,"value":10701},"shopify_products\n",{"type":42,"tag":391,"props":10703,"children":10704},{"class":393,"line":7012},[10705,10709,10714,10718],{"type":42,"tag":391,"props":10706,"children":10707},{"style":515},[10708],{"type":51,"value":8528},{"type":42,"tag":391,"props":10710,"children":10711},{"style":515},[10712],{"type":51,"value":10713}," status",{"type":42,"tag":391,"props":10715,"children":10716},{"style":515},[10717],{"type":51,"value":7627},{"type":42,"tag":391,"props":10719,"children":10720},{"style":403},[10721],{"type":51,"value":10722}," 'active'\n",{"type":42,"tag":361,"props":10724,"children":10726},{"id":10725},"_4-staged-marketing-spend-stg_marketing_spendsql",[10727,10729],{"type":51,"value":10728},"4) Staged marketing spend - ",{"type":42,"tag":240,"props":10730,"children":10732},{"className":10731},[],[10733],{"type":51,"value":10734},"stg_marketing_spend.sql",{"type":42,"tag":43,"props":10736,"children":10737},{},[10738],{"type":51,"value":10739},"A unified marketing performance table that combines your ad platform and email marketing data into a common format. This query varies by warehouse (date functions), by marketing tool (email side), and by ads platform (ads side).",{"type":42,"tag":43,"props":10741,"children":10742},{},[10743,10744,10753],{"type":51,"value":6741},{"type":42,"tag":47,"props":10745,"children":10746},{},[10747],{"type":42,"tag":240,"props":10748,"children":10750},{"className":10749},[],[10751],{"type":51,"value":10752},"ecommerce\u002Fassets\u002Fstaging\u002Fstg_marketing_spend.sql",{"type":51,"value":6752},{"type":42,"tag":43,"props":10755,"children":10756},{},[10757,10759,10765,10767,10773,10774,10780],{"type":51,"value":10758},"The ads portion of this query depends on which ad platform you connected in Step 2. Each platform uses its own table name and date column, so select the tab that matches your ad platform. The date casting also differs by warehouse - adjust the ",{"type":42,"tag":240,"props":10760,"children":10762},{"className":10761},[],[10763],{"type":51,"value":10764},"toDate()",{"type":51,"value":10766}," \u002F ",{"type":42,"tag":240,"props":10768,"children":10770},{"className":10769},[],[10771],{"type":51,"value":10772},"DATE()",{"type":51,"value":10766},{"type":42,"tag":240,"props":10775,"children":10777},{"className":10776},[],[10778],{"type":51,"value":10779},"::DATE",{"type":51,"value":10781}," wrapper to match yours (see the warehouse tabs in the web sessions section below for examples).",{"type":42,"tag":2058,"props":10783,"children":10785},{"id":10784},"ads-portion",[10786],{"type":51,"value":10787},"Ads portion",{"type":42,"tag":563,"props":10789,"children":10790},{":variants":4325,"group":4326},[10791,11139,11478],{"type":42,"tag":569,"props":10792,"children":10793},{"v-slot:facebook-ads":7},[10794],{"type":42,"tag":381,"props":10795,"children":10797},{"className":6761,"code":10796,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_marketing_spend\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.facebook_ad_insights\ncolumns:\n  - name: spend_date\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\n-- Facebook Ads spend\nSELECT\n    DATE(date_start) AS spend_date,       -- use toDate() for ClickHouse, ::DATE for Snowflake\n    'paid_ads' AS channel,\n    campaign_name,\n    CAST(spend AS DECIMAL(12,2)) AS spend,\n    CAST(impressions AS INTEGER) AS impressions,\n    CAST(clicks AS INTEGER) AS clicks,\n    CAST(conversions AS INTEGER) AS conversions\nFROM raw.facebook_ad_insights\n",[10798],{"type":42,"tag":240,"props":10799,"children":10800},{"__ignoreMap":7},[10801,10808,10816,10823,10830,10837,10844,10852,10859,10867,10875,10882,10889,10896,10903,10911,10918,10945,10962,10970,11019,11053,11086,11119],{"type":42,"tag":391,"props":10802,"children":10803},{"class":393,"line":176},[10804],{"type":42,"tag":391,"props":10805,"children":10806},{"style":6773},[10807],{"type":51,"value":6776},{"type":42,"tag":391,"props":10809,"children":10810},{"class":393,"line":99},[10811],{"type":42,"tag":391,"props":10812,"children":10813},{"style":6773},[10814],{"type":51,"value":10815},"name: staging.stg_marketing_spend\n",{"type":42,"tag":391,"props":10817,"children":10818},{"class":393,"line":439},[10819],{"type":42,"tag":391,"props":10820,"children":10821},{"style":6773},[10822],{"type":51,"value":6792},{"type":42,"tag":391,"props":10824,"children":10825},{"class":393,"line":947},[10826],{"type":42,"tag":391,"props":10827,"children":10828},{"style":6773},[10829],{"type":51,"value":6800},{"type":42,"tag":391,"props":10831,"children":10832},{"class":393,"line":960},[10833],{"type":42,"tag":391,"props":10834,"children":10835},{"style":6773},[10836],{"type":51,"value":6808},{"type":42,"tag":391,"props":10838,"children":10839},{"class":393,"line":984},[10840],{"type":42,"tag":391,"props":10841,"children":10842},{"style":6773},[10843],{"type":51,"value":6816},{"type":42,"tag":391,"props":10845,"children":10846},{"class":393,"line":1002},[10847],{"type":42,"tag":391,"props":10848,"children":10849},{"style":6773},[10850],{"type":51,"value":10851},"  - raw.facebook_ad_insights\n",{"type":42,"tag":391,"props":10853,"children":10854},{"class":393,"line":165},[10855],{"type":42,"tag":391,"props":10856,"children":10857},{"style":6773},[10858],{"type":51,"value":6840},{"type":42,"tag":391,"props":10860,"children":10861},{"class":393,"line":2235},[10862],{"type":42,"tag":391,"props":10863,"children":10864},{"style":6773},[10865],{"type":51,"value":10866},"  - name: spend_date\n",{"type":42,"tag":391,"props":10868,"children":10869},{"class":393,"line":6843},[10870],{"type":42,"tag":391,"props":10871,"children":10872},{"style":6773},[10873],{"type":51,"value":10874},"    type: date\n",{"type":42,"tag":391,"props":10876,"children":10877},{"class":393,"line":6852},[10878],{"type":42,"tag":391,"props":10879,"children":10880},{"style":6773},[10881],{"type":51,"value":6867},{"type":42,"tag":391,"props":10883,"children":10884},{"class":393,"line":6861},[10885],{"type":42,"tag":391,"props":10886,"children":10887},{"style":6773},[10888],{"type":51,"value":6876},{"type":42,"tag":391,"props":10890,"children":10891},{"class":393,"line":6870},[10892],{"type":42,"tag":391,"props":10893,"children":10894},{"style":6773},[10895],{"type":51,"value":6963},{"type":42,"tag":391,"props":10897,"children":10898},{"class":393,"line":6879},[10899],{"type":42,"tag":391,"props":10900,"children":10901},{"emptyLinePlaceholder":13},[10902],{"type":51,"value":6972},{"type":42,"tag":391,"props":10904,"children":10905},{"class":393,"line":1707},[10906],{"type":42,"tag":391,"props":10907,"children":10908},{"style":6773},[10909],{"type":51,"value":10910},"-- Facebook Ads spend\n",{"type":42,"tag":391,"props":10912,"children":10913},{"class":393,"line":6896},[10914],{"type":42,"tag":391,"props":10915,"children":10916},{"style":515},[10917],{"type":51,"value":6981},{"type":42,"tag":391,"props":10919,"children":10920},{"class":393,"line":6905},[10921,10926,10931,10935,10940],{"type":42,"tag":391,"props":10922,"children":10923},{"style":515},[10924],{"type":51,"value":10925},"    DATE",{"type":42,"tag":391,"props":10927,"children":10928},{"style":409},[10929],{"type":51,"value":10930},"(date_start) ",{"type":42,"tag":391,"props":10932,"children":10933},{"style":515},[10934],{"type":51,"value":7194},{"type":42,"tag":391,"props":10936,"children":10937},{"style":409},[10938],{"type":51,"value":10939}," spend_date,       ",{"type":42,"tag":391,"props":10941,"children":10942},{"style":6773},[10943],{"type":51,"value":10944},"-- use toDate() for ClickHouse, ::DATE for Snowflake\n",{"type":42,"tag":391,"props":10946,"children":10947},{"class":393,"line":6913},[10948,10953,10957],{"type":42,"tag":391,"props":10949,"children":10950},{"style":403},[10951],{"type":51,"value":10952},"    'paid_ads'",{"type":42,"tag":391,"props":10954,"children":10955},{"style":515},[10956],{"type":51,"value":7004},{"type":42,"tag":391,"props":10958,"children":10959},{"style":409},[10960],{"type":51,"value":10961}," channel,\n",{"type":42,"tag":391,"props":10963,"children":10964},{"class":393,"line":6921},[10965],{"type":42,"tag":391,"props":10966,"children":10967},{"style":409},[10968],{"type":51,"value":10969},"    campaign_name,\n",{"type":42,"tag":391,"props":10971,"children":10972},{"class":393,"line":6930},[10973,10977,10982,10986,10990,10994,10998,11002,11006,11010,11014],{"type":42,"tag":391,"props":10974,"children":10975},{"style":415},[10976],{"type":51,"value":7138},{"type":42,"tag":391,"props":10978,"children":10979},{"style":409},[10980],{"type":51,"value":10981},"(spend ",{"type":42,"tag":391,"props":10983,"children":10984},{"style":515},[10985],{"type":51,"value":7194},{"type":42,"tag":391,"props":10987,"children":10988},{"style":515},[10989],{"type":51,"value":7165},{"type":42,"tag":391,"props":10991,"children":10992},{"style":409},[10993],{"type":51,"value":7143},{"type":42,"tag":391,"props":10995,"children":10996},{"style":415},[10997],{"type":51,"value":7174},{"type":42,"tag":391,"props":10999,"children":11000},{"style":409},[11001],{"type":51,"value":7179},{"type":42,"tag":391,"props":11003,"children":11004},{"style":415},[11005],{"type":51,"value":7184},{"type":42,"tag":391,"props":11007,"children":11008},{"style":409},[11009],{"type":51,"value":7189},{"type":42,"tag":391,"props":11011,"children":11012},{"style":515},[11013],{"type":51,"value":7194},{"type":42,"tag":391,"props":11015,"children":11016},{"style":409},[11017],{"type":51,"value":11018}," spend,\n",{"type":42,"tag":391,"props":11020,"children":11021},{"class":393,"line":6939},[11022,11026,11031,11035,11040,11044,11048],{"type":42,"tag":391,"props":11023,"children":11024},{"style":415},[11025],{"type":51,"value":7138},{"type":42,"tag":391,"props":11027,"children":11028},{"style":409},[11029],{"type":51,"value":11030},"(impressions ",{"type":42,"tag":391,"props":11032,"children":11033},{"style":515},[11034],{"type":51,"value":7194},{"type":42,"tag":391,"props":11036,"children":11037},{"style":515},[11038],{"type":51,"value":11039}," INTEGER",{"type":42,"tag":391,"props":11041,"children":11042},{"style":409},[11043],{"type":51,"value":7672},{"type":42,"tag":391,"props":11045,"children":11046},{"style":515},[11047],{"type":51,"value":7194},{"type":42,"tag":391,"props":11049,"children":11050},{"style":409},[11051],{"type":51,"value":11052}," impressions,\n",{"type":42,"tag":391,"props":11054,"children":11055},{"class":393,"line":6948},[11056,11060,11065,11069,11073,11077,11081],{"type":42,"tag":391,"props":11057,"children":11058},{"style":415},[11059],{"type":51,"value":7138},{"type":42,"tag":391,"props":11061,"children":11062},{"style":409},[11063],{"type":51,"value":11064},"(clicks ",{"type":42,"tag":391,"props":11066,"children":11067},{"style":515},[11068],{"type":51,"value":7194},{"type":42,"tag":391,"props":11070,"children":11071},{"style":515},[11072],{"type":51,"value":11039},{"type":42,"tag":391,"props":11074,"children":11075},{"style":409},[11076],{"type":51,"value":7672},{"type":42,"tag":391,"props":11078,"children":11079},{"style":515},[11080],{"type":51,"value":7194},{"type":42,"tag":391,"props":11082,"children":11083},{"style":409},[11084],{"type":51,"value":11085}," clicks,\n",{"type":42,"tag":391,"props":11087,"children":11088},{"class":393,"line":6957},[11089,11093,11098,11102,11106,11110,11114],{"type":42,"tag":391,"props":11090,"children":11091},{"style":415},[11092],{"type":51,"value":7138},{"type":42,"tag":391,"props":11094,"children":11095},{"style":409},[11096],{"type":51,"value":11097},"(conversions ",{"type":42,"tag":391,"props":11099,"children":11100},{"style":515},[11101],{"type":51,"value":7194},{"type":42,"tag":391,"props":11103,"children":11104},{"style":515},[11105],{"type":51,"value":11039},{"type":42,"tag":391,"props":11107,"children":11108},{"style":409},[11109],{"type":51,"value":7672},{"type":42,"tag":391,"props":11111,"children":11112},{"style":515},[11113],{"type":51,"value":7194},{"type":42,"tag":391,"props":11115,"children":11116},{"style":409},[11117],{"type":51,"value":11118}," conversions\n",{"type":42,"tag":391,"props":11120,"children":11121},{"class":393,"line":6966},[11122,11126,11130,11134],{"type":42,"tag":391,"props":11123,"children":11124},{"style":515},[11125],{"type":51,"value":7555},{"type":42,"tag":391,"props":11127,"children":11128},{"style":415},[11129],{"type":51,"value":7560},{"type":42,"tag":391,"props":11131,"children":11132},{"style":409},[11133],{"type":51,"value":247},{"type":42,"tag":391,"props":11135,"children":11136},{"style":415},[11137],{"type":51,"value":11138},"facebook_ad_insights\n",{"type":42,"tag":569,"props":11140,"children":11141},{"v-slot:google-ads":7},[11142],{"type":42,"tag":381,"props":11143,"children":11145},{"className":6761,"code":11144,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_marketing_spend\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.google_ad_insights\ncolumns:\n  - name: spend_date\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\n-- Google Ads spend\nSELECT\n    DATE(date) AS spend_date,             -- use toDate() for ClickHouse, ::DATE for Snowflake\n    'paid_ads' AS channel,\n    campaign_name,\n    CAST(spend AS DECIMAL(12,2)) AS spend,\n    CAST(impressions AS INTEGER) AS impressions,\n    CAST(clicks AS INTEGER) AS clicks,\n    CAST(conversions AS INTEGER) AS conversions\nFROM raw.google_ad_insights\n",[11146],{"type":42,"tag":240,"props":11147,"children":11148},{"__ignoreMap":7},[11149,11156,11163,11170,11177,11184,11191,11199,11206,11213,11220,11227,11234,11241,11248,11256,11263,11296,11311,11318,11365,11396,11427,11458],{"type":42,"tag":391,"props":11150,"children":11151},{"class":393,"line":176},[11152],{"type":42,"tag":391,"props":11153,"children":11154},{"style":6773},[11155],{"type":51,"value":6776},{"type":42,"tag":391,"props":11157,"children":11158},{"class":393,"line":99},[11159],{"type":42,"tag":391,"props":11160,"children":11161},{"style":6773},[11162],{"type":51,"value":10815},{"type":42,"tag":391,"props":11164,"children":11165},{"class":393,"line":439},[11166],{"type":42,"tag":391,"props":11167,"children":11168},{"style":6773},[11169],{"type":51,"value":6792},{"type":42,"tag":391,"props":11171,"children":11172},{"class":393,"line":947},[11173],{"type":42,"tag":391,"props":11174,"children":11175},{"style":6773},[11176],{"type":51,"value":6800},{"type":42,"tag":391,"props":11178,"children":11179},{"class":393,"line":960},[11180],{"type":42,"tag":391,"props":11181,"children":11182},{"style":6773},[11183],{"type":51,"value":6808},{"type":42,"tag":391,"props":11185,"children":11186},{"class":393,"line":984},[11187],{"type":42,"tag":391,"props":11188,"children":11189},{"style":6773},[11190],{"type":51,"value":6816},{"type":42,"tag":391,"props":11192,"children":11193},{"class":393,"line":1002},[11194],{"type":42,"tag":391,"props":11195,"children":11196},{"style":6773},[11197],{"type":51,"value":11198},"  - raw.google_ad_insights\n",{"type":42,"tag":391,"props":11200,"children":11201},{"class":393,"line":165},[11202],{"type":42,"tag":391,"props":11203,"children":11204},{"style":6773},[11205],{"type":51,"value":6840},{"type":42,"tag":391,"props":11207,"children":11208},{"class":393,"line":2235},[11209],{"type":42,"tag":391,"props":11210,"children":11211},{"style":6773},[11212],{"type":51,"value":10866},{"type":42,"tag":391,"props":11214,"children":11215},{"class":393,"line":6843},[11216],{"type":42,"tag":391,"props":11217,"children":11218},{"style":6773},[11219],{"type":51,"value":10874},{"type":42,"tag":391,"props":11221,"children":11222},{"class":393,"line":6852},[11223],{"type":42,"tag":391,"props":11224,"children":11225},{"style":6773},[11226],{"type":51,"value":6867},{"type":42,"tag":391,"props":11228,"children":11229},{"class":393,"line":6861},[11230],{"type":42,"tag":391,"props":11231,"children":11232},{"style":6773},[11233],{"type":51,"value":6876},{"type":42,"tag":391,"props":11235,"children":11236},{"class":393,"line":6870},[11237],{"type":42,"tag":391,"props":11238,"children":11239},{"style":6773},[11240],{"type":51,"value":6963},{"type":42,"tag":391,"props":11242,"children":11243},{"class":393,"line":6879},[11244],{"type":42,"tag":391,"props":11245,"children":11246},{"emptyLinePlaceholder":13},[11247],{"type":51,"value":6972},{"type":42,"tag":391,"props":11249,"children":11250},{"class":393,"line":1707},[11251],{"type":42,"tag":391,"props":11252,"children":11253},{"style":6773},[11254],{"type":51,"value":11255},"-- Google Ads spend\n",{"type":42,"tag":391,"props":11257,"children":11258},{"class":393,"line":6896},[11259],{"type":42,"tag":391,"props":11260,"children":11261},{"style":515},[11262],{"type":51,"value":6981},{"type":42,"tag":391,"props":11264,"children":11265},{"class":393,"line":6905},[11266,11270,11274,11279,11283,11287,11292],{"type":42,"tag":391,"props":11267,"children":11268},{"style":515},[11269],{"type":51,"value":10925},{"type":42,"tag":391,"props":11271,"children":11272},{"style":409},[11273],{"type":51,"value":7143},{"type":42,"tag":391,"props":11275,"children":11276},{"style":515},[11277],{"type":51,"value":11278},"date",{"type":42,"tag":391,"props":11280,"children":11281},{"style":409},[11282],{"type":51,"value":7672},{"type":42,"tag":391,"props":11284,"children":11285},{"style":515},[11286],{"type":51,"value":7194},{"type":42,"tag":391,"props":11288,"children":11289},{"style":409},[11290],{"type":51,"value":11291}," spend_date,             ",{"type":42,"tag":391,"props":11293,"children":11294},{"style":6773},[11295],{"type":51,"value":10944},{"type":42,"tag":391,"props":11297,"children":11298},{"class":393,"line":6913},[11299,11303,11307],{"type":42,"tag":391,"props":11300,"children":11301},{"style":403},[11302],{"type":51,"value":10952},{"type":42,"tag":391,"props":11304,"children":11305},{"style":515},[11306],{"type":51,"value":7004},{"type":42,"tag":391,"props":11308,"children":11309},{"style":409},[11310],{"type":51,"value":10961},{"type":42,"tag":391,"props":11312,"children":11313},{"class":393,"line":6921},[11314],{"type":42,"tag":391,"props":11315,"children":11316},{"style":409},[11317],{"type":51,"value":10969},{"type":42,"tag":391,"props":11319,"children":11320},{"class":393,"line":6930},[11321,11325,11329,11333,11337,11341,11345,11349,11353,11357,11361],{"type":42,"tag":391,"props":11322,"children":11323},{"style":415},[11324],{"type":51,"value":7138},{"type":42,"tag":391,"props":11326,"children":11327},{"style":409},[11328],{"type":51,"value":10981},{"type":42,"tag":391,"props":11330,"children":11331},{"style":515},[11332],{"type":51,"value":7194},{"type":42,"tag":391,"props":11334,"children":11335},{"style":515},[11336],{"type":51,"value":7165},{"type":42,"tag":391,"props":11338,"children":11339},{"style":409},[11340],{"type":51,"value":7143},{"type":42,"tag":391,"props":11342,"children":11343},{"style":415},[11344],{"type":51,"value":7174},{"type":42,"tag":391,"props":11346,"children":11347},{"style":409},[11348],{"type":51,"value":7179},{"type":42,"tag":391,"props":11350,"children":11351},{"style":415},[11352],{"type":51,"value":7184},{"type":42,"tag":391,"props":11354,"children":11355},{"style":409},[11356],{"type":51,"value":7189},{"type":42,"tag":391,"props":11358,"children":11359},{"style":515},[11360],{"type":51,"value":7194},{"type":42,"tag":391,"props":11362,"children":11363},{"style":409},[11364],{"type":51,"value":11018},{"type":42,"tag":391,"props":11366,"children":11367},{"class":393,"line":6939},[11368,11372,11376,11380,11384,11388,11392],{"type":42,"tag":391,"props":11369,"children":11370},{"style":415},[11371],{"type":51,"value":7138},{"type":42,"tag":391,"props":11373,"children":11374},{"style":409},[11375],{"type":51,"value":11030},{"type":42,"tag":391,"props":11377,"children":11378},{"style":515},[11379],{"type":51,"value":7194},{"type":42,"tag":391,"props":11381,"children":11382},{"style":515},[11383],{"type":51,"value":11039},{"type":42,"tag":391,"props":11385,"children":11386},{"style":409},[11387],{"type":51,"value":7672},{"type":42,"tag":391,"props":11389,"children":11390},{"style":515},[11391],{"type":51,"value":7194},{"type":42,"tag":391,"props":11393,"children":11394},{"style":409},[11395],{"type":51,"value":11052},{"type":42,"tag":391,"props":11397,"children":11398},{"class":393,"line":6948},[11399,11403,11407,11411,11415,11419,11423],{"type":42,"tag":391,"props":11400,"children":11401},{"style":415},[11402],{"type":51,"value":7138},{"type":42,"tag":391,"props":11404,"children":11405},{"style":409},[11406],{"type":51,"value":11064},{"type":42,"tag":391,"props":11408,"children":11409},{"style":515},[11410],{"type":51,"value":7194},{"type":42,"tag":391,"props":11412,"children":11413},{"style":515},[11414],{"type":51,"value":11039},{"type":42,"tag":391,"props":11416,"children":11417},{"style":409},[11418],{"type":51,"value":7672},{"type":42,"tag":391,"props":11420,"children":11421},{"style":515},[11422],{"type":51,"value":7194},{"type":42,"tag":391,"props":11424,"children":11425},{"style":409},[11426],{"type":51,"value":11085},{"type":42,"tag":391,"props":11428,"children":11429},{"class":393,"line":6957},[11430,11434,11438,11442,11446,11450,11454],{"type":42,"tag":391,"props":11431,"children":11432},{"style":415},[11433],{"type":51,"value":7138},{"type":42,"tag":391,"props":11435,"children":11436},{"style":409},[11437],{"type":51,"value":11097},{"type":42,"tag":391,"props":11439,"children":11440},{"style":515},[11441],{"type":51,"value":7194},{"type":42,"tag":391,"props":11443,"children":11444},{"style":515},[11445],{"type":51,"value":11039},{"type":42,"tag":391,"props":11447,"children":11448},{"style":409},[11449],{"type":51,"value":7672},{"type":42,"tag":391,"props":11451,"children":11452},{"style":515},[11453],{"type":51,"value":7194},{"type":42,"tag":391,"props":11455,"children":11456},{"style":409},[11457],{"type":51,"value":11118},{"type":42,"tag":391,"props":11459,"children":11460},{"class":393,"line":6966},[11461,11465,11469,11473],{"type":42,"tag":391,"props":11462,"children":11463},{"style":515},[11464],{"type":51,"value":7555},{"type":42,"tag":391,"props":11466,"children":11467},{"style":415},[11468],{"type":51,"value":7560},{"type":42,"tag":391,"props":11470,"children":11471},{"style":409},[11472],{"type":51,"value":247},{"type":42,"tag":391,"props":11474,"children":11475},{"style":415},[11476],{"type":51,"value":11477},"google_ad_insights\n",{"type":42,"tag":569,"props":11479,"children":11480},{"v-slot:tiktok-ads":7},[11481],{"type":42,"tag":381,"props":11482,"children":11484},{"className":6761,"code":11483,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_marketing_spend\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.tiktok_ad_insights\ncolumns:\n  - name: spend_date\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\n-- TikTok Ads spend\nSELECT\n    DATE(stat_datetime) AS spend_date,    -- use toDate() for ClickHouse, ::DATE for Snowflake\n    'paid_ads' AS channel,\n    campaign_name,\n    CAST(spend AS DECIMAL(12,2)) AS spend,\n    CAST(impressions AS INTEGER) AS impressions,\n    CAST(clicks AS INTEGER) AS clicks,\n    CAST(conversions AS INTEGER) AS conversions\nFROM raw.tiktok_ad_insights\n",[11485],{"type":42,"tag":240,"props":11486,"children":11487},{"__ignoreMap":7},[11488,11495,11502,11509,11516,11523,11530,11538,11545,11552,11559,11566,11573,11580,11587,11595,11602,11627,11642,11649,11696,11727,11758,11789],{"type":42,"tag":391,"props":11489,"children":11490},{"class":393,"line":176},[11491],{"type":42,"tag":391,"props":11492,"children":11493},{"style":6773},[11494],{"type":51,"value":6776},{"type":42,"tag":391,"props":11496,"children":11497},{"class":393,"line":99},[11498],{"type":42,"tag":391,"props":11499,"children":11500},{"style":6773},[11501],{"type":51,"value":10815},{"type":42,"tag":391,"props":11503,"children":11504},{"class":393,"line":439},[11505],{"type":42,"tag":391,"props":11506,"children":11507},{"style":6773},[11508],{"type":51,"value":6792},{"type":42,"tag":391,"props":11510,"children":11511},{"class":393,"line":947},[11512],{"type":42,"tag":391,"props":11513,"children":11514},{"style":6773},[11515],{"type":51,"value":6800},{"type":42,"tag":391,"props":11517,"children":11518},{"class":393,"line":960},[11519],{"type":42,"tag":391,"props":11520,"children":11521},{"style":6773},[11522],{"type":51,"value":6808},{"type":42,"tag":391,"props":11524,"children":11525},{"class":393,"line":984},[11526],{"type":42,"tag":391,"props":11527,"children":11528},{"style":6773},[11529],{"type":51,"value":6816},{"type":42,"tag":391,"props":11531,"children":11532},{"class":393,"line":1002},[11533],{"type":42,"tag":391,"props":11534,"children":11535},{"style":6773},[11536],{"type":51,"value":11537},"  - raw.tiktok_ad_insights\n",{"type":42,"tag":391,"props":11539,"children":11540},{"class":393,"line":165},[11541],{"type":42,"tag":391,"props":11542,"children":11543},{"style":6773},[11544],{"type":51,"value":6840},{"type":42,"tag":391,"props":11546,"children":11547},{"class":393,"line":2235},[11548],{"type":42,"tag":391,"props":11549,"children":11550},{"style":6773},[11551],{"type":51,"value":10866},{"type":42,"tag":391,"props":11553,"children":11554},{"class":393,"line":6843},[11555],{"type":42,"tag":391,"props":11556,"children":11557},{"style":6773},[11558],{"type":51,"value":10874},{"type":42,"tag":391,"props":11560,"children":11561},{"class":393,"line":6852},[11562],{"type":42,"tag":391,"props":11563,"children":11564},{"style":6773},[11565],{"type":51,"value":6867},{"type":42,"tag":391,"props":11567,"children":11568},{"class":393,"line":6861},[11569],{"type":42,"tag":391,"props":11570,"children":11571},{"style":6773},[11572],{"type":51,"value":6876},{"type":42,"tag":391,"props":11574,"children":11575},{"class":393,"line":6870},[11576],{"type":42,"tag":391,"props":11577,"children":11578},{"style":6773},[11579],{"type":51,"value":6963},{"type":42,"tag":391,"props":11581,"children":11582},{"class":393,"line":6879},[11583],{"type":42,"tag":391,"props":11584,"children":11585},{"emptyLinePlaceholder":13},[11586],{"type":51,"value":6972},{"type":42,"tag":391,"props":11588,"children":11589},{"class":393,"line":1707},[11590],{"type":42,"tag":391,"props":11591,"children":11592},{"style":6773},[11593],{"type":51,"value":11594},"-- TikTok Ads spend\n",{"type":42,"tag":391,"props":11596,"children":11597},{"class":393,"line":6896},[11598],{"type":42,"tag":391,"props":11599,"children":11600},{"style":515},[11601],{"type":51,"value":6981},{"type":42,"tag":391,"props":11603,"children":11604},{"class":393,"line":6905},[11605,11609,11614,11618,11623],{"type":42,"tag":391,"props":11606,"children":11607},{"style":515},[11608],{"type":51,"value":10925},{"type":42,"tag":391,"props":11610,"children":11611},{"style":409},[11612],{"type":51,"value":11613},"(stat_datetime) ",{"type":42,"tag":391,"props":11615,"children":11616},{"style":515},[11617],{"type":51,"value":7194},{"type":42,"tag":391,"props":11619,"children":11620},{"style":409},[11621],{"type":51,"value":11622}," spend_date,    ",{"type":42,"tag":391,"props":11624,"children":11625},{"style":6773},[11626],{"type":51,"value":10944},{"type":42,"tag":391,"props":11628,"children":11629},{"class":393,"line":6913},[11630,11634,11638],{"type":42,"tag":391,"props":11631,"children":11632},{"style":403},[11633],{"type":51,"value":10952},{"type":42,"tag":391,"props":11635,"children":11636},{"style":515},[11637],{"type":51,"value":7004},{"type":42,"tag":391,"props":11639,"children":11640},{"style":409},[11641],{"type":51,"value":10961},{"type":42,"tag":391,"props":11643,"children":11644},{"class":393,"line":6921},[11645],{"type":42,"tag":391,"props":11646,"children":11647},{"style":409},[11648],{"type":51,"value":10969},{"type":42,"tag":391,"props":11650,"children":11651},{"class":393,"line":6930},[11652,11656,11660,11664,11668,11672,11676,11680,11684,11688,11692],{"type":42,"tag":391,"props":11653,"children":11654},{"style":415},[11655],{"type":51,"value":7138},{"type":42,"tag":391,"props":11657,"children":11658},{"style":409},[11659],{"type":51,"value":10981},{"type":42,"tag":391,"props":11661,"children":11662},{"style":515},[11663],{"type":51,"value":7194},{"type":42,"tag":391,"props":11665,"children":11666},{"style":515},[11667],{"type":51,"value":7165},{"type":42,"tag":391,"props":11669,"children":11670},{"style":409},[11671],{"type":51,"value":7143},{"type":42,"tag":391,"props":11673,"children":11674},{"style":415},[11675],{"type":51,"value":7174},{"type":42,"tag":391,"props":11677,"children":11678},{"style":409},[11679],{"type":51,"value":7179},{"type":42,"tag":391,"props":11681,"children":11682},{"style":415},[11683],{"type":51,"value":7184},{"type":42,"tag":391,"props":11685,"children":11686},{"style":409},[11687],{"type":51,"value":7189},{"type":42,"tag":391,"props":11689,"children":11690},{"style":515},[11691],{"type":51,"value":7194},{"type":42,"tag":391,"props":11693,"children":11694},{"style":409},[11695],{"type":51,"value":11018},{"type":42,"tag":391,"props":11697,"children":11698},{"class":393,"line":6939},[11699,11703,11707,11711,11715,11719,11723],{"type":42,"tag":391,"props":11700,"children":11701},{"style":415},[11702],{"type":51,"value":7138},{"type":42,"tag":391,"props":11704,"children":11705},{"style":409},[11706],{"type":51,"value":11030},{"type":42,"tag":391,"props":11708,"children":11709},{"style":515},[11710],{"type":51,"value":7194},{"type":42,"tag":391,"props":11712,"children":11713},{"style":515},[11714],{"type":51,"value":11039},{"type":42,"tag":391,"props":11716,"children":11717},{"style":409},[11718],{"type":51,"value":7672},{"type":42,"tag":391,"props":11720,"children":11721},{"style":515},[11722],{"type":51,"value":7194},{"type":42,"tag":391,"props":11724,"children":11725},{"style":409},[11726],{"type":51,"value":11052},{"type":42,"tag":391,"props":11728,"children":11729},{"class":393,"line":6948},[11730,11734,11738,11742,11746,11750,11754],{"type":42,"tag":391,"props":11731,"children":11732},{"style":415},[11733],{"type":51,"value":7138},{"type":42,"tag":391,"props":11735,"children":11736},{"style":409},[11737],{"type":51,"value":11064},{"type":42,"tag":391,"props":11739,"children":11740},{"style":515},[11741],{"type":51,"value":7194},{"type":42,"tag":391,"props":11743,"children":11744},{"style":515},[11745],{"type":51,"value":11039},{"type":42,"tag":391,"props":11747,"children":11748},{"style":409},[11749],{"type":51,"value":7672},{"type":42,"tag":391,"props":11751,"children":11752},{"style":515},[11753],{"type":51,"value":7194},{"type":42,"tag":391,"props":11755,"children":11756},{"style":409},[11757],{"type":51,"value":11085},{"type":42,"tag":391,"props":11759,"children":11760},{"class":393,"line":6957},[11761,11765,11769,11773,11777,11781,11785],{"type":42,"tag":391,"props":11762,"children":11763},{"style":415},[11764],{"type":51,"value":7138},{"type":42,"tag":391,"props":11766,"children":11767},{"style":409},[11768],{"type":51,"value":11097},{"type":42,"tag":391,"props":11770,"children":11771},{"style":515},[11772],{"type":51,"value":7194},{"type":42,"tag":391,"props":11774,"children":11775},{"style":515},[11776],{"type":51,"value":11039},{"type":42,"tag":391,"props":11778,"children":11779},{"style":409},[11780],{"type":51,"value":7672},{"type":42,"tag":391,"props":11782,"children":11783},{"style":515},[11784],{"type":51,"value":7194},{"type":42,"tag":391,"props":11786,"children":11787},{"style":409},[11788],{"type":51,"value":11118},{"type":42,"tag":391,"props":11790,"children":11791},{"class":393,"line":6966},[11792,11796,11800,11804],{"type":42,"tag":391,"props":11793,"children":11794},{"style":515},[11795],{"type":51,"value":7555},{"type":42,"tag":391,"props":11797,"children":11798},{"style":415},[11799],{"type":51,"value":7560},{"type":42,"tag":391,"props":11801,"children":11802},{"style":409},[11803],{"type":51,"value":247},{"type":42,"tag":391,"props":11805,"children":11806},{"style":415},[11807],{"type":51,"value":11808},"tiktok_ad_insights\n",{"type":42,"tag":2058,"props":11810,"children":11812},{"id":11811},"email-marketing-portion",[11813],{"type":51,"value":11814},"Email marketing portion",{"type":42,"tag":43,"props":11816,"children":11817},{},[11818,11820,11826],{"type":51,"value":11819},"The email side of the query uses ",{"type":42,"tag":240,"props":11821,"children":11823},{"className":11822},[],[11824],{"type":51,"value":11825},"UNION ALL",{"type":51,"value":11827}," to append email campaign data below the ads data. The columns and table names differ by email platform:",{"type":42,"tag":563,"props":11829,"children":11830},{":variants":3471,"group":3472},[11831,12177],{"type":42,"tag":569,"props":11832,"children":11833},{"v-slot:klaviyo":7},[11834,11845,12150],{"type":42,"tag":43,"props":11835,"children":11836},{},[11837,11839,11844],{"type":51,"value":11838},"Append this to the ads query above with ",{"type":42,"tag":240,"props":11840,"children":11842},{"className":11841},[],[11843],{"type":51,"value":11825},{"type":51,"value":6752},{"type":42,"tag":381,"props":11846,"children":11848},{"className":6761,"code":11847,"language":6763,"meta":7,"style":7},"UNION ALL\n\n-- Klaviyo email campaigns (no direct spend, but track engagement)\nSELECT\n    send_time::date AS spend_date,   -- adjust cast for your warehouse\n    'email' AS channel,\n    name AS campaign_name,\n    0.00 AS spend,\n    num_recipients AS impressions,\n    CAST(click_count AS INTEGER) AS clicks,\n    CAST(conversion_count AS INTEGER) AS conversions\nFROM raw.klaviyo_campaigns kc\nLEFT JOIN raw.klaviyo_metrics km\n    ON kc.id = km.campaign_id\nWHERE send_time IS NOT NULL\n",[11849],{"type":42,"tag":240,"props":11850,"children":11851},{"__ignoreMap":7},[11852,11860,11867,11875,11882,11908,11924,11941,11966,11982,12014,12046,12071,12096,12134],{"type":42,"tag":391,"props":11853,"children":11854},{"class":393,"line":176},[11855],{"type":42,"tag":391,"props":11856,"children":11857},{"style":515},[11858],{"type":51,"value":11859},"UNION ALL\n",{"type":42,"tag":391,"props":11861,"children":11862},{"class":393,"line":99},[11863],{"type":42,"tag":391,"props":11864,"children":11865},{"emptyLinePlaceholder":13},[11866],{"type":51,"value":6972},{"type":42,"tag":391,"props":11868,"children":11869},{"class":393,"line":439},[11870],{"type":42,"tag":391,"props":11871,"children":11872},{"style":6773},[11873],{"type":51,"value":11874},"-- Klaviyo email campaigns (no direct spend, but track engagement)\n",{"type":42,"tag":391,"props":11876,"children":11877},{"class":393,"line":947},[11878],{"type":42,"tag":391,"props":11879,"children":11880},{"style":515},[11881],{"type":51,"value":6981},{"type":42,"tag":391,"props":11883,"children":11884},{"class":393,"line":960},[11885,11890,11894,11898,11903],{"type":42,"tag":391,"props":11886,"children":11887},{"style":409},[11888],{"type":51,"value":11889},"    send_time::",{"type":42,"tag":391,"props":11891,"children":11892},{"style":515},[11893],{"type":51,"value":11278},{"type":42,"tag":391,"props":11895,"children":11896},{"style":515},[11897],{"type":51,"value":7004},{"type":42,"tag":391,"props":11899,"children":11900},{"style":409},[11901],{"type":51,"value":11902}," spend_date,   ",{"type":42,"tag":391,"props":11904,"children":11905},{"style":6773},[11906],{"type":51,"value":11907},"-- adjust cast for your warehouse\n",{"type":42,"tag":391,"props":11909,"children":11910},{"class":393,"line":984},[11911,11916,11920],{"type":42,"tag":391,"props":11912,"children":11913},{"style":403},[11914],{"type":51,"value":11915},"    'email'",{"type":42,"tag":391,"props":11917,"children":11918},{"style":515},[11919],{"type":51,"value":7004},{"type":42,"tag":391,"props":11921,"children":11922},{"style":409},[11923],{"type":51,"value":10961},{"type":42,"tag":391,"props":11925,"children":11926},{"class":393,"line":1002},[11927,11932,11936],{"type":42,"tag":391,"props":11928,"children":11929},{"style":515},[11930],{"type":51,"value":11931},"    name",{"type":42,"tag":391,"props":11933,"children":11934},{"style":515},[11935],{"type":51,"value":7004},{"type":42,"tag":391,"props":11937,"children":11938},{"style":409},[11939],{"type":51,"value":11940}," campaign_name,\n",{"type":42,"tag":391,"props":11942,"children":11943},{"class":393,"line":165},[11944,11949,11953,11958,11962],{"type":42,"tag":391,"props":11945,"children":11946},{"style":415},[11947],{"type":51,"value":11948},"    0",{"type":42,"tag":391,"props":11950,"children":11951},{"style":409},[11952],{"type":51,"value":247},{"type":42,"tag":391,"props":11954,"children":11955},{"style":415},[11956],{"type":51,"value":11957},"00",{"type":42,"tag":391,"props":11959,"children":11960},{"style":515},[11961],{"type":51,"value":7004},{"type":42,"tag":391,"props":11963,"children":11964},{"style":409},[11965],{"type":51,"value":11018},{"type":42,"tag":391,"props":11967,"children":11968},{"class":393,"line":2235},[11969,11974,11978],{"type":42,"tag":391,"props":11970,"children":11971},{"style":409},[11972],{"type":51,"value":11973},"    num_recipients ",{"type":42,"tag":391,"props":11975,"children":11976},{"style":515},[11977],{"type":51,"value":7194},{"type":42,"tag":391,"props":11979,"children":11980},{"style":409},[11981],{"type":51,"value":11052},{"type":42,"tag":391,"props":11983,"children":11984},{"class":393,"line":6843},[11985,11989,11994,11998,12002,12006,12010],{"type":42,"tag":391,"props":11986,"children":11987},{"style":415},[11988],{"type":51,"value":7138},{"type":42,"tag":391,"props":11990,"children":11991},{"style":409},[11992],{"type":51,"value":11993},"(click_count ",{"type":42,"tag":391,"props":11995,"children":11996},{"style":515},[11997],{"type":51,"value":7194},{"type":42,"tag":391,"props":11999,"children":12000},{"style":515},[12001],{"type":51,"value":11039},{"type":42,"tag":391,"props":12003,"children":12004},{"style":409},[12005],{"type":51,"value":7672},{"type":42,"tag":391,"props":12007,"children":12008},{"style":515},[12009],{"type":51,"value":7194},{"type":42,"tag":391,"props":12011,"children":12012},{"style":409},[12013],{"type":51,"value":11085},{"type":42,"tag":391,"props":12015,"children":12016},{"class":393,"line":6852},[12017,12021,12026,12030,12034,12038,12042],{"type":42,"tag":391,"props":12018,"children":12019},{"style":415},[12020],{"type":51,"value":7138},{"type":42,"tag":391,"props":12022,"children":12023},{"style":409},[12024],{"type":51,"value":12025},"(conversion_count ",{"type":42,"tag":391,"props":12027,"children":12028},{"style":515},[12029],{"type":51,"value":7194},{"type":42,"tag":391,"props":12031,"children":12032},{"style":515},[12033],{"type":51,"value":11039},{"type":42,"tag":391,"props":12035,"children":12036},{"style":409},[12037],{"type":51,"value":7672},{"type":42,"tag":391,"props":12039,"children":12040},{"style":515},[12041],{"type":51,"value":7194},{"type":42,"tag":391,"props":12043,"children":12044},{"style":409},[12045],{"type":51,"value":11118},{"type":42,"tag":391,"props":12047,"children":12048},{"class":393,"line":6861},[12049,12053,12057,12061,12066],{"type":42,"tag":391,"props":12050,"children":12051},{"style":515},[12052],{"type":51,"value":7555},{"type":42,"tag":391,"props":12054,"children":12055},{"style":415},[12056],{"type":51,"value":7560},{"type":42,"tag":391,"props":12058,"children":12059},{"style":409},[12060],{"type":51,"value":247},{"type":42,"tag":391,"props":12062,"children":12063},{"style":415},[12064],{"type":51,"value":12065},"klaviyo_campaigns",{"type":42,"tag":391,"props":12067,"children":12068},{"style":409},[12069],{"type":51,"value":12070}," kc\n",{"type":42,"tag":391,"props":12072,"children":12073},{"class":393,"line":6870},[12074,12078,12082,12086,12091],{"type":42,"tag":391,"props":12075,"children":12076},{"style":515},[12077],{"type":51,"value":6663},{"type":42,"tag":391,"props":12079,"children":12080},{"style":415},[12081],{"type":51,"value":7560},{"type":42,"tag":391,"props":12083,"children":12084},{"style":409},[12085],{"type":51,"value":247},{"type":42,"tag":391,"props":12087,"children":12088},{"style":415},[12089],{"type":51,"value":12090},"klaviyo_metrics",{"type":42,"tag":391,"props":12092,"children":12093},{"style":409},[12094],{"type":51,"value":12095}," km\n",{"type":42,"tag":391,"props":12097,"children":12098},{"class":393,"line":6879},[12099,12103,12108,12112,12116,12120,12125,12129],{"type":42,"tag":391,"props":12100,"children":12101},{"style":515},[12102],{"type":51,"value":7609},{"type":42,"tag":391,"props":12104,"children":12105},{"style":415},[12106],{"type":51,"value":12107}," kc",{"type":42,"tag":391,"props":12109,"children":12110},{"style":409},[12111],{"type":51,"value":247},{"type":42,"tag":391,"props":12113,"children":12114},{"style":415},[12115],{"type":51,"value":6999},{"type":42,"tag":391,"props":12117,"children":12118},{"style":515},[12119],{"type":51,"value":7627},{"type":42,"tag":391,"props":12121,"children":12122},{"style":415},[12123],{"type":51,"value":12124}," km",{"type":42,"tag":391,"props":12126,"children":12127},{"style":409},[12128],{"type":51,"value":247},{"type":42,"tag":391,"props":12130,"children":12131},{"style":415},[12132],{"type":51,"value":12133},"campaign_id\n",{"type":42,"tag":391,"props":12135,"children":12136},{"class":393,"line":1707},[12137,12141,12146],{"type":42,"tag":391,"props":12138,"children":12139},{"style":515},[12140],{"type":51,"value":8528},{"type":42,"tag":391,"props":12142,"children":12143},{"style":409},[12144],{"type":51,"value":12145}," send_time ",{"type":42,"tag":391,"props":12147,"children":12148},{"style":515},[12149],{"type":51,"value":10312},{"type":42,"tag":43,"props":12151,"children":12152},{},[12153,12155,12161,12162,12168,12170,12175],{"type":51,"value":12154},"Add ",{"type":42,"tag":240,"props":12156,"children":12158},{"className":12157},[],[12159],{"type":51,"value":12160},"raw.klaviyo_campaigns",{"type":51,"value":6158},{"type":42,"tag":240,"props":12163,"children":12165},{"className":12164},[],[12166],{"type":51,"value":12167},"raw.klaviyo_metrics",{"type":51,"value":12169}," to the ",{"type":42,"tag":240,"props":12171,"children":12173},{"className":12172},[],[12174],{"type":51,"value":6679},{"type":51,"value":12176}," list in the Bruin asset header.",{"type":42,"tag":569,"props":12178,"children":12179},{"v-slot:hubspot":7},[12180,12190,12418],{"type":42,"tag":43,"props":12181,"children":12182},{},[12183,12184,12189],{"type":51,"value":11838},{"type":42,"tag":240,"props":12185,"children":12187},{"className":12186},[],[12188],{"type":51,"value":11825},{"type":51,"value":6752},{"type":42,"tag":381,"props":12191,"children":12193},{"className":6761,"code":12192,"language":6763,"meta":7,"style":7},"UNION ALL\n\n-- HubSpot email campaigns (no direct spend, but track engagement)\nSELECT\n    updated_at::date AS spend_date,   -- adjust cast for your warehouse\n    'email' AS channel,\n    name AS campaign_name,\n    0.00 AS spend,\n    CAST(num_included AS INTEGER) AS impressions,\n    CAST(num_clicks AS INTEGER) AS clicks,\n    0 AS conversions\nFROM raw.hubspot_campaigns\nWHERE name IS NOT NULL\n",[12194],{"type":42,"tag":240,"props":12195,"children":12196},{"__ignoreMap":7},[12197,12204,12211,12219,12226,12250,12265,12280,12303,12335,12367,12382,12402],{"type":42,"tag":391,"props":12198,"children":12199},{"class":393,"line":176},[12200],{"type":42,"tag":391,"props":12201,"children":12202},{"style":515},[12203],{"type":51,"value":11859},{"type":42,"tag":391,"props":12205,"children":12206},{"class":393,"line":99},[12207],{"type":42,"tag":391,"props":12208,"children":12209},{"emptyLinePlaceholder":13},[12210],{"type":51,"value":6972},{"type":42,"tag":391,"props":12212,"children":12213},{"class":393,"line":439},[12214],{"type":42,"tag":391,"props":12215,"children":12216},{"style":6773},[12217],{"type":51,"value":12218},"-- HubSpot email campaigns (no direct spend, but track engagement)\n",{"type":42,"tag":391,"props":12220,"children":12221},{"class":393,"line":947},[12222],{"type":42,"tag":391,"props":12223,"children":12224},{"style":515},[12225],{"type":51,"value":6981},{"type":42,"tag":391,"props":12227,"children":12228},{"class":393,"line":960},[12229,12234,12238,12242,12246],{"type":42,"tag":391,"props":12230,"children":12231},{"style":409},[12232],{"type":51,"value":12233},"    updated_at::",{"type":42,"tag":391,"props":12235,"children":12236},{"style":515},[12237],{"type":51,"value":11278},{"type":42,"tag":391,"props":12239,"children":12240},{"style":515},[12241],{"type":51,"value":7004},{"type":42,"tag":391,"props":12243,"children":12244},{"style":409},[12245],{"type":51,"value":11902},{"type":42,"tag":391,"props":12247,"children":12248},{"style":6773},[12249],{"type":51,"value":11907},{"type":42,"tag":391,"props":12251,"children":12252},{"class":393,"line":984},[12253,12257,12261],{"type":42,"tag":391,"props":12254,"children":12255},{"style":403},[12256],{"type":51,"value":11915},{"type":42,"tag":391,"props":12258,"children":12259},{"style":515},[12260],{"type":51,"value":7004},{"type":42,"tag":391,"props":12262,"children":12263},{"style":409},[12264],{"type":51,"value":10961},{"type":42,"tag":391,"props":12266,"children":12267},{"class":393,"line":1002},[12268,12272,12276],{"type":42,"tag":391,"props":12269,"children":12270},{"style":515},[12271],{"type":51,"value":11931},{"type":42,"tag":391,"props":12273,"children":12274},{"style":515},[12275],{"type":51,"value":7004},{"type":42,"tag":391,"props":12277,"children":12278},{"style":409},[12279],{"type":51,"value":11940},{"type":42,"tag":391,"props":12281,"children":12282},{"class":393,"line":165},[12283,12287,12291,12295,12299],{"type":42,"tag":391,"props":12284,"children":12285},{"style":415},[12286],{"type":51,"value":11948},{"type":42,"tag":391,"props":12288,"children":12289},{"style":409},[12290],{"type":51,"value":247},{"type":42,"tag":391,"props":12292,"children":12293},{"style":415},[12294],{"type":51,"value":11957},{"type":42,"tag":391,"props":12296,"children":12297},{"style":515},[12298],{"type":51,"value":7004},{"type":42,"tag":391,"props":12300,"children":12301},{"style":409},[12302],{"type":51,"value":11018},{"type":42,"tag":391,"props":12304,"children":12305},{"class":393,"line":2235},[12306,12310,12315,12319,12323,12327,12331],{"type":42,"tag":391,"props":12307,"children":12308},{"style":415},[12309],{"type":51,"value":7138},{"type":42,"tag":391,"props":12311,"children":12312},{"style":409},[12313],{"type":51,"value":12314},"(num_included ",{"type":42,"tag":391,"props":12316,"children":12317},{"style":515},[12318],{"type":51,"value":7194},{"type":42,"tag":391,"props":12320,"children":12321},{"style":515},[12322],{"type":51,"value":11039},{"type":42,"tag":391,"props":12324,"children":12325},{"style":409},[12326],{"type":51,"value":7672},{"type":42,"tag":391,"props":12328,"children":12329},{"style":515},[12330],{"type":51,"value":7194},{"type":42,"tag":391,"props":12332,"children":12333},{"style":409},[12334],{"type":51,"value":11052},{"type":42,"tag":391,"props":12336,"children":12337},{"class":393,"line":6843},[12338,12342,12347,12351,12355,12359,12363],{"type":42,"tag":391,"props":12339,"children":12340},{"style":415},[12341],{"type":51,"value":7138},{"type":42,"tag":391,"props":12343,"children":12344},{"style":409},[12345],{"type":51,"value":12346},"(num_clicks ",{"type":42,"tag":391,"props":12348,"children":12349},{"style":515},[12350],{"type":51,"value":7194},{"type":42,"tag":391,"props":12352,"children":12353},{"style":515},[12354],{"type":51,"value":11039},{"type":42,"tag":391,"props":12356,"children":12357},{"style":409},[12358],{"type":51,"value":7672},{"type":42,"tag":391,"props":12360,"children":12361},{"style":515},[12362],{"type":51,"value":7194},{"type":42,"tag":391,"props":12364,"children":12365},{"style":409},[12366],{"type":51,"value":11085},{"type":42,"tag":391,"props":12368,"children":12369},{"class":393,"line":6852},[12370,12374,12378],{"type":42,"tag":391,"props":12371,"children":12372},{"style":415},[12373],{"type":51,"value":11948},{"type":42,"tag":391,"props":12375,"children":12376},{"style":515},[12377],{"type":51,"value":7004},{"type":42,"tag":391,"props":12379,"children":12380},{"style":409},[12381],{"type":51,"value":11118},{"type":42,"tag":391,"props":12383,"children":12384},{"class":393,"line":6861},[12385,12389,12393,12397],{"type":42,"tag":391,"props":12386,"children":12387},{"style":515},[12388],{"type":51,"value":7555},{"type":42,"tag":391,"props":12390,"children":12391},{"style":415},[12392],{"type":51,"value":7560},{"type":42,"tag":391,"props":12394,"children":12395},{"style":409},[12396],{"type":51,"value":247},{"type":42,"tag":391,"props":12398,"children":12399},{"style":415},[12400],{"type":51,"value":12401},"hubspot_campaigns\n",{"type":42,"tag":391,"props":12403,"children":12404},{"class":393,"line":6870},[12405,12409,12414],{"type":42,"tag":391,"props":12406,"children":12407},{"style":515},[12408],{"type":51,"value":8528},{"type":42,"tag":391,"props":12410,"children":12411},{"style":515},[12412],{"type":51,"value":12413}," name",{"type":42,"tag":391,"props":12415,"children":12416},{"style":515},[12417],{"type":51,"value":8578},{"type":42,"tag":43,"props":12419,"children":12420},{},[12421,12422,12428,12429,12434],{"type":51,"value":12154},{"type":42,"tag":240,"props":12423,"children":12425},{"className":12424},[],[12426],{"type":51,"value":12427},"raw.hubspot_campaigns",{"type":51,"value":12169},{"type":42,"tag":240,"props":12430,"children":12432},{"className":12431},[],[12433],{"type":51,"value":6679},{"type":51,"value":12176},{"type":42,"tag":339,"props":12436,"children":12437},{},[12438],{"type":42,"tag":43,"props":12439,"children":12440},{},[12441,12443,12449,12451,12456,12458,12463],{"type":51,"value":12442},"The email portion needs both the right source columns (Klaviyo vs HubSpot) and the right date cast for your warehouse. The ",{"type":42,"tag":240,"props":12444,"children":12446},{"className":12445},[],[12447],{"type":51,"value":12448},"::date",{"type":51,"value":12450}," cast above is Snowflake syntax - ClickHouse uses ",{"type":42,"tag":240,"props":12452,"children":12454},{"className":12453},[],[12455],{"type":51,"value":10764},{"type":51,"value":12457},", BigQuery uses ",{"type":42,"tag":240,"props":12459,"children":12461},{"className":12460},[],[12462],{"type":51,"value":10772},{"type":51,"value":12464},". Ask Claude Code to generate the combined SQL for your specific stack.",{"type":42,"tag":361,"props":12466,"children":12468},{"id":12467},"_5-staged-web-sessions-stg_web_sessionssql",[12469,12471],{"type":51,"value":12470},"5) Staged web sessions - ",{"type":42,"tag":240,"props":12472,"children":12474},{"className":12473},[],[12475],{"type":51,"value":12476},"stg_web_sessions.sql",{"type":42,"tag":43,"props":12478,"children":12479},{},[12480],{"type":51,"value":12481},"Clean session data with traffic source mapping. The column names differ depending on whether you use GA4 or Mixpanel, and the date functions differ by warehouse.",{"type":42,"tag":43,"props":12483,"children":12484},{},[12485,12486,12495],{"type":51,"value":6741},{"type":42,"tag":47,"props":12487,"children":12488},{},[12489],{"type":42,"tag":240,"props":12490,"children":12492},{"className":12491},[],[12493],{"type":51,"value":12494},"ecommerce\u002Fassets\u002Fstaging\u002Fstg_web_sessions.sql",{"type":51,"value":6752},{"type":42,"tag":2058,"props":12497,"children":12499},{"id":12498},"source-specific-columns",[12500],{"type":51,"value":12501},"Source-specific columns",{"type":42,"tag":43,"props":12503,"children":12504},{},[12505,12507,12513,12514,12520,12522,12528],{"type":51,"value":12506},"The raw table names differ by analytics tool. GA4 creates ",{"type":42,"tag":240,"props":12508,"children":12510},{"className":12509},[],[12511],{"type":51,"value":12512},"raw.ga4_sessions",{"type":51,"value":6158},{"type":42,"tag":240,"props":12515,"children":12517},{"className":12516},[],[12518],{"type":51,"value":12519},"raw.ga4_events",{"type":51,"value":12521},"; Mixpanel creates ",{"type":42,"tag":240,"props":12523,"children":12525},{"className":12524},[],[12526],{"type":51,"value":12527},"raw.mixpanel_events",{"type":51,"value":12529}," (no separate sessions table). Select the tab that matches your analytics tool:",{"type":42,"tag":563,"props":12531,"children":12532},{":variants":5348,"group":5349},[12533,13035],{"type":42,"tag":569,"props":12534,"children":12535},{"v-slot:ga4":7},[12536,12557],{"type":42,"tag":43,"props":12537,"children":12538},{},[12539,12541,12547,12549,12555],{"type":51,"value":12540},"GA4 gives you sessions and events as separate tables. The ",{"type":42,"tag":240,"props":12542,"children":12544},{"className":12543},[],[12545],{"type":51,"value":12546},"CASE",{"type":51,"value":12548}," statement maps GA4 traffic sources to the same channel names used in ",{"type":42,"tag":240,"props":12550,"children":12552},{"className":12551},[],[12553],{"type":51,"value":12554},"stg_marketing_spend",{"type":51,"value":12556},", so you can join them later for attribution.",{"type":42,"tag":381,"props":12558,"children":12560},{"className":6761,"code":12559,"language":6763,"meta":7,"style":7},"SELECT\n    s.date AS session_raw_date,       -- cast with your warehouse's date function\n    s.sessions AS total_sessions,\n    s.new_users,\n    s.engaged_sessions,\n    e.event_count AS purchase_events,\n    CASE\n        WHEN s.source = 'facebook' THEN 'paid_ads'\n        WHEN s.medium = 'email' THEN 'email'\n        WHEN s.medium = 'organic' THEN 'organic_search'\n        WHEN s.medium = 'cpc' THEN 'paid_search'\n        WHEN s.source = '(direct)' THEN 'direct'\n        ELSE 'other'\n    END AS channel\nFROM raw.ga4_sessions s\nLEFT JOIN raw.ga4_events e\n    ON s.date = e.date\n    AND e.event_name = 'purchase'\n",[12561],{"type":42,"tag":240,"props":12562,"children":12563},{"__ignoreMap":7},[12564,12571,12601,12626,12646,12666,12692,12700,12741,12779,12816,12853,12890,12903,12920,12945,12970,13006],{"type":42,"tag":391,"props":12565,"children":12566},{"class":393,"line":176},[12567],{"type":42,"tag":391,"props":12568,"children":12569},{"style":515},[12570],{"type":51,"value":6981},{"type":42,"tag":391,"props":12572,"children":12573},{"class":393,"line":99},[12574,12579,12583,12587,12591,12596],{"type":42,"tag":391,"props":12575,"children":12576},{"style":415},[12577],{"type":51,"value":12578},"    s",{"type":42,"tag":391,"props":12580,"children":12581},{"style":409},[12582],{"type":51,"value":247},{"type":42,"tag":391,"props":12584,"children":12585},{"style":415},[12586],{"type":51,"value":11278},{"type":42,"tag":391,"props":12588,"children":12589},{"style":515},[12590],{"type":51,"value":7004},{"type":42,"tag":391,"props":12592,"children":12593},{"style":409},[12594],{"type":51,"value":12595}," session_raw_date,       ",{"type":42,"tag":391,"props":12597,"children":12598},{"style":6773},[12599],{"type":51,"value":12600},"-- cast with your warehouse's date function\n",{"type":42,"tag":391,"props":12602,"children":12603},{"class":393,"line":439},[12604,12608,12612,12617,12621],{"type":42,"tag":391,"props":12605,"children":12606},{"style":415},[12607],{"type":51,"value":12578},{"type":42,"tag":391,"props":12609,"children":12610},{"style":409},[12611],{"type":51,"value":247},{"type":42,"tag":391,"props":12613,"children":12614},{"style":415},[12615],{"type":51,"value":12616},"sessions",{"type":42,"tag":391,"props":12618,"children":12619},{"style":515},[12620],{"type":51,"value":7004},{"type":42,"tag":391,"props":12622,"children":12623},{"style":409},[12624],{"type":51,"value":12625}," total_sessions,\n",{"type":42,"tag":391,"props":12627,"children":12628},{"class":393,"line":947},[12629,12633,12637,12642],{"type":42,"tag":391,"props":12630,"children":12631},{"style":415},[12632],{"type":51,"value":12578},{"type":42,"tag":391,"props":12634,"children":12635},{"style":409},[12636],{"type":51,"value":247},{"type":42,"tag":391,"props":12638,"children":12639},{"style":415},[12640],{"type":51,"value":12641},"new_users",{"type":42,"tag":391,"props":12643,"children":12644},{"style":409},[12645],{"type":51,"value":7031},{"type":42,"tag":391,"props":12647,"children":12648},{"class":393,"line":960},[12649,12653,12657,12662],{"type":42,"tag":391,"props":12650,"children":12651},{"style":415},[12652],{"type":51,"value":12578},{"type":42,"tag":391,"props":12654,"children":12655},{"style":409},[12656],{"type":51,"value":247},{"type":42,"tag":391,"props":12658,"children":12659},{"style":415},[12660],{"type":51,"value":12661},"engaged_sessions",{"type":42,"tag":391,"props":12663,"children":12664},{"style":409},[12665],{"type":51,"value":7031},{"type":42,"tag":391,"props":12667,"children":12668},{"class":393,"line":984},[12669,12674,12678,12683,12687],{"type":42,"tag":391,"props":12670,"children":12671},{"style":415},[12672],{"type":51,"value":12673},"    e",{"type":42,"tag":391,"props":12675,"children":12676},{"style":409},[12677],{"type":51,"value":247},{"type":42,"tag":391,"props":12679,"children":12680},{"style":415},[12681],{"type":51,"value":12682},"event_count",{"type":42,"tag":391,"props":12684,"children":12685},{"style":515},[12686],{"type":51,"value":7004},{"type":42,"tag":391,"props":12688,"children":12689},{"style":409},[12690],{"type":51,"value":12691}," purchase_events,\n",{"type":42,"tag":391,"props":12693,"children":12694},{"class":393,"line":1002},[12695],{"type":42,"tag":391,"props":12696,"children":12697},{"style":515},[12698],{"type":51,"value":12699},"    CASE\n",{"type":42,"tag":391,"props":12701,"children":12702},{"class":393,"line":165},[12703,12708,12713,12717,12722,12726,12731,12736],{"type":42,"tag":391,"props":12704,"children":12705},{"style":515},[12706],{"type":51,"value":12707},"        WHEN",{"type":42,"tag":391,"props":12709,"children":12710},{"style":415},[12711],{"type":51,"value":12712}," s",{"type":42,"tag":391,"props":12714,"children":12715},{"style":409},[12716],{"type":51,"value":247},{"type":42,"tag":391,"props":12718,"children":12719},{"style":415},[12720],{"type":51,"value":12721},"source",{"type":42,"tag":391,"props":12723,"children":12724},{"style":515},[12725],{"type":51,"value":7627},{"type":42,"tag":391,"props":12727,"children":12728},{"style":403},[12729],{"type":51,"value":12730}," 'facebook'",{"type":42,"tag":391,"props":12732,"children":12733},{"style":515},[12734],{"type":51,"value":12735}," THEN",{"type":42,"tag":391,"props":12737,"children":12738},{"style":403},[12739],{"type":51,"value":12740}," 'paid_ads'\n",{"type":42,"tag":391,"props":12742,"children":12743},{"class":393,"line":2235},[12744,12748,12752,12756,12761,12765,12770,12774],{"type":42,"tag":391,"props":12745,"children":12746},{"style":515},[12747],{"type":51,"value":12707},{"type":42,"tag":391,"props":12749,"children":12750},{"style":415},[12751],{"type":51,"value":12712},{"type":42,"tag":391,"props":12753,"children":12754},{"style":409},[12755],{"type":51,"value":247},{"type":42,"tag":391,"props":12757,"children":12758},{"style":415},[12759],{"type":51,"value":12760},"medium",{"type":42,"tag":391,"props":12762,"children":12763},{"style":515},[12764],{"type":51,"value":7627},{"type":42,"tag":391,"props":12766,"children":12767},{"style":403},[12768],{"type":51,"value":12769}," 'email'",{"type":42,"tag":391,"props":12771,"children":12772},{"style":515},[12773],{"type":51,"value":12735},{"type":42,"tag":391,"props":12775,"children":12776},{"style":403},[12777],{"type":51,"value":12778}," 'email'\n",{"type":42,"tag":391,"props":12780,"children":12781},{"class":393,"line":6843},[12782,12786,12790,12794,12798,12802,12807,12811],{"type":42,"tag":391,"props":12783,"children":12784},{"style":515},[12785],{"type":51,"value":12707},{"type":42,"tag":391,"props":12787,"children":12788},{"style":415},[12789],{"type":51,"value":12712},{"type":42,"tag":391,"props":12791,"children":12792},{"style":409},[12793],{"type":51,"value":247},{"type":42,"tag":391,"props":12795,"children":12796},{"style":415},[12797],{"type":51,"value":12760},{"type":42,"tag":391,"props":12799,"children":12800},{"style":515},[12801],{"type":51,"value":7627},{"type":42,"tag":391,"props":12803,"children":12804},{"style":403},[12805],{"type":51,"value":12806}," 'organic'",{"type":42,"tag":391,"props":12808,"children":12809},{"style":515},[12810],{"type":51,"value":12735},{"type":42,"tag":391,"props":12812,"children":12813},{"style":403},[12814],{"type":51,"value":12815}," 'organic_search'\n",{"type":42,"tag":391,"props":12817,"children":12818},{"class":393,"line":6852},[12819,12823,12827,12831,12835,12839,12844,12848],{"type":42,"tag":391,"props":12820,"children":12821},{"style":515},[12822],{"type":51,"value":12707},{"type":42,"tag":391,"props":12824,"children":12825},{"style":415},[12826],{"type":51,"value":12712},{"type":42,"tag":391,"props":12828,"children":12829},{"style":409},[12830],{"type":51,"value":247},{"type":42,"tag":391,"props":12832,"children":12833},{"style":415},[12834],{"type":51,"value":12760},{"type":42,"tag":391,"props":12836,"children":12837},{"style":515},[12838],{"type":51,"value":7627},{"type":42,"tag":391,"props":12840,"children":12841},{"style":403},[12842],{"type":51,"value":12843}," 'cpc'",{"type":42,"tag":391,"props":12845,"children":12846},{"style":515},[12847],{"type":51,"value":12735},{"type":42,"tag":391,"props":12849,"children":12850},{"style":403},[12851],{"type":51,"value":12852}," 'paid_search'\n",{"type":42,"tag":391,"props":12854,"children":12855},{"class":393,"line":6861},[12856,12860,12864,12868,12872,12876,12881,12885],{"type":42,"tag":391,"props":12857,"children":12858},{"style":515},[12859],{"type":51,"value":12707},{"type":42,"tag":391,"props":12861,"children":12862},{"style":415},[12863],{"type":51,"value":12712},{"type":42,"tag":391,"props":12865,"children":12866},{"style":409},[12867],{"type":51,"value":247},{"type":42,"tag":391,"props":12869,"children":12870},{"style":415},[12871],{"type":51,"value":12721},{"type":42,"tag":391,"props":12873,"children":12874},{"style":515},[12875],{"type":51,"value":7627},{"type":42,"tag":391,"props":12877,"children":12878},{"style":403},[12879],{"type":51,"value":12880}," '(direct)'",{"type":42,"tag":391,"props":12882,"children":12883},{"style":515},[12884],{"type":51,"value":12735},{"type":42,"tag":391,"props":12886,"children":12887},{"style":403},[12888],{"type":51,"value":12889}," 'direct'\n",{"type":42,"tag":391,"props":12891,"children":12892},{"class":393,"line":6870},[12893,12898],{"type":42,"tag":391,"props":12894,"children":12895},{"style":515},[12896],{"type":51,"value":12897},"        ELSE",{"type":42,"tag":391,"props":12899,"children":12900},{"style":403},[12901],{"type":51,"value":12902}," 'other'\n",{"type":42,"tag":391,"props":12904,"children":12905},{"class":393,"line":6879},[12906,12911,12915],{"type":42,"tag":391,"props":12907,"children":12908},{"style":515},[12909],{"type":51,"value":12910},"    END",{"type":42,"tag":391,"props":12912,"children":12913},{"style":515},[12914],{"type":51,"value":7004},{"type":42,"tag":391,"props":12916,"children":12917},{"style":409},[12918],{"type":51,"value":12919}," channel\n",{"type":42,"tag":391,"props":12921,"children":12922},{"class":393,"line":1707},[12923,12927,12931,12935,12940],{"type":42,"tag":391,"props":12924,"children":12925},{"style":515},[12926],{"type":51,"value":7555},{"type":42,"tag":391,"props":12928,"children":12929},{"style":415},[12930],{"type":51,"value":7560},{"type":42,"tag":391,"props":12932,"children":12933},{"style":409},[12934],{"type":51,"value":247},{"type":42,"tag":391,"props":12936,"children":12937},{"style":415},[12938],{"type":51,"value":12939},"ga4_sessions",{"type":42,"tag":391,"props":12941,"children":12942},{"style":409},[12943],{"type":51,"value":12944}," s\n",{"type":42,"tag":391,"props":12946,"children":12947},{"class":393,"line":6896},[12948,12952,12956,12960,12965],{"type":42,"tag":391,"props":12949,"children":12950},{"style":515},[12951],{"type":51,"value":6663},{"type":42,"tag":391,"props":12953,"children":12954},{"style":415},[12955],{"type":51,"value":7560},{"type":42,"tag":391,"props":12957,"children":12958},{"style":409},[12959],{"type":51,"value":247},{"type":42,"tag":391,"props":12961,"children":12962},{"style":415},[12963],{"type":51,"value":12964},"ga4_events",{"type":42,"tag":391,"props":12966,"children":12967},{"style":409},[12968],{"type":51,"value":12969}," e\n",{"type":42,"tag":391,"props":12971,"children":12972},{"class":393,"line":6905},[12973,12977,12981,12985,12989,12993,12998,13002],{"type":42,"tag":391,"props":12974,"children":12975},{"style":515},[12976],{"type":51,"value":7609},{"type":42,"tag":391,"props":12978,"children":12979},{"style":415},[12980],{"type":51,"value":12712},{"type":42,"tag":391,"props":12982,"children":12983},{"style":409},[12984],{"type":51,"value":247},{"type":42,"tag":391,"props":12986,"children":12987},{"style":415},[12988],{"type":51,"value":11278},{"type":42,"tag":391,"props":12990,"children":12991},{"style":515},[12992],{"type":51,"value":7627},{"type":42,"tag":391,"props":12994,"children":12995},{"style":415},[12996],{"type":51,"value":12997}," e",{"type":42,"tag":391,"props":12999,"children":13000},{"style":409},[13001],{"type":51,"value":247},{"type":42,"tag":391,"props":13003,"children":13004},{"style":415},[13005],{"type":51,"value":4987},{"type":42,"tag":391,"props":13007,"children":13008},{"class":393,"line":6913},[13009,13013,13017,13021,13026,13030],{"type":42,"tag":391,"props":13010,"children":13011},{"style":515},[13012],{"type":51,"value":7650},{"type":42,"tag":391,"props":13014,"children":13015},{"style":415},[13016],{"type":51,"value":12997},{"type":42,"tag":391,"props":13018,"children":13019},{"style":409},[13020],{"type":51,"value":247},{"type":42,"tag":391,"props":13022,"children":13023},{"style":415},[13024],{"type":51,"value":13025},"event_name",{"type":42,"tag":391,"props":13027,"children":13028},{"style":515},[13029],{"type":51,"value":7627},{"type":42,"tag":391,"props":13031,"children":13032},{"style":403},[13033],{"type":51,"value":13034}," 'purchase'\n",{"type":42,"tag":569,"props":13036,"children":13037},{"v-slot:mixpanel":7},[13038,13050],{"type":42,"tag":43,"props":13039,"children":13040},{},[13041,13043,13048],{"type":51,"value":13042},"Mixpanel stores everything as events - there is no separate sessions table. You aggregate session-like metrics from ",{"type":42,"tag":240,"props":13044,"children":13046},{"className":13045},[],[13047],{"type":51,"value":12527},{"type":51,"value":13049}," directly.",{"type":42,"tag":381,"props":13051,"children":13053},{"className":6761,"code":13052,"language":6763,"meta":7,"style":7},"SELECT\n    e.time AS session_raw_date,       -- cast with your warehouse's date function\n    COUNT(*) AS total_sessions,\n    COUNT(CASE WHEN e.is_new_user = true THEN 1 END) AS new_users,\n    COUNT(CASE WHEN e.session_duration > 10 THEN 1 END) AS engaged_sessions,\n    COUNT(CASE WHEN e.event_name = 'purchase' THEN 1 END) AS purchase_events,\n    CASE\n        WHEN e.utm_source = 'facebook' THEN 'paid_ads'\n        WHEN e.utm_medium = 'email' THEN 'email'\n        WHEN e.utm_medium = 'organic' THEN 'organic_search'\n        WHEN e.utm_medium = 'cpc' THEN 'paid_search'\n        ELSE 'other'\n    END AS channel\nFROM raw.mixpanel_events e\nWHERE e.event_name = 'session_start'\nGROUP BY session_raw_date, channel\n",[13054],{"type":42,"tag":240,"props":13055,"children":13056},{"__ignoreMap":7},[13057,13064,13092,13121,13191,13258,13322,13329,13365,13401,13436,13471,13482,13497,13521,13549],{"type":42,"tag":391,"props":13058,"children":13059},{"class":393,"line":176},[13060],{"type":42,"tag":391,"props":13061,"children":13062},{"style":515},[13063],{"type":51,"value":6981},{"type":42,"tag":391,"props":13065,"children":13066},{"class":393,"line":99},[13067,13071,13075,13080,13084,13088],{"type":42,"tag":391,"props":13068,"children":13069},{"style":415},[13070],{"type":51,"value":12673},{"type":42,"tag":391,"props":13072,"children":13073},{"style":409},[13074],{"type":51,"value":247},{"type":42,"tag":391,"props":13076,"children":13077},{"style":415},[13078],{"type":51,"value":13079},"time",{"type":42,"tag":391,"props":13081,"children":13082},{"style":515},[13083],{"type":51,"value":7004},{"type":42,"tag":391,"props":13085,"children":13086},{"style":409},[13087],{"type":51,"value":12595},{"type":42,"tag":391,"props":13089,"children":13090},{"style":6773},[13091],{"type":51,"value":12600},{"type":42,"tag":391,"props":13093,"children":13094},{"class":393,"line":439},[13095,13100,13104,13109,13113,13117],{"type":42,"tag":391,"props":13096,"children":13097},{"style":415},[13098],{"type":51,"value":13099},"    COUNT",{"type":42,"tag":391,"props":13101,"children":13102},{"style":409},[13103],{"type":51,"value":7143},{"type":42,"tag":391,"props":13105,"children":13106},{"style":515},[13107],{"type":51,"value":13108},"*",{"type":42,"tag":391,"props":13110,"children":13111},{"style":409},[13112],{"type":51,"value":7672},{"type":42,"tag":391,"props":13114,"children":13115},{"style":515},[13116],{"type":51,"value":7194},{"type":42,"tag":391,"props":13118,"children":13119},{"style":409},[13120],{"type":51,"value":12625},{"type":42,"tag":391,"props":13122,"children":13123},{"class":393,"line":947},[13124,13128,13132,13136,13141,13145,13149,13154,13158,13163,13168,13173,13178,13182,13186],{"type":42,"tag":391,"props":13125,"children":13126},{"style":415},[13127],{"type":51,"value":13099},{"type":42,"tag":391,"props":13129,"children":13130},{"style":409},[13131],{"type":51,"value":7143},{"type":42,"tag":391,"props":13133,"children":13134},{"style":515},[13135],{"type":51,"value":12546},{"type":42,"tag":391,"props":13137,"children":13138},{"style":515},[13139],{"type":51,"value":13140}," WHEN",{"type":42,"tag":391,"props":13142,"children":13143},{"style":415},[13144],{"type":51,"value":12997},{"type":42,"tag":391,"props":13146,"children":13147},{"style":409},[13148],{"type":51,"value":247},{"type":42,"tag":391,"props":13150,"children":13151},{"style":415},[13152],{"type":51,"value":13153},"is_new_user",{"type":42,"tag":391,"props":13155,"children":13156},{"style":515},[13157],{"type":51,"value":7627},{"type":42,"tag":391,"props":13159,"children":13160},{"style":409},[13161],{"type":51,"value":13162}," true ",{"type":42,"tag":391,"props":13164,"children":13165},{"style":515},[13166],{"type":51,"value":13167},"THEN",{"type":42,"tag":391,"props":13169,"children":13170},{"style":415},[13171],{"type":51,"value":13172}," 1",{"type":42,"tag":391,"props":13174,"children":13175},{"style":515},[13176],{"type":51,"value":13177}," END",{"type":42,"tag":391,"props":13179,"children":13180},{"style":409},[13181],{"type":51,"value":7672},{"type":42,"tag":391,"props":13183,"children":13184},{"style":515},[13185],{"type":51,"value":7194},{"type":42,"tag":391,"props":13187,"children":13188},{"style":409},[13189],{"type":51,"value":13190}," new_users,\n",{"type":42,"tag":391,"props":13192,"children":13193},{"class":393,"line":960},[13194,13198,13202,13206,13210,13214,13218,13223,13228,13233,13237,13241,13245,13249,13253],{"type":42,"tag":391,"props":13195,"children":13196},{"style":415},[13197],{"type":51,"value":13099},{"type":42,"tag":391,"props":13199,"children":13200},{"style":409},[13201],{"type":51,"value":7143},{"type":42,"tag":391,"props":13203,"children":13204},{"style":515},[13205],{"type":51,"value":12546},{"type":42,"tag":391,"props":13207,"children":13208},{"style":515},[13209],{"type":51,"value":13140},{"type":42,"tag":391,"props":13211,"children":13212},{"style":415},[13213],{"type":51,"value":12997},{"type":42,"tag":391,"props":13215,"children":13216},{"style":409},[13217],{"type":51,"value":247},{"type":42,"tag":391,"props":13219,"children":13220},{"style":415},[13221],{"type":51,"value":13222},"session_duration",{"type":42,"tag":391,"props":13224,"children":13225},{"style":515},[13226],{"type":51,"value":13227}," >",{"type":42,"tag":391,"props":13229,"children":13230},{"style":415},[13231],{"type":51,"value":13232}," 10",{"type":42,"tag":391,"props":13234,"children":13235},{"style":515},[13236],{"type":51,"value":12735},{"type":42,"tag":391,"props":13238,"children":13239},{"style":415},[13240],{"type":51,"value":13172},{"type":42,"tag":391,"props":13242,"children":13243},{"style":515},[13244],{"type":51,"value":13177},{"type":42,"tag":391,"props":13246,"children":13247},{"style":409},[13248],{"type":51,"value":7672},{"type":42,"tag":391,"props":13250,"children":13251},{"style":515},[13252],{"type":51,"value":7194},{"type":42,"tag":391,"props":13254,"children":13255},{"style":409},[13256],{"type":51,"value":13257}," engaged_sessions,\n",{"type":42,"tag":391,"props":13259,"children":13260},{"class":393,"line":984},[13261,13265,13269,13273,13277,13281,13285,13289,13293,13298,13302,13306,13310,13314,13318],{"type":42,"tag":391,"props":13262,"children":13263},{"style":415},[13264],{"type":51,"value":13099},{"type":42,"tag":391,"props":13266,"children":13267},{"style":409},[13268],{"type":51,"value":7143},{"type":42,"tag":391,"props":13270,"children":13271},{"style":515},[13272],{"type":51,"value":12546},{"type":42,"tag":391,"props":13274,"children":13275},{"style":515},[13276],{"type":51,"value":13140},{"type":42,"tag":391,"props":13278,"children":13279},{"style":415},[13280],{"type":51,"value":12997},{"type":42,"tag":391,"props":13282,"children":13283},{"style":409},[13284],{"type":51,"value":247},{"type":42,"tag":391,"props":13286,"children":13287},{"style":415},[13288],{"type":51,"value":13025},{"type":42,"tag":391,"props":13290,"children":13291},{"style":515},[13292],{"type":51,"value":7627},{"type":42,"tag":391,"props":13294,"children":13295},{"style":403},[13296],{"type":51,"value":13297}," 'purchase'",{"type":42,"tag":391,"props":13299,"children":13300},{"style":515},[13301],{"type":51,"value":12735},{"type":42,"tag":391,"props":13303,"children":13304},{"style":415},[13305],{"type":51,"value":13172},{"type":42,"tag":391,"props":13307,"children":13308},{"style":515},[13309],{"type":51,"value":13177},{"type":42,"tag":391,"props":13311,"children":13312},{"style":409},[13313],{"type":51,"value":7672},{"type":42,"tag":391,"props":13315,"children":13316},{"style":515},[13317],{"type":51,"value":7194},{"type":42,"tag":391,"props":13319,"children":13320},{"style":409},[13321],{"type":51,"value":12691},{"type":42,"tag":391,"props":13323,"children":13324},{"class":393,"line":1002},[13325],{"type":42,"tag":391,"props":13326,"children":13327},{"style":515},[13328],{"type":51,"value":12699},{"type":42,"tag":391,"props":13330,"children":13331},{"class":393,"line":165},[13332,13336,13340,13344,13349,13353,13357,13361],{"type":42,"tag":391,"props":13333,"children":13334},{"style":515},[13335],{"type":51,"value":12707},{"type":42,"tag":391,"props":13337,"children":13338},{"style":415},[13339],{"type":51,"value":12997},{"type":42,"tag":391,"props":13341,"children":13342},{"style":409},[13343],{"type":51,"value":247},{"type":42,"tag":391,"props":13345,"children":13346},{"style":415},[13347],{"type":51,"value":13348},"utm_source",{"type":42,"tag":391,"props":13350,"children":13351},{"style":515},[13352],{"type":51,"value":7627},{"type":42,"tag":391,"props":13354,"children":13355},{"style":403},[13356],{"type":51,"value":12730},{"type":42,"tag":391,"props":13358,"children":13359},{"style":515},[13360],{"type":51,"value":12735},{"type":42,"tag":391,"props":13362,"children":13363},{"style":403},[13364],{"type":51,"value":12740},{"type":42,"tag":391,"props":13366,"children":13367},{"class":393,"line":2235},[13368,13372,13376,13380,13385,13389,13393,13397],{"type":42,"tag":391,"props":13369,"children":13370},{"style":515},[13371],{"type":51,"value":12707},{"type":42,"tag":391,"props":13373,"children":13374},{"style":415},[13375],{"type":51,"value":12997},{"type":42,"tag":391,"props":13377,"children":13378},{"style":409},[13379],{"type":51,"value":247},{"type":42,"tag":391,"props":13381,"children":13382},{"style":415},[13383],{"type":51,"value":13384},"utm_medium",{"type":42,"tag":391,"props":13386,"children":13387},{"style":515},[13388],{"type":51,"value":7627},{"type":42,"tag":391,"props":13390,"children":13391},{"style":403},[13392],{"type":51,"value":12769},{"type":42,"tag":391,"props":13394,"children":13395},{"style":515},[13396],{"type":51,"value":12735},{"type":42,"tag":391,"props":13398,"children":13399},{"style":403},[13400],{"type":51,"value":12778},{"type":42,"tag":391,"props":13402,"children":13403},{"class":393,"line":6843},[13404,13408,13412,13416,13420,13424,13428,13432],{"type":42,"tag":391,"props":13405,"children":13406},{"style":515},[13407],{"type":51,"value":12707},{"type":42,"tag":391,"props":13409,"children":13410},{"style":415},[13411],{"type":51,"value":12997},{"type":42,"tag":391,"props":13413,"children":13414},{"style":409},[13415],{"type":51,"value":247},{"type":42,"tag":391,"props":13417,"children":13418},{"style":415},[13419],{"type":51,"value":13384},{"type":42,"tag":391,"props":13421,"children":13422},{"style":515},[13423],{"type":51,"value":7627},{"type":42,"tag":391,"props":13425,"children":13426},{"style":403},[13427],{"type":51,"value":12806},{"type":42,"tag":391,"props":13429,"children":13430},{"style":515},[13431],{"type":51,"value":12735},{"type":42,"tag":391,"props":13433,"children":13434},{"style":403},[13435],{"type":51,"value":12815},{"type":42,"tag":391,"props":13437,"children":13438},{"class":393,"line":6852},[13439,13443,13447,13451,13455,13459,13463,13467],{"type":42,"tag":391,"props":13440,"children":13441},{"style":515},[13442],{"type":51,"value":12707},{"type":42,"tag":391,"props":13444,"children":13445},{"style":415},[13446],{"type":51,"value":12997},{"type":42,"tag":391,"props":13448,"children":13449},{"style":409},[13450],{"type":51,"value":247},{"type":42,"tag":391,"props":13452,"children":13453},{"style":415},[13454],{"type":51,"value":13384},{"type":42,"tag":391,"props":13456,"children":13457},{"style":515},[13458],{"type":51,"value":7627},{"type":42,"tag":391,"props":13460,"children":13461},{"style":403},[13462],{"type":51,"value":12843},{"type":42,"tag":391,"props":13464,"children":13465},{"style":515},[13466],{"type":51,"value":12735},{"type":42,"tag":391,"props":13468,"children":13469},{"style":403},[13470],{"type":51,"value":12852},{"type":42,"tag":391,"props":13472,"children":13473},{"class":393,"line":6861},[13474,13478],{"type":42,"tag":391,"props":13475,"children":13476},{"style":515},[13477],{"type":51,"value":12897},{"type":42,"tag":391,"props":13479,"children":13480},{"style":403},[13481],{"type":51,"value":12902},{"type":42,"tag":391,"props":13483,"children":13484},{"class":393,"line":6870},[13485,13489,13493],{"type":42,"tag":391,"props":13486,"children":13487},{"style":515},[13488],{"type":51,"value":12910},{"type":42,"tag":391,"props":13490,"children":13491},{"style":515},[13492],{"type":51,"value":7004},{"type":42,"tag":391,"props":13494,"children":13495},{"style":409},[13496],{"type":51,"value":12919},{"type":42,"tag":391,"props":13498,"children":13499},{"class":393,"line":6879},[13500,13504,13508,13512,13517],{"type":42,"tag":391,"props":13501,"children":13502},{"style":515},[13503],{"type":51,"value":7555},{"type":42,"tag":391,"props":13505,"children":13506},{"style":415},[13507],{"type":51,"value":7560},{"type":42,"tag":391,"props":13509,"children":13510},{"style":409},[13511],{"type":51,"value":247},{"type":42,"tag":391,"props":13513,"children":13514},{"style":415},[13515],{"type":51,"value":13516},"mixpanel_events",{"type":42,"tag":391,"props":13518,"children":13519},{"style":409},[13520],{"type":51,"value":12969},{"type":42,"tag":391,"props":13522,"children":13523},{"class":393,"line":1707},[13524,13528,13532,13536,13540,13544],{"type":42,"tag":391,"props":13525,"children":13526},{"style":515},[13527],{"type":51,"value":8528},{"type":42,"tag":391,"props":13529,"children":13530},{"style":415},[13531],{"type":51,"value":12997},{"type":42,"tag":391,"props":13533,"children":13534},{"style":409},[13535],{"type":51,"value":247},{"type":42,"tag":391,"props":13537,"children":13538},{"style":415},[13539],{"type":51,"value":13025},{"type":42,"tag":391,"props":13541,"children":13542},{"style":515},[13543],{"type":51,"value":7627},{"type":42,"tag":391,"props":13545,"children":13546},{"style":403},[13547],{"type":51,"value":13548}," 'session_start'\n",{"type":42,"tag":391,"props":13550,"children":13551},{"class":393,"line":6896},[13552,13557],{"type":42,"tag":391,"props":13553,"children":13554},{"style":515},[13555],{"type":51,"value":13556},"GROUP BY",{"type":42,"tag":391,"props":13558,"children":13559},{"style":409},[13560],{"type":51,"value":13561}," session_raw_date, channel\n",{"type":42,"tag":2058,"props":13563,"children":13565},{"id":13564},"warehouse-date-casting",[13566],{"type":51,"value":13567},"Warehouse date casting",{"type":42,"tag":43,"props":13569,"children":13570},{},[13571,13573,13579,13581,13586,13587,13592,13594,13599],{"type":51,"value":13572},"Wrap the source query above in the Bruin asset header and apply the correct date function for your warehouse. Update the ",{"type":42,"tag":240,"props":13574,"children":13576},{"className":13575},[],[13577],{"type":51,"value":13578},"depends:",{"type":51,"value":13580}," list to match the analytics tool you chose above (GA4 uses ",{"type":42,"tag":240,"props":13582,"children":13584},{"className":13583},[],[13585],{"type":51,"value":12512},{"type":51,"value":6158},{"type":42,"tag":240,"props":13588,"children":13590},{"className":13589},[],[13591],{"type":51,"value":12519},{"type":51,"value":13593},"; Mixpanel uses ",{"type":42,"tag":240,"props":13595,"children":13597},{"className":13596},[],[13598],{"type":51,"value":12527},{"type":51,"value":13600},"):",{"type":42,"tag":563,"props":13602,"children":13603},{":variants":565,"group":566},[13604,13767,13926],{"type":42,"tag":569,"props":13605,"children":13606},{"v-slot:clickhouse":7},[13607,13619],{"type":42,"tag":43,"props":13608,"children":13609},{},[13610,13612,13617],{"type":51,"value":13611},"Use ",{"type":42,"tag":240,"props":13613,"children":13615},{"className":13614},[],[13616],{"type":51,"value":10764},{"type":51,"value":13618}," for the date column:",{"type":42,"tag":381,"props":13620,"children":13622},{"className":6761,"code":13621,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_web_sessions\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.ga4_sessions       -- GA4: use raw.ga4_sessions and raw.ga4_events\n  - raw.ga4_events         -- Mixpanel: replace both with raw.mixpanel_events\ncolumns:\n  - name: session_date\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nSELECT\n    toDate(session_raw_date) AS session_date,\n    -- ... rest of columns from source query above\n",[13623],{"type":42,"tag":240,"props":13624,"children":13625},{"__ignoreMap":7},[13626,13633,13641,13648,13655,13662,13669,13677,13685,13692,13700,13707,13714,13721,13728,13735,13742,13759],{"type":42,"tag":391,"props":13627,"children":13628},{"class":393,"line":176},[13629],{"type":42,"tag":391,"props":13630,"children":13631},{"style":6773},[13632],{"type":51,"value":6776},{"type":42,"tag":391,"props":13634,"children":13635},{"class":393,"line":99},[13636],{"type":42,"tag":391,"props":13637,"children":13638},{"style":6773},[13639],{"type":51,"value":13640},"name: staging.stg_web_sessions\n",{"type":42,"tag":391,"props":13642,"children":13643},{"class":393,"line":439},[13644],{"type":42,"tag":391,"props":13645,"children":13646},{"style":6773},[13647],{"type":51,"value":6792},{"type":42,"tag":391,"props":13649,"children":13650},{"class":393,"line":947},[13651],{"type":42,"tag":391,"props":13652,"children":13653},{"style":6773},[13654],{"type":51,"value":6800},{"type":42,"tag":391,"props":13656,"children":13657},{"class":393,"line":960},[13658],{"type":42,"tag":391,"props":13659,"children":13660},{"style":6773},[13661],{"type":51,"value":6808},{"type":42,"tag":391,"props":13663,"children":13664},{"class":393,"line":984},[13665],{"type":42,"tag":391,"props":13666,"children":13667},{"style":6773},[13668],{"type":51,"value":6816},{"type":42,"tag":391,"props":13670,"children":13671},{"class":393,"line":1002},[13672],{"type":42,"tag":391,"props":13673,"children":13674},{"style":6773},[13675],{"type":51,"value":13676},"  - raw.ga4_sessions       -- GA4: use raw.ga4_sessions and raw.ga4_events\n",{"type":42,"tag":391,"props":13678,"children":13679},{"class":393,"line":165},[13680],{"type":42,"tag":391,"props":13681,"children":13682},{"style":6773},[13683],{"type":51,"value":13684},"  - raw.ga4_events         -- Mixpanel: replace both with raw.mixpanel_events\n",{"type":42,"tag":391,"props":13686,"children":13687},{"class":393,"line":2235},[13688],{"type":42,"tag":391,"props":13689,"children":13690},{"style":6773},[13691],{"type":51,"value":6840},{"type":42,"tag":391,"props":13693,"children":13694},{"class":393,"line":6843},[13695],{"type":42,"tag":391,"props":13696,"children":13697},{"style":6773},[13698],{"type":51,"value":13699},"  - name: session_date\n",{"type":42,"tag":391,"props":13701,"children":13702},{"class":393,"line":6852},[13703],{"type":42,"tag":391,"props":13704,"children":13705},{"style":6773},[13706],{"type":51,"value":10874},{"type":42,"tag":391,"props":13708,"children":13709},{"class":393,"line":6861},[13710],{"type":42,"tag":391,"props":13711,"children":13712},{"style":6773},[13713],{"type":51,"value":6867},{"type":42,"tag":391,"props":13715,"children":13716},{"class":393,"line":6870},[13717],{"type":42,"tag":391,"props":13718,"children":13719},{"style":6773},[13720],{"type":51,"value":6876},{"type":42,"tag":391,"props":13722,"children":13723},{"class":393,"line":6879},[13724],{"type":42,"tag":391,"props":13725,"children":13726},{"style":6773},[13727],{"type":51,"value":6963},{"type":42,"tag":391,"props":13729,"children":13730},{"class":393,"line":1707},[13731],{"type":42,"tag":391,"props":13732,"children":13733},{"emptyLinePlaceholder":13},[13734],{"type":51,"value":6972},{"type":42,"tag":391,"props":13736,"children":13737},{"class":393,"line":6896},[13738],{"type":42,"tag":391,"props":13739,"children":13740},{"style":515},[13741],{"type":51,"value":6981},{"type":42,"tag":391,"props":13743,"children":13744},{"class":393,"line":6905},[13745,13750,13754],{"type":42,"tag":391,"props":13746,"children":13747},{"style":409},[13748],{"type":51,"value":13749},"    toDate(session_raw_date) ",{"type":42,"tag":391,"props":13751,"children":13752},{"style":515},[13753],{"type":51,"value":7194},{"type":42,"tag":391,"props":13755,"children":13756},{"style":409},[13757],{"type":51,"value":13758}," session_date,\n",{"type":42,"tag":391,"props":13760,"children":13761},{"class":393,"line":6913},[13762],{"type":42,"tag":391,"props":13763,"children":13764},{"style":6773},[13765],{"type":51,"value":13766},"    -- ... rest of columns from source query above\n",{"type":42,"tag":569,"props":13768,"children":13769},{"v-slot:bigquery":7},[13770,13780],{"type":42,"tag":43,"props":13771,"children":13772},{},[13773,13774,13779],{"type":51,"value":13611},{"type":42,"tag":240,"props":13775,"children":13777},{"className":13776},[],[13778],{"type":51,"value":10772},{"type":51,"value":13618},{"type":42,"tag":381,"props":13781,"children":13783},{"className":6761,"code":13782,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_web_sessions\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.ga4_sessions       -- GA4: use raw.ga4_sessions and raw.ga4_events\n  - raw.ga4_events         -- Mixpanel: replace both with raw.mixpanel_events\ncolumns:\n  - name: session_date\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nSELECT\n    DATE(session_raw_date) AS session_date,\n    -- ... rest of columns from source query above\n",[13784],{"type":42,"tag":240,"props":13785,"children":13786},{"__ignoreMap":7},[13787,13794,13801,13808,13815,13822,13829,13836,13843,13850,13857,13864,13871,13878,13885,13892,13899,13919],{"type":42,"tag":391,"props":13788,"children":13789},{"class":393,"line":176},[13790],{"type":42,"tag":391,"props":13791,"children":13792},{"style":6773},[13793],{"type":51,"value":6776},{"type":42,"tag":391,"props":13795,"children":13796},{"class":393,"line":99},[13797],{"type":42,"tag":391,"props":13798,"children":13799},{"style":6773},[13800],{"type":51,"value":13640},{"type":42,"tag":391,"props":13802,"children":13803},{"class":393,"line":439},[13804],{"type":42,"tag":391,"props":13805,"children":13806},{"style":6773},[13807],{"type":51,"value":6792},{"type":42,"tag":391,"props":13809,"children":13810},{"class":393,"line":947},[13811],{"type":42,"tag":391,"props":13812,"children":13813},{"style":6773},[13814],{"type":51,"value":6800},{"type":42,"tag":391,"props":13816,"children":13817},{"class":393,"line":960},[13818],{"type":42,"tag":391,"props":13819,"children":13820},{"style":6773},[13821],{"type":51,"value":6808},{"type":42,"tag":391,"props":13823,"children":13824},{"class":393,"line":984},[13825],{"type":42,"tag":391,"props":13826,"children":13827},{"style":6773},[13828],{"type":51,"value":6816},{"type":42,"tag":391,"props":13830,"children":13831},{"class":393,"line":1002},[13832],{"type":42,"tag":391,"props":13833,"children":13834},{"style":6773},[13835],{"type":51,"value":13676},{"type":42,"tag":391,"props":13837,"children":13838},{"class":393,"line":165},[13839],{"type":42,"tag":391,"props":13840,"children":13841},{"style":6773},[13842],{"type":51,"value":13684},{"type":42,"tag":391,"props":13844,"children":13845},{"class":393,"line":2235},[13846],{"type":42,"tag":391,"props":13847,"children":13848},{"style":6773},[13849],{"type":51,"value":6840},{"type":42,"tag":391,"props":13851,"children":13852},{"class":393,"line":6843},[13853],{"type":42,"tag":391,"props":13854,"children":13855},{"style":6773},[13856],{"type":51,"value":13699},{"type":42,"tag":391,"props":13858,"children":13859},{"class":393,"line":6852},[13860],{"type":42,"tag":391,"props":13861,"children":13862},{"style":6773},[13863],{"type":51,"value":10874},{"type":42,"tag":391,"props":13865,"children":13866},{"class":393,"line":6861},[13867],{"type":42,"tag":391,"props":13868,"children":13869},{"style":6773},[13870],{"type":51,"value":6867},{"type":42,"tag":391,"props":13872,"children":13873},{"class":393,"line":6870},[13874],{"type":42,"tag":391,"props":13875,"children":13876},{"style":6773},[13877],{"type":51,"value":6876},{"type":42,"tag":391,"props":13879,"children":13880},{"class":393,"line":6879},[13881],{"type":42,"tag":391,"props":13882,"children":13883},{"style":6773},[13884],{"type":51,"value":6963},{"type":42,"tag":391,"props":13886,"children":13887},{"class":393,"line":1707},[13888],{"type":42,"tag":391,"props":13889,"children":13890},{"emptyLinePlaceholder":13},[13891],{"type":51,"value":6972},{"type":42,"tag":391,"props":13893,"children":13894},{"class":393,"line":6896},[13895],{"type":42,"tag":391,"props":13896,"children":13897},{"style":515},[13898],{"type":51,"value":6981},{"type":42,"tag":391,"props":13900,"children":13901},{"class":393,"line":6905},[13902,13906,13911,13915],{"type":42,"tag":391,"props":13903,"children":13904},{"style":515},[13905],{"type":51,"value":10925},{"type":42,"tag":391,"props":13907,"children":13908},{"style":409},[13909],{"type":51,"value":13910},"(session_raw_date) ",{"type":42,"tag":391,"props":13912,"children":13913},{"style":515},[13914],{"type":51,"value":7194},{"type":42,"tag":391,"props":13916,"children":13917},{"style":409},[13918],{"type":51,"value":13758},{"type":42,"tag":391,"props":13920,"children":13921},{"class":393,"line":6913},[13922],{"type":42,"tag":391,"props":13923,"children":13924},{"style":6773},[13925],{"type":51,"value":13766},{"type":42,"tag":569,"props":13927,"children":13928},{"v-slot:snowflake":7},[13929,13939],{"type":42,"tag":43,"props":13930,"children":13931},{},[13932,13933,13938],{"type":51,"value":13611},{"type":42,"tag":240,"props":13934,"children":13936},{"className":13935},[],[13937],{"type":51,"value":10779},{"type":51,"value":13618},{"type":42,"tag":381,"props":13940,"children":13942},{"className":6761,"code":13941,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: staging.stg_web_sessions\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - raw.ga4_sessions       -- GA4: use raw.ga4_sessions and raw.ga4_events\n  - raw.ga4_events         -- Mixpanel: replace both with raw.mixpanel_events\ncolumns:\n  - name: session_date\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nSELECT\n    session_raw_date::DATE AS session_date,\n    -- ... rest of columns from source query above\n",[13943],{"type":42,"tag":240,"props":13944,"children":13945},{"__ignoreMap":7},[13946,13953,13960,13967,13974,13981,13988,13995,14002,14009,14016,14023,14030,14037,14044,14051,14058,14078],{"type":42,"tag":391,"props":13947,"children":13948},{"class":393,"line":176},[13949],{"type":42,"tag":391,"props":13950,"children":13951},{"style":6773},[13952],{"type":51,"value":6776},{"type":42,"tag":391,"props":13954,"children":13955},{"class":393,"line":99},[13956],{"type":42,"tag":391,"props":13957,"children":13958},{"style":6773},[13959],{"type":51,"value":13640},{"type":42,"tag":391,"props":13961,"children":13962},{"class":393,"line":439},[13963],{"type":42,"tag":391,"props":13964,"children":13965},{"style":6773},[13966],{"type":51,"value":6792},{"type":42,"tag":391,"props":13968,"children":13969},{"class":393,"line":947},[13970],{"type":42,"tag":391,"props":13971,"children":13972},{"style":6773},[13973],{"type":51,"value":6800},{"type":42,"tag":391,"props":13975,"children":13976},{"class":393,"line":960},[13977],{"type":42,"tag":391,"props":13978,"children":13979},{"style":6773},[13980],{"type":51,"value":6808},{"type":42,"tag":391,"props":13982,"children":13983},{"class":393,"line":984},[13984],{"type":42,"tag":391,"props":13985,"children":13986},{"style":6773},[13987],{"type":51,"value":6816},{"type":42,"tag":391,"props":13989,"children":13990},{"class":393,"line":1002},[13991],{"type":42,"tag":391,"props":13992,"children":13993},{"style":6773},[13994],{"type":51,"value":13676},{"type":42,"tag":391,"props":13996,"children":13997},{"class":393,"line":165},[13998],{"type":42,"tag":391,"props":13999,"children":14000},{"style":6773},[14001],{"type":51,"value":13684},{"type":42,"tag":391,"props":14003,"children":14004},{"class":393,"line":2235},[14005],{"type":42,"tag":391,"props":14006,"children":14007},{"style":6773},[14008],{"type":51,"value":6840},{"type":42,"tag":391,"props":14010,"children":14011},{"class":393,"line":6843},[14012],{"type":42,"tag":391,"props":14013,"children":14014},{"style":6773},[14015],{"type":51,"value":13699},{"type":42,"tag":391,"props":14017,"children":14018},{"class":393,"line":6852},[14019],{"type":42,"tag":391,"props":14020,"children":14021},{"style":6773},[14022],{"type":51,"value":10874},{"type":42,"tag":391,"props":14024,"children":14025},{"class":393,"line":6861},[14026],{"type":42,"tag":391,"props":14027,"children":14028},{"style":6773},[14029],{"type":51,"value":6867},{"type":42,"tag":391,"props":14031,"children":14032},{"class":393,"line":6870},[14033],{"type":42,"tag":391,"props":14034,"children":14035},{"style":6773},[14036],{"type":51,"value":6876},{"type":42,"tag":391,"props":14038,"children":14039},{"class":393,"line":6879},[14040],{"type":42,"tag":391,"props":14041,"children":14042},{"style":6773},[14043],{"type":51,"value":6963},{"type":42,"tag":391,"props":14045,"children":14046},{"class":393,"line":1707},[14047],{"type":42,"tag":391,"props":14048,"children":14049},{"emptyLinePlaceholder":13},[14050],{"type":51,"value":6972},{"type":42,"tag":391,"props":14052,"children":14053},{"class":393,"line":6896},[14054],{"type":42,"tag":391,"props":14055,"children":14056},{"style":515},[14057],{"type":51,"value":6981},{"type":42,"tag":391,"props":14059,"children":14060},{"class":393,"line":6905},[14061,14066,14070,14074],{"type":42,"tag":391,"props":14062,"children":14063},{"style":409},[14064],{"type":51,"value":14065},"    session_raw_date::",{"type":42,"tag":391,"props":14067,"children":14068},{"style":515},[14069],{"type":51,"value":9468},{"type":42,"tag":391,"props":14071,"children":14072},{"style":515},[14073],{"type":51,"value":7004},{"type":42,"tag":391,"props":14075,"children":14076},{"style":409},[14077],{"type":51,"value":13758},{"type":42,"tag":391,"props":14079,"children":14080},{"class":393,"line":6913},[14081],{"type":42,"tag":391,"props":14082,"children":14083},{"style":6773},[14084],{"type":51,"value":13766},{"type":42,"tag":339,"props":14086,"children":14087},{},[14088],{"type":42,"tag":43,"props":14089,"children":14090},{},[14091],{"type":51,"value":14092},"The web sessions query needs both the right source columns (GA4 vs Mixpanel) and the right date cast for your warehouse. Ask Claude Code to generate the combined SQL for your specific stack - it will inspect your raw tables and write the correct query.",{"type":42,"tag":361,"props":14094,"children":14096},{"id":14095},"validate-and-run-the-staging-layer",[14097],{"type":51,"value":14098},"Validate and run the staging layer",{"type":42,"tag":381,"props":14100,"children":14101},{"className":383,"code":1629,"language":385,"meta":7,"style":7},[14102],{"type":42,"tag":240,"props":14103,"children":14104},{"__ignoreMap":7},[14105],{"type":42,"tag":391,"props":14106,"children":14107},{"class":393,"line":176},[14108,14112,14116],{"type":42,"tag":391,"props":14109,"children":14110},{"style":397},[14111],{"type":51,"value":445},{"type":42,"tag":391,"props":14113,"children":14114},{"style":403},[14115],{"type":51,"value":1645},{"type":42,"tag":391,"props":14117,"children":14118},{"style":403},[14119],{"type":51,"value":1650},{"type":42,"tag":43,"props":14121,"children":14122},{},[14123],{"type":51,"value":14124},"Fix any errors, then run with the same small date range you used in Step 2:",{"type":42,"tag":381,"props":14126,"children":14127},{"className":383,"code":6105,"language":385,"meta":7,"style":7},[14128],{"type":42,"tag":240,"props":14129,"children":14130},{"__ignoreMap":7},[14131],{"type":42,"tag":391,"props":14132,"children":14133},{"class":393,"line":176},[14134,14138,14142,14146,14150,14154,14158],{"type":42,"tag":391,"props":14135,"children":14136},{"style":397},[14137],{"type":51,"value":445},{"type":42,"tag":391,"props":14139,"children":14140},{"style":403},[14141],{"type":51,"value":6121},{"type":42,"tag":391,"props":14143,"children":14144},{"style":415},[14145],{"type":51,"value":6126},{"type":42,"tag":391,"props":14147,"children":14148},{"style":403},[14149],{"type":51,"value":6131},{"type":42,"tag":391,"props":14151,"children":14152},{"style":415},[14153],{"type":51,"value":6136},{"type":42,"tag":391,"props":14155,"children":14156},{"style":403},[14157],{"type":51,"value":6141},{"type":42,"tag":391,"props":14159,"children":14160},{"style":403},[14161],{"type":51,"value":1650},{"type":42,"tag":43,"props":14163,"children":14164},{},[14165,14167,14171],{"type":51,"value":14166},"Bruin executes ",{"type":42,"tag":229,"props":14168,"children":14169},{"href":302},[14170],{"type":51,"value":305},{"type":51,"value":14172}," in dependency order - ingestors first, then staging. You can also run just one asset to test it:",{"type":42,"tag":381,"props":14174,"children":14176},{"className":383,"code":14175,"language":385,"meta":7,"style":7},"bruin run --start-date 2025-01-01 --end-date 2025-02-01 ecommerce\u002Fassets\u002Fstaging\u002Fstg_orders.sql\n",[14177],{"type":42,"tag":240,"props":14178,"children":14179},{"__ignoreMap":7},[14180],{"type":42,"tag":391,"props":14181,"children":14182},{"class":393,"line":176},[14183,14187,14191,14195,14199,14203,14207],{"type":42,"tag":391,"props":14184,"children":14185},{"style":397},[14186],{"type":51,"value":445},{"type":42,"tag":391,"props":14188,"children":14189},{"style":403},[14190],{"type":51,"value":6121},{"type":42,"tag":391,"props":14192,"children":14193},{"style":415},[14194],{"type":51,"value":6126},{"type":42,"tag":391,"props":14196,"children":14197},{"style":403},[14198],{"type":51,"value":6131},{"type":42,"tag":391,"props":14200,"children":14201},{"style":415},[14202],{"type":51,"value":6136},{"type":42,"tag":391,"props":14204,"children":14205},{"style":403},[14206],{"type":51,"value":6141},{"type":42,"tag":391,"props":14208,"children":14209},{"style":403},[14210],{"type":51,"value":14211}," ecommerce\u002Fassets\u002Fstaging\u002Fstg_orders.sql\n",{"type":42,"tag":361,"props":14213,"children":14215},{"id":14214},"ask-claude-code-to-validate-and-troubleshoot",[14216],{"type":51,"value":14217},"Ask Claude Code to validate and troubleshoot",{"type":42,"tag":43,"props":14219,"children":14220},{},[14221],{"type":51,"value":14222},"After creating the staging assets, ask Claude Code to check everything:",{"type":42,"tag":1574,"props":14224,"children":14225},{},[14226],{"type":42,"tag":43,"props":14227,"children":14228},{},[14229],{"type":51,"value":14230},"Run bruin validate on the project. If there are errors in the staging SQL files, look at the raw table schemas and fix the column names.",{"type":42,"tag":43,"props":14232,"children":14233},{},[14234],{"type":51,"value":14235},"If a query fails at runtime, Claude Code can inspect the error and the actual table data:",{"type":42,"tag":1574,"props":14237,"children":14238},{},[14239],{"type":42,"tag":43,"props":14240,"children":14241},{},[14242],{"type":51,"value":14243},"The stg_customers asset failed. Query the raw.shopify_customers table to check what columns are actually available, and fix the SQL.",{"type":42,"tag":86,"props":14245,"children":14246},{"id":1671},[14247],{"type":51,"value":1674},{"type":42,"tag":214,"props":14249,"children":14250},{},[14251,14261,14294,14304],{"type":42,"tag":218,"props":14252,"children":14253},{},[14254,14259],{"type":42,"tag":47,"props":14255,"children":14256},{},[14257],{"type":51,"value":14258},"5 staging tables",{"type":51,"value":14260}," normalize data from your connected SaaS tools into a consistent format",{"type":42,"tag":218,"props":14262,"children":14263},{},[14264,14271,14272,14278,14279,14285,14286,14292],{"type":42,"tag":47,"props":14265,"children":14266},{},[14267],{"type":42,"tag":229,"props":14268,"children":14269},{"href":302},[14270],{"type":51,"value":6382},{"type":51,"value":8607},{"type":42,"tag":240,"props":14273,"children":14275},{"className":14274},[],[14276],{"type":51,"value":14277},"not_null",{"type":51,"value":292},{"type":42,"tag":240,"props":14280,"children":14282},{"className":14281},[],[14283],{"type":51,"value":14284},"unique",{"type":51,"value":292},{"type":42,"tag":240,"props":14287,"children":14289},{"className":14288},[],[14290],{"type":51,"value":14291},"has_rows",{"type":51,"value":14293},") run automatically after each asset",{"type":42,"tag":218,"props":14295,"children":14296},{},[14297,14302],{"type":42,"tag":47,"props":14298,"children":14299},{},[14300],{"type":51,"value":14301},"Dependencies",{"type":51,"value":14303}," make sure staging assets wait for their source ingestors to finish",{"type":42,"tag":218,"props":14305,"children":14306},{},[14307,14315,14317,14323],{"type":42,"tag":47,"props":14308,"children":14309},{},[14310],{"type":42,"tag":229,"props":14311,"children":14312},{"href":302},[14313],{"type":51,"value":14314},"Materialization",{"type":51,"value":14316}," is set to ",{"type":42,"tag":240,"props":14318,"children":14320},{"className":14319},[],[14321],{"type":51,"value":14322},"table",{"type":51,"value":14324}," - each run rebuilds the staging tables from scratch for consistency",{"type":42,"tag":43,"props":14326,"children":14327},{},[14328,14330,14335],{"type":51,"value":14329},"Your ",{"type":42,"tag":229,"props":14331,"children":14332},{"href":295},[14333],{"type":51,"value":14334},"pipeline",{"type":51,"value":14336}," now has two layers: ingestion and staging. Next, you'll add the report layer on top.",{"type":42,"tag":1681,"props":14338,"children":14339},{},[14340],{"type":51,"value":1685},{"title":7,"searchDepth":99,"depth":99,"links":14342},[14343,14344,14345,14360],{"id":193,"depth":99,"text":196},{"id":324,"depth":99,"text":327},{"id":356,"depth":99,"text":359,"children":14346},[14347,14348,14350,14352,14354,14356,14358,14359],{"id":6456,"depth":439,"text":6459},{"id":6634,"depth":439,"text":14349},"1) Staged orders - stg_orders.sql",{"id":9516,"depth":439,"text":14351},"2) Staged customers - stg_customers.sql",{"id":10333,"depth":439,"text":14353},"3) Staged products - stg_products.sql",{"id":10725,"depth":439,"text":14355},"4) Staged marketing spend - stg_marketing_spend.sql",{"id":12467,"depth":439,"text":14357},"5) Staged web sessions - stg_web_sessions.sql",{"id":14095,"depth":439,"text":14098},{"id":14214,"depth":439,"text":14217},{"id":1671,"depth":99,"text":1674},"content:tutorials:ecommerce-pipeline:data-preparation.md","tutorials\u002Fecommerce-pipeline\u002Fdata-preparation.md","tutorials\u002Fecommerce-pipeline\u002Fdata-preparation",{"_path":14365,"_dir":12,"_draft":6,"_partial":6,"_locale":7,"title":14366,"description":14367,"date":10,"readingTime":1707,"category":166,"tags":14368,"difficulty":6374,"module":12,"subSteps":13,"step":947,"journeys":14370,"variants":14371,"learnMore":14372,"author":14375,"body":14376,"_type":102,"_id":27667,"_source":104,"_file":27668,"_stem":27669,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline\u002Fbuild-reports","Build Ecommerce Reports","Create report tables for daily revenue, customer cohorts, product performance, marketing ROI, and a unified KPI dashboard.",[168,169,6373,171,172,173,14369,174],"Analytics",[179,180],[171,172,173],[14373,14374],{"label":6379,"url":6380},{"label":6382,"url":6383},{"name":35,"role":36,"image":37},{"type":39,"children":14377,"toc":27647},[14378,14382,14387,14391,14396,14400,14412,14435,14441,14446,14454,14459,14467,14472,14484,14489,14503,16448,16460,16465,16479,19291,19303,19308,19330,19344,19558,19570,19575,19589,23531,23543,23548,23562,27353,27359,27364,27401,27419,27424,27463,27476,27519,27524,27545,27551,27556,27564,27572,27580,27585,27593,27597,27638,27643],{"type":42,"tag":86,"props":14379,"children":14380},{"id":193},[14381],{"type":51,"value":196},{"type":42,"tag":43,"props":14383,"children":14384},{},[14385],{"type":51,"value":14386},"Build five report tables on top of the staging layer: daily revenue, customer cohorts, product performance, marketing ROI, and a unified daily KPI dashboard.",{"type":42,"tag":86,"props":14388,"children":14389},{"id":324},[14390],{"type":51,"value":327},{"type":42,"tag":43,"props":14392,"children":14393},{},[14394],{"type":51,"value":14395},"Staging tables are clean but they're not answers. They tell you \"what happened\" but not \"how is the business doing.\" Report tables compute the metrics teams actually care about - revenue trends, retention rates, ROAS, and the daily numbers that inform decisions.",{"type":42,"tag":86,"props":14397,"children":14398},{"id":356},[14399],{"type":51,"value":359},{"type":42,"tag":43,"props":14401,"children":14402},{},[14403,14404,14410],{"type":51,"value":6421},{"type":42,"tag":240,"props":14405,"children":14407},{"className":14406},[],[14408],{"type":51,"value":14409},"reports\u002F",{"type":51,"value":14411}," subfolder:",{"type":42,"tag":381,"props":14413,"children":14415},{"className":383,"code":14414,"language":385,"meta":7,"style":7},"mkdir -p ecommerce\u002Fassets\u002Freports\n",[14416],{"type":42,"tag":240,"props":14417,"children":14418},{"__ignoreMap":7},[14419],{"type":42,"tag":391,"props":14420,"children":14421},{"class":393,"line":176},[14422,14426,14430],{"type":42,"tag":391,"props":14423,"children":14424},{"style":397},[14425],{"type":51,"value":400},{"type":42,"tag":391,"props":14427,"children":14428},{"style":415},[14429],{"type":51,"value":6448},{"type":42,"tag":391,"props":14431,"children":14432},{"style":403},[14433],{"type":51,"value":14434}," ecommerce\u002Fassets\u002Freports\n",{"type":42,"tag":361,"props":14436,"children":14438},{"id":14437},"let-claude-code-help-with-report-sql",[14439],{"type":51,"value":14440},"Let Claude Code help with report SQL",{"type":42,"tag":43,"props":14442,"children":14443},{},[14444],{"type":51,"value":14445},"Report queries can get complex, especially cohort retention and marketing attribution. You can ask Claude Code to generate any of these:",{"type":42,"tag":1574,"props":14447,"children":14448},{},[14449],{"type":42,"tag":43,"props":14450,"children":14451},{},[14452],{"type":51,"value":14453},"Create a Bruin SQL asset for a daily revenue report. It should read from staging.stg_orders and compute total orders, paid orders, gross and net revenue, AOV, and cancellation rate grouped by day. Add quality checks. Put it in ecommerce\u002Fassets\u002Freports\u002Frpt_daily_revenue.sql.",{"type":42,"tag":43,"props":14455,"children":14456},{},[14457],{"type":51,"value":14458},"For the harder reports:",{"type":42,"tag":1574,"props":14460,"children":14461},{},[14462],{"type":42,"tag":43,"props":14463,"children":14464},{},[14465],{"type":51,"value":14466},"Write a monthly customer cohort retention query using staging.stg_orders and staging.stg_customers. Group by the month of first purchase, compute retention rate and revenue per customer for each month since first order.",{"type":42,"tag":43,"props":14468,"children":14469},{},[14470],{"type":51,"value":14471},"The examples below show what each report should look like. Select the tab that matches your warehouse.",{"type":42,"tag":361,"props":14473,"children":14475},{"id":14474},"_1-daily-revenue-rpt_daily_revenuesql",[14476,14478],{"type":51,"value":14477},"1) Daily revenue - ",{"type":42,"tag":240,"props":14479,"children":14481},{"className":14480},[],[14482],{"type":51,"value":14483},"rpt_daily_revenue.sql",{"type":42,"tag":43,"props":14485,"children":14486},{},[14487],{"type":51,"value":14488},"The most basic ecommerce report: daily revenue, order count, average order value, and cancellation rate.",{"type":42,"tag":43,"props":14490,"children":14491},{},[14492,14493,14502],{"type":51,"value":6741},{"type":42,"tag":47,"props":14494,"children":14495},{},[14496],{"type":42,"tag":240,"props":14497,"children":14499},{"className":14498},[],[14500],{"type":51,"value":14501},"ecommerce\u002Fassets\u002Freports\u002Frpt_daily_revenue.sql",{"type":51,"value":6752},{"type":42,"tag":563,"props":14504,"children":14505},{":variants":565,"group":566},[14506,15054,15719],{"type":42,"tag":569,"props":14507,"children":14508},{"v-slot:clickhouse":7},[14509],{"type":42,"tag":381,"props":14510,"children":14512},{"className":6761,"code":14511,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_daily_revenue\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_orders\ncolumns:\n  - name: order_date\n    type: date\n    checks:\n      - name: not_null\n      - name: unique\ncustom_checks:\n  - name: has_rows\n    query: \"SELECT count(*) > 0 FROM reports.rpt_daily_revenue\"\n    value: 1\n@bruin *\u002F\n\nSELECT\n    toDate(order_date) AS order_date,\n    count(*) AS total_orders,\n    countIf(payment_status = 'paid') AS paid_orders,\n    countIf(cancel_reason IS NOT NULL) AS cancelled_orders,\n    sum(order_total) AS gross_revenue,\n    sum(CASE WHEN payment_status = 'paid' THEN order_total ELSE 0 END) AS net_revenue,\n    sum(discount_amount) AS total_discounts,\n    sum(tax_amount) AS total_tax,\n    round(net_revenue \u002F nullIf(paid_orders, 0), 2) AS avg_order_value,\n    round(cancelled_orders \u002F nullIf(total_orders, 0) * 100, 2) AS cancellation_rate\nFROM staging.stg_orders\nGROUP BY toDate(order_date)\nORDER BY order_date\n",[14513],{"type":42,"tag":240,"props":14514,"children":14515},{"__ignoreMap":7},[14516,14523,14531,14538,14545,14552,14559,14567,14574,14581,14588,14595,14602,14609,14616,14623,14631,14638,14645,14652,14659,14675,14704,14734,14760,14782,14850,14871,14892,14946,15008,15029,15041],{"type":42,"tag":391,"props":14517,"children":14518},{"class":393,"line":176},[14519],{"type":42,"tag":391,"props":14520,"children":14521},{"style":6773},[14522],{"type":51,"value":6776},{"type":42,"tag":391,"props":14524,"children":14525},{"class":393,"line":99},[14526],{"type":42,"tag":391,"props":14527,"children":14528},{"style":6773},[14529],{"type":51,"value":14530},"name: reports.rpt_daily_revenue\n",{"type":42,"tag":391,"props":14532,"children":14533},{"class":393,"line":439},[14534],{"type":42,"tag":391,"props":14535,"children":14536},{"style":6773},[14537],{"type":51,"value":6792},{"type":42,"tag":391,"props":14539,"children":14540},{"class":393,"line":947},[14541],{"type":42,"tag":391,"props":14542,"children":14543},{"style":6773},[14544],{"type":51,"value":6800},{"type":42,"tag":391,"props":14546,"children":14547},{"class":393,"line":960},[14548],{"type":42,"tag":391,"props":14549,"children":14550},{"style":6773},[14551],{"type":51,"value":6808},{"type":42,"tag":391,"props":14553,"children":14554},{"class":393,"line":984},[14555],{"type":42,"tag":391,"props":14556,"children":14557},{"style":6773},[14558],{"type":51,"value":6816},{"type":42,"tag":391,"props":14560,"children":14561},{"class":393,"line":1002},[14562],{"type":42,"tag":391,"props":14563,"children":14564},{"style":6773},[14565],{"type":51,"value":14566},"  - staging.stg_orders\n",{"type":42,"tag":391,"props":14568,"children":14569},{"class":393,"line":165},[14570],{"type":42,"tag":391,"props":14571,"children":14572},{"style":6773},[14573],{"type":51,"value":6840},{"type":42,"tag":391,"props":14575,"children":14576},{"class":393,"line":2235},[14577],{"type":42,"tag":391,"props":14578,"children":14579},{"style":6773},[14580],{"type":51,"value":6893},{"type":42,"tag":391,"props":14582,"children":14583},{"class":393,"line":6843},[14584],{"type":42,"tag":391,"props":14585,"children":14586},{"style":6773},[14587],{"type":51,"value":10874},{"type":42,"tag":391,"props":14589,"children":14590},{"class":393,"line":6852},[14591],{"type":42,"tag":391,"props":14592,"children":14593},{"style":6773},[14594],{"type":51,"value":6867},{"type":42,"tag":391,"props":14596,"children":14597},{"class":393,"line":6861},[14598],{"type":42,"tag":391,"props":14599,"children":14600},{"style":6773},[14601],{"type":51,"value":6876},{"type":42,"tag":391,"props":14603,"children":14604},{"class":393,"line":6870},[14605],{"type":42,"tag":391,"props":14606,"children":14607},{"style":6773},[14608],{"type":51,"value":6885},{"type":42,"tag":391,"props":14610,"children":14611},{"class":393,"line":6879},[14612],{"type":42,"tag":391,"props":14613,"children":14614},{"style":6773},[14615],{"type":51,"value":6927},{"type":42,"tag":391,"props":14617,"children":14618},{"class":393,"line":1707},[14619],{"type":42,"tag":391,"props":14620,"children":14621},{"style":6773},[14622],{"type":51,"value":6936},{"type":42,"tag":391,"props":14624,"children":14625},{"class":393,"line":6896},[14626],{"type":42,"tag":391,"props":14627,"children":14628},{"style":6773},[14629],{"type":51,"value":14630},"    query: \"SELECT count(*) > 0 FROM reports.rpt_daily_revenue\"\n",{"type":42,"tag":391,"props":14632,"children":14633},{"class":393,"line":6905},[14634],{"type":42,"tag":391,"props":14635,"children":14636},{"style":6773},[14637],{"type":51,"value":6954},{"type":42,"tag":391,"props":14639,"children":14640},{"class":393,"line":6913},[14641],{"type":42,"tag":391,"props":14642,"children":14643},{"style":6773},[14644],{"type":51,"value":6963},{"type":42,"tag":391,"props":14646,"children":14647},{"class":393,"line":6921},[14648],{"type":42,"tag":391,"props":14649,"children":14650},{"emptyLinePlaceholder":13},[14651],{"type":51,"value":6972},{"type":42,"tag":391,"props":14653,"children":14654},{"class":393,"line":6930},[14655],{"type":42,"tag":391,"props":14656,"children":14657},{"style":515},[14658],{"type":51,"value":6981},{"type":42,"tag":391,"props":14660,"children":14661},{"class":393,"line":6939},[14662,14667,14671],{"type":42,"tag":391,"props":14663,"children":14664},{"style":409},[14665],{"type":51,"value":14666},"    toDate(order_date) ",{"type":42,"tag":391,"props":14668,"children":14669},{"style":515},[14670],{"type":51,"value":7194},{"type":42,"tag":391,"props":14672,"children":14673},{"style":409},[14674],{"type":51,"value":7083},{"type":42,"tag":391,"props":14676,"children":14677},{"class":393,"line":6948},[14678,14683,14687,14691,14695,14699],{"type":42,"tag":391,"props":14679,"children":14680},{"style":415},[14681],{"type":51,"value":14682},"    count",{"type":42,"tag":391,"props":14684,"children":14685},{"style":409},[14686],{"type":51,"value":7143},{"type":42,"tag":391,"props":14688,"children":14689},{"style":515},[14690],{"type":51,"value":13108},{"type":42,"tag":391,"props":14692,"children":14693},{"style":409},[14694],{"type":51,"value":7672},{"type":42,"tag":391,"props":14696,"children":14697},{"style":515},[14698],{"type":51,"value":7194},{"type":42,"tag":391,"props":14700,"children":14701},{"style":409},[14702],{"type":51,"value":14703}," total_orders,\n",{"type":42,"tag":391,"props":14705,"children":14706},{"class":393,"line":6957},[14707,14712,14716,14721,14725,14729],{"type":42,"tag":391,"props":14708,"children":14709},{"style":409},[14710],{"type":51,"value":14711},"    countIf(payment_status ",{"type":42,"tag":391,"props":14713,"children":14714},{"style":515},[14715],{"type":51,"value":7677},{"type":42,"tag":391,"props":14717,"children":14718},{"style":403},[14719],{"type":51,"value":14720}," 'paid'",{"type":42,"tag":391,"props":14722,"children":14723},{"style":409},[14724],{"type":51,"value":7672},{"type":42,"tag":391,"props":14726,"children":14727},{"style":515},[14728],{"type":51,"value":7194},{"type":42,"tag":391,"props":14730,"children":14731},{"style":409},[14732],{"type":51,"value":14733}," paid_orders,\n",{"type":42,"tag":391,"props":14735,"children":14736},{"class":393,"line":6966},[14737,14742,14747,14751,14755],{"type":42,"tag":391,"props":14738,"children":14739},{"style":409},[14740],{"type":51,"value":14741},"    countIf(cancel_reason ",{"type":42,"tag":391,"props":14743,"children":14744},{"style":515},[14745],{"type":51,"value":14746},"IS NOT NULL",{"type":42,"tag":391,"props":14748,"children":14749},{"style":409},[14750],{"type":51,"value":7672},{"type":42,"tag":391,"props":14752,"children":14753},{"style":515},[14754],{"type":51,"value":7194},{"type":42,"tag":391,"props":14756,"children":14757},{"style":409},[14758],{"type":51,"value":14759}," cancelled_orders,\n",{"type":42,"tag":391,"props":14761,"children":14762},{"class":393,"line":6975},[14763,14768,14773,14777],{"type":42,"tag":391,"props":14764,"children":14765},{"style":415},[14766],{"type":51,"value":14767},"    sum",{"type":42,"tag":391,"props":14769,"children":14770},{"style":409},[14771],{"type":51,"value":14772},"(order_total) ",{"type":42,"tag":391,"props":14774,"children":14775},{"style":515},[14776],{"type":51,"value":7194},{"type":42,"tag":391,"props":14778,"children":14779},{"style":409},[14780],{"type":51,"value":14781}," gross_revenue,\n",{"type":42,"tag":391,"props":14783,"children":14784},{"class":393,"line":6984},[14785,14789,14793,14797,14801,14806,14810,14814,14818,14823,14828,14833,14837,14841,14845],{"type":42,"tag":391,"props":14786,"children":14787},{"style":415},[14788],{"type":51,"value":14767},{"type":42,"tag":391,"props":14790,"children":14791},{"style":409},[14792],{"type":51,"value":7143},{"type":42,"tag":391,"props":14794,"children":14795},{"style":515},[14796],{"type":51,"value":12546},{"type":42,"tag":391,"props":14798,"children":14799},{"style":515},[14800],{"type":51,"value":13140},{"type":42,"tag":391,"props":14802,"children":14803},{"style":409},[14804],{"type":51,"value":14805}," payment_status ",{"type":42,"tag":391,"props":14807,"children":14808},{"style":515},[14809],{"type":51,"value":7677},{"type":42,"tag":391,"props":14811,"children":14812},{"style":403},[14813],{"type":51,"value":14720},{"type":42,"tag":391,"props":14815,"children":14816},{"style":515},[14817],{"type":51,"value":12735},{"type":42,"tag":391,"props":14819,"children":14820},{"style":409},[14821],{"type":51,"value":14822}," order_total ",{"type":42,"tag":391,"props":14824,"children":14825},{"style":515},[14826],{"type":51,"value":14827},"ELSE",{"type":42,"tag":391,"props":14829,"children":14830},{"style":415},[14831],{"type":51,"value":14832}," 0",{"type":42,"tag":391,"props":14834,"children":14835},{"style":515},[14836],{"type":51,"value":13177},{"type":42,"tag":391,"props":14838,"children":14839},{"style":409},[14840],{"type":51,"value":7672},{"type":42,"tag":391,"props":14842,"children":14843},{"style":515},[14844],{"type":51,"value":7194},{"type":42,"tag":391,"props":14846,"children":14847},{"style":409},[14848],{"type":51,"value":14849}," net_revenue,\n",{"type":42,"tag":391,"props":14851,"children":14852},{"class":393,"line":7012},[14853,14857,14862,14866],{"type":42,"tag":391,"props":14854,"children":14855},{"style":415},[14856],{"type":51,"value":14767},{"type":42,"tag":391,"props":14858,"children":14859},{"style":409},[14860],{"type":51,"value":14861},"(discount_amount) ",{"type":42,"tag":391,"props":14863,"children":14864},{"style":515},[14865],{"type":51,"value":7194},{"type":42,"tag":391,"props":14867,"children":14868},{"style":409},[14869],{"type":51,"value":14870}," total_discounts,\n",{"type":42,"tag":391,"props":14872,"children":14873},{"class":393,"line":7034},[14874,14878,14883,14887],{"type":42,"tag":391,"props":14875,"children":14876},{"style":415},[14877],{"type":51,"value":14767},{"type":42,"tag":391,"props":14879,"children":14880},{"style":409},[14881],{"type":51,"value":14882},"(tax_amount) ",{"type":42,"tag":391,"props":14884,"children":14885},{"style":515},[14886],{"type":51,"value":7194},{"type":42,"tag":391,"props":14888,"children":14889},{"style":409},[14890],{"type":51,"value":14891}," total_tax,\n",{"type":42,"tag":391,"props":14893,"children":14894},{"class":393,"line":7060},[14895,14900,14905,14910,14915,14920,14924,14929,14933,14937,14941],{"type":42,"tag":391,"props":14896,"children":14897},{"style":415},[14898],{"type":51,"value":14899},"    round",{"type":42,"tag":391,"props":14901,"children":14902},{"style":409},[14903],{"type":51,"value":14904},"(net_revenue ",{"type":42,"tag":391,"props":14906,"children":14907},{"style":515},[14908],{"type":51,"value":14909},"\u002F",{"type":42,"tag":391,"props":14911,"children":14912},{"style":415},[14913],{"type":51,"value":14914}," nullIf",{"type":42,"tag":391,"props":14916,"children":14917},{"style":409},[14918],{"type":51,"value":14919},"(paid_orders, ",{"type":42,"tag":391,"props":14921,"children":14922},{"style":415},[14923],{"type":51,"value":7485},{"type":42,"tag":391,"props":14925,"children":14926},{"style":409},[14927],{"type":51,"value":14928},"), ",{"type":42,"tag":391,"props":14930,"children":14931},{"style":415},[14932],{"type":51,"value":7184},{"type":42,"tag":391,"props":14934,"children":14935},{"style":409},[14936],{"type":51,"value":7672},{"type":42,"tag":391,"props":14938,"children":14939},{"style":515},[14940],{"type":51,"value":7194},{"type":42,"tag":391,"props":14942,"children":14943},{"style":409},[14944],{"type":51,"value":14945}," avg_order_value,\n",{"type":42,"tag":391,"props":14947,"children":14948},{"class":393,"line":7086},[14949,14953,14958,14962,14966,14971,14975,14979,14983,14987,14991,14995,14999,15003],{"type":42,"tag":391,"props":14950,"children":14951},{"style":415},[14952],{"type":51,"value":14899},{"type":42,"tag":391,"props":14954,"children":14955},{"style":409},[14956],{"type":51,"value":14957},"(cancelled_orders ",{"type":42,"tag":391,"props":14959,"children":14960},{"style":515},[14961],{"type":51,"value":14909},{"type":42,"tag":391,"props":14963,"children":14964},{"style":415},[14965],{"type":51,"value":14914},{"type":42,"tag":391,"props":14967,"children":14968},{"style":409},[14969],{"type":51,"value":14970},"(total_orders, ",{"type":42,"tag":391,"props":14972,"children":14973},{"style":415},[14974],{"type":51,"value":7485},{"type":42,"tag":391,"props":14976,"children":14977},{"style":409},[14978],{"type":51,"value":7672},{"type":42,"tag":391,"props":14980,"children":14981},{"style":515},[14982],{"type":51,"value":13108},{"type":42,"tag":391,"props":14984,"children":14985},{"style":415},[14986],{"type":51,"value":7476},{"type":42,"tag":391,"props":14988,"children":14989},{"style":409},[14990],{"type":51,"value":292},{"type":42,"tag":391,"props":14992,"children":14993},{"style":415},[14994],{"type":51,"value":7184},{"type":42,"tag":391,"props":14996,"children":14997},{"style":409},[14998],{"type":51,"value":7672},{"type":42,"tag":391,"props":15000,"children":15001},{"style":515},[15002],{"type":51,"value":7194},{"type":42,"tag":391,"props":15004,"children":15005},{"style":409},[15006],{"type":51,"value":15007}," cancellation_rate\n",{"type":42,"tag":391,"props":15009,"children":15010},{"class":393,"line":7111},[15011,15015,15020,15024],{"type":42,"tag":391,"props":15012,"children":15013},{"style":515},[15014],{"type":51,"value":7555},{"type":42,"tag":391,"props":15016,"children":15017},{"style":415},[15018],{"type":51,"value":15019}," staging",{"type":42,"tag":391,"props":15021,"children":15022},{"style":409},[15023],{"type":51,"value":247},{"type":42,"tag":391,"props":15025,"children":15026},{"style":415},[15027],{"type":51,"value":15028},"stg_orders\n",{"type":42,"tag":391,"props":15030,"children":15031},{"class":393,"line":7132},[15032,15036],{"type":42,"tag":391,"props":15033,"children":15034},{"style":515},[15035],{"type":51,"value":13556},{"type":42,"tag":391,"props":15037,"children":15038},{"style":409},[15039],{"type":51,"value":15040}," toDate(order_date)\n",{"type":42,"tag":391,"props":15042,"children":15043},{"class":393,"line":7202},[15044,15049],{"type":42,"tag":391,"props":15045,"children":15046},{"style":515},[15047],{"type":51,"value":15048},"ORDER BY",{"type":42,"tag":391,"props":15050,"children":15051},{"style":409},[15052],{"type":51,"value":15053}," order_date\n",{"type":42,"tag":569,"props":15055,"children":15056},{"v-slot:bigquery":7},[15057],{"type":42,"tag":381,"props":15058,"children":15060},{"className":6761,"code":15059,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_daily_revenue\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_orders\ncolumns:\n  - name: order_date\n    type: date\n    checks:\n      - name: not_null\n      - name: unique\ncustom_checks:\n  - name: has_rows\n    query: \"SELECT count(*) > 0 FROM reports.rpt_daily_revenue\"\n    value: 1\n@bruin *\u002F\n\nSELECT\n    DATE(order_date) AS order_date,\n    count(*) AS total_orders,\n    COUNTIF(payment_status = 'paid') AS paid_orders,\n    COUNTIF(cancel_reason IS NOT NULL) AS cancelled_orders,\n    sum(order_total) AS gross_revenue,\n    sum(CASE WHEN payment_status = 'paid' THEN order_total ELSE 0 END) AS net_revenue,\n    sum(discount_amount) AS total_discounts,\n    sum(tax_amount) AS total_tax,\n    round(sum(CASE WHEN payment_status = 'paid' THEN order_total ELSE 0 END) \u002F NULLIF(COUNTIF(payment_status = 'paid'), 0), 2) AS avg_order_value,\n    round(COUNTIF(cancel_reason IS NOT NULL) \u002F NULLIF(count(*), 0) * 100, 2) AS cancellation_rate\nFROM staging.stg_orders o\nWHERE o.financial_status IN ('paid', 'partially_refunded')\nGROUP BY DATE(order_date)\nORDER BY order_date\n",[15061],{"type":42,"tag":240,"props":15062,"children":15063},{"__ignoreMap":7},[15064,15071,15078,15085,15092,15099,15106,15113,15120,15127,15134,15141,15148,15155,15162,15169,15176,15183,15190,15197,15204,15224,15251,15279,15303,15322,15385,15404,15423,15537,15622,15646,15692,15708],{"type":42,"tag":391,"props":15065,"children":15066},{"class":393,"line":176},[15067],{"type":42,"tag":391,"props":15068,"children":15069},{"style":6773},[15070],{"type":51,"value":6776},{"type":42,"tag":391,"props":15072,"children":15073},{"class":393,"line":99},[15074],{"type":42,"tag":391,"props":15075,"children":15076},{"style":6773},[15077],{"type":51,"value":14530},{"type":42,"tag":391,"props":15079,"children":15080},{"class":393,"line":439},[15081],{"type":42,"tag":391,"props":15082,"children":15083},{"style":6773},[15084],{"type":51,"value":6792},{"type":42,"tag":391,"props":15086,"children":15087},{"class":393,"line":947},[15088],{"type":42,"tag":391,"props":15089,"children":15090},{"style":6773},[15091],{"type":51,"value":6800},{"type":42,"tag":391,"props":15093,"children":15094},{"class":393,"line":960},[15095],{"type":42,"tag":391,"props":15096,"children":15097},{"style":6773},[15098],{"type":51,"value":6808},{"type":42,"tag":391,"props":15100,"children":15101},{"class":393,"line":984},[15102],{"type":42,"tag":391,"props":15103,"children":15104},{"style":6773},[15105],{"type":51,"value":6816},{"type":42,"tag":391,"props":15107,"children":15108},{"class":393,"line":1002},[15109],{"type":42,"tag":391,"props":15110,"children":15111},{"style":6773},[15112],{"type":51,"value":14566},{"type":42,"tag":391,"props":15114,"children":15115},{"class":393,"line":165},[15116],{"type":42,"tag":391,"props":15117,"children":15118},{"style":6773},[15119],{"type":51,"value":6840},{"type":42,"tag":391,"props":15121,"children":15122},{"class":393,"line":2235},[15123],{"type":42,"tag":391,"props":15124,"children":15125},{"style":6773},[15126],{"type":51,"value":6893},{"type":42,"tag":391,"props":15128,"children":15129},{"class":393,"line":6843},[15130],{"type":42,"tag":391,"props":15131,"children":15132},{"style":6773},[15133],{"type":51,"value":10874},{"type":42,"tag":391,"props":15135,"children":15136},{"class":393,"line":6852},[15137],{"type":42,"tag":391,"props":15138,"children":15139},{"style":6773},[15140],{"type":51,"value":6867},{"type":42,"tag":391,"props":15142,"children":15143},{"class":393,"line":6861},[15144],{"type":42,"tag":391,"props":15145,"children":15146},{"style":6773},[15147],{"type":51,"value":6876},{"type":42,"tag":391,"props":15149,"children":15150},{"class":393,"line":6870},[15151],{"type":42,"tag":391,"props":15152,"children":15153},{"style":6773},[15154],{"type":51,"value":6885},{"type":42,"tag":391,"props":15156,"children":15157},{"class":393,"line":6879},[15158],{"type":42,"tag":391,"props":15159,"children":15160},{"style":6773},[15161],{"type":51,"value":6927},{"type":42,"tag":391,"props":15163,"children":15164},{"class":393,"line":1707},[15165],{"type":42,"tag":391,"props":15166,"children":15167},{"style":6773},[15168],{"type":51,"value":6936},{"type":42,"tag":391,"props":15170,"children":15171},{"class":393,"line":6896},[15172],{"type":42,"tag":391,"props":15173,"children":15174},{"style":6773},[15175],{"type":51,"value":14630},{"type":42,"tag":391,"props":15177,"children":15178},{"class":393,"line":6905},[15179],{"type":42,"tag":391,"props":15180,"children":15181},{"style":6773},[15182],{"type":51,"value":6954},{"type":42,"tag":391,"props":15184,"children":15185},{"class":393,"line":6913},[15186],{"type":42,"tag":391,"props":15187,"children":15188},{"style":6773},[15189],{"type":51,"value":6963},{"type":42,"tag":391,"props":15191,"children":15192},{"class":393,"line":6921},[15193],{"type":42,"tag":391,"props":15194,"children":15195},{"emptyLinePlaceholder":13},[15196],{"type":51,"value":6972},{"type":42,"tag":391,"props":15198,"children":15199},{"class":393,"line":6930},[15200],{"type":42,"tag":391,"props":15201,"children":15202},{"style":515},[15203],{"type":51,"value":6981},{"type":42,"tag":391,"props":15205,"children":15206},{"class":393,"line":6939},[15207,15211,15216,15220],{"type":42,"tag":391,"props":15208,"children":15209},{"style":515},[15210],{"type":51,"value":10925},{"type":42,"tag":391,"props":15212,"children":15213},{"style":409},[15214],{"type":51,"value":15215},"(order_date) ",{"type":42,"tag":391,"props":15217,"children":15218},{"style":515},[15219],{"type":51,"value":7194},{"type":42,"tag":391,"props":15221,"children":15222},{"style":409},[15223],{"type":51,"value":7083},{"type":42,"tag":391,"props":15225,"children":15226},{"class":393,"line":6948},[15227,15231,15235,15239,15243,15247],{"type":42,"tag":391,"props":15228,"children":15229},{"style":415},[15230],{"type":51,"value":14682},{"type":42,"tag":391,"props":15232,"children":15233},{"style":409},[15234],{"type":51,"value":7143},{"type":42,"tag":391,"props":15236,"children":15237},{"style":515},[15238],{"type":51,"value":13108},{"type":42,"tag":391,"props":15240,"children":15241},{"style":409},[15242],{"type":51,"value":7672},{"type":42,"tag":391,"props":15244,"children":15245},{"style":515},[15246],{"type":51,"value":7194},{"type":42,"tag":391,"props":15248,"children":15249},{"style":409},[15250],{"type":51,"value":14703},{"type":42,"tag":391,"props":15252,"children":15253},{"class":393,"line":6957},[15254,15259,15263,15267,15271,15275],{"type":42,"tag":391,"props":15255,"children":15256},{"style":409},[15257],{"type":51,"value":15258},"    COUNTIF(payment_status ",{"type":42,"tag":391,"props":15260,"children":15261},{"style":515},[15262],{"type":51,"value":7677},{"type":42,"tag":391,"props":15264,"children":15265},{"style":403},[15266],{"type":51,"value":14720},{"type":42,"tag":391,"props":15268,"children":15269},{"style":409},[15270],{"type":51,"value":7672},{"type":42,"tag":391,"props":15272,"children":15273},{"style":515},[15274],{"type":51,"value":7194},{"type":42,"tag":391,"props":15276,"children":15277},{"style":409},[15278],{"type":51,"value":14733},{"type":42,"tag":391,"props":15280,"children":15281},{"class":393,"line":6966},[15282,15287,15291,15295,15299],{"type":42,"tag":391,"props":15283,"children":15284},{"style":409},[15285],{"type":51,"value":15286},"    COUNTIF(cancel_reason ",{"type":42,"tag":391,"props":15288,"children":15289},{"style":515},[15290],{"type":51,"value":14746},{"type":42,"tag":391,"props":15292,"children":15293},{"style":409},[15294],{"type":51,"value":7672},{"type":42,"tag":391,"props":15296,"children":15297},{"style":515},[15298],{"type":51,"value":7194},{"type":42,"tag":391,"props":15300,"children":15301},{"style":409},[15302],{"type":51,"value":14759},{"type":42,"tag":391,"props":15304,"children":15305},{"class":393,"line":6975},[15306,15310,15314,15318],{"type":42,"tag":391,"props":15307,"children":15308},{"style":415},[15309],{"type":51,"value":14767},{"type":42,"tag":391,"props":15311,"children":15312},{"style":409},[15313],{"type":51,"value":14772},{"type":42,"tag":391,"props":15315,"children":15316},{"style":515},[15317],{"type":51,"value":7194},{"type":42,"tag":391,"props":15319,"children":15320},{"style":409},[15321],{"type":51,"value":14781},{"type":42,"tag":391,"props":15323,"children":15324},{"class":393,"line":6984},[15325,15329,15333,15337,15341,15345,15349,15353,15357,15361,15365,15369,15373,15377,15381],{"type":42,"tag":391,"props":15326,"children":15327},{"style":415},[15328],{"type":51,"value":14767},{"type":42,"tag":391,"props":15330,"children":15331},{"style":409},[15332],{"type":51,"value":7143},{"type":42,"tag":391,"props":15334,"children":15335},{"style":515},[15336],{"type":51,"value":12546},{"type":42,"tag":391,"props":15338,"children":15339},{"style":515},[15340],{"type":51,"value":13140},{"type":42,"tag":391,"props":15342,"children":15343},{"style":409},[15344],{"type":51,"value":14805},{"type":42,"tag":391,"props":15346,"children":15347},{"style":515},[15348],{"type":51,"value":7677},{"type":42,"tag":391,"props":15350,"children":15351},{"style":403},[15352],{"type":51,"value":14720},{"type":42,"tag":391,"props":15354,"children":15355},{"style":515},[15356],{"type":51,"value":12735},{"type":42,"tag":391,"props":15358,"children":15359},{"style":409},[15360],{"type":51,"value":14822},{"type":42,"tag":391,"props":15362,"children":15363},{"style":515},[15364],{"type":51,"value":14827},{"type":42,"tag":391,"props":15366,"children":15367},{"style":415},[15368],{"type":51,"value":14832},{"type":42,"tag":391,"props":15370,"children":15371},{"style":515},[15372],{"type":51,"value":13177},{"type":42,"tag":391,"props":15374,"children":15375},{"style":409},[15376],{"type":51,"value":7672},{"type":42,"tag":391,"props":15378,"children":15379},{"style":515},[15380],{"type":51,"value":7194},{"type":42,"tag":391,"props":15382,"children":15383},{"style":409},[15384],{"type":51,"value":14849},{"type":42,"tag":391,"props":15386,"children":15387},{"class":393,"line":7012},[15388,15392,15396,15400],{"type":42,"tag":391,"props":15389,"children":15390},{"style":415},[15391],{"type":51,"value":14767},{"type":42,"tag":391,"props":15393,"children":15394},{"style":409},[15395],{"type":51,"value":14861},{"type":42,"tag":391,"props":15397,"children":15398},{"style":515},[15399],{"type":51,"value":7194},{"type":42,"tag":391,"props":15401,"children":15402},{"style":409},[15403],{"type":51,"value":14870},{"type":42,"tag":391,"props":15405,"children":15406},{"class":393,"line":7034},[15407,15411,15415,15419],{"type":42,"tag":391,"props":15408,"children":15409},{"style":415},[15410],{"type":51,"value":14767},{"type":42,"tag":391,"props":15412,"children":15413},{"style":409},[15414],{"type":51,"value":14882},{"type":42,"tag":391,"props":15416,"children":15417},{"style":515},[15418],{"type":51,"value":7194},{"type":42,"tag":391,"props":15420,"children":15421},{"style":409},[15422],{"type":51,"value":14891},{"type":42,"tag":391,"props":15424,"children":15425},{"class":393,"line":7060},[15426,15430,15434,15439,15443,15447,15451,15455,15459,15463,15467,15471,15475,15479,15483,15487,15491,15496,15501,15505,15509,15513,15517,15521,15525,15529,15533],{"type":42,"tag":391,"props":15427,"children":15428},{"style":415},[15429],{"type":51,"value":14899},{"type":42,"tag":391,"props":15431,"children":15432},{"style":409},[15433],{"type":51,"value":7143},{"type":42,"tag":391,"props":15435,"children":15436},{"style":415},[15437],{"type":51,"value":15438},"sum",{"type":42,"tag":391,"props":15440,"children":15441},{"style":409},[15442],{"type":51,"value":7143},{"type":42,"tag":391,"props":15444,"children":15445},{"style":515},[15446],{"type":51,"value":12546},{"type":42,"tag":391,"props":15448,"children":15449},{"style":515},[15450],{"type":51,"value":13140},{"type":42,"tag":391,"props":15452,"children":15453},{"style":409},[15454],{"type":51,"value":14805},{"type":42,"tag":391,"props":15456,"children":15457},{"style":515},[15458],{"type":51,"value":7677},{"type":42,"tag":391,"props":15460,"children":15461},{"style":403},[15462],{"type":51,"value":14720},{"type":42,"tag":391,"props":15464,"children":15465},{"style":515},[15466],{"type":51,"value":12735},{"type":42,"tag":391,"props":15468,"children":15469},{"style":409},[15470],{"type":51,"value":14822},{"type":42,"tag":391,"props":15472,"children":15473},{"style":515},[15474],{"type":51,"value":14827},{"type":42,"tag":391,"props":15476,"children":15477},{"style":415},[15478],{"type":51,"value":14832},{"type":42,"tag":391,"props":15480,"children":15481},{"style":515},[15482],{"type":51,"value":13177},{"type":42,"tag":391,"props":15484,"children":15485},{"style":409},[15486],{"type":51,"value":7672},{"type":42,"tag":391,"props":15488,"children":15489},{"style":515},[15490],{"type":51,"value":14909},{"type":42,"tag":391,"props":15492,"children":15493},{"style":415},[15494],{"type":51,"value":15495}," NULLIF",{"type":42,"tag":391,"props":15497,"children":15498},{"style":409},[15499],{"type":51,"value":15500},"(COUNTIF(payment_status ",{"type":42,"tag":391,"props":15502,"children":15503},{"style":515},[15504],{"type":51,"value":7677},{"type":42,"tag":391,"props":15506,"children":15507},{"style":403},[15508],{"type":51,"value":14720},{"type":42,"tag":391,"props":15510,"children":15511},{"style":409},[15512],{"type":51,"value":14928},{"type":42,"tag":391,"props":15514,"children":15515},{"style":415},[15516],{"type":51,"value":7485},{"type":42,"tag":391,"props":15518,"children":15519},{"style":409},[15520],{"type":51,"value":14928},{"type":42,"tag":391,"props":15522,"children":15523},{"style":415},[15524],{"type":51,"value":7184},{"type":42,"tag":391,"props":15526,"children":15527},{"style":409},[15528],{"type":51,"value":7672},{"type":42,"tag":391,"props":15530,"children":15531},{"style":515},[15532],{"type":51,"value":7194},{"type":42,"tag":391,"props":15534,"children":15535},{"style":409},[15536],{"type":51,"value":14945},{"type":42,"tag":391,"props":15538,"children":15539},{"class":393,"line":7086},[15540,15544,15549,15553,15557,15561,15565,15569,15574,15578,15582,15586,15590,15594,15598,15602,15606,15610,15614,15618],{"type":42,"tag":391,"props":15541,"children":15542},{"style":415},[15543],{"type":51,"value":14899},{"type":42,"tag":391,"props":15545,"children":15546},{"style":409},[15547],{"type":51,"value":15548},"(COUNTIF(cancel_reason ",{"type":42,"tag":391,"props":15550,"children":15551},{"style":515},[15552],{"type":51,"value":14746},{"type":42,"tag":391,"props":15554,"children":15555},{"style":409},[15556],{"type":51,"value":7672},{"type":42,"tag":391,"props":15558,"children":15559},{"style":515},[15560],{"type":51,"value":14909},{"type":42,"tag":391,"props":15562,"children":15563},{"style":415},[15564],{"type":51,"value":15495},{"type":42,"tag":391,"props":15566,"children":15567},{"style":409},[15568],{"type":51,"value":7143},{"type":42,"tag":391,"props":15570,"children":15571},{"style":415},[15572],{"type":51,"value":15573},"count",{"type":42,"tag":391,"props":15575,"children":15576},{"style":409},[15577],{"type":51,"value":7143},{"type":42,"tag":391,"props":15579,"children":15580},{"style":515},[15581],{"type":51,"value":13108},{"type":42,"tag":391,"props":15583,"children":15584},{"style":409},[15585],{"type":51,"value":14928},{"type":42,"tag":391,"props":15587,"children":15588},{"style":415},[15589],{"type":51,"value":7485},{"type":42,"tag":391,"props":15591,"children":15592},{"style":409},[15593],{"type":51,"value":7672},{"type":42,"tag":391,"props":15595,"children":15596},{"style":515},[15597],{"type":51,"value":13108},{"type":42,"tag":391,"props":15599,"children":15600},{"style":415},[15601],{"type":51,"value":7476},{"type":42,"tag":391,"props":15603,"children":15604},{"style":409},[15605],{"type":51,"value":292},{"type":42,"tag":391,"props":15607,"children":15608},{"style":415},[15609],{"type":51,"value":7184},{"type":42,"tag":391,"props":15611,"children":15612},{"style":409},[15613],{"type":51,"value":7672},{"type":42,"tag":391,"props":15615,"children":15616},{"style":515},[15617],{"type":51,"value":7194},{"type":42,"tag":391,"props":15619,"children":15620},{"style":409},[15621],{"type":51,"value":15007},{"type":42,"tag":391,"props":15623,"children":15624},{"class":393,"line":7111},[15625,15629,15633,15637,15642],{"type":42,"tag":391,"props":15626,"children":15627},{"style":515},[15628],{"type":51,"value":7555},{"type":42,"tag":391,"props":15630,"children":15631},{"style":415},[15632],{"type":51,"value":15019},{"type":42,"tag":391,"props":15634,"children":15635},{"style":409},[15636],{"type":51,"value":247},{"type":42,"tag":391,"props":15638,"children":15639},{"style":415},[15640],{"type":51,"value":15641},"stg_orders",{"type":42,"tag":391,"props":15643,"children":15644},{"style":409},[15645],{"type":51,"value":7574},{"type":42,"tag":391,"props":15647,"children":15648},{"class":393,"line":7132},[15649,15653,15657,15661,15665,15670,15674,15679,15683,15688],{"type":42,"tag":391,"props":15650,"children":15651},{"style":515},[15652],{"type":51,"value":8528},{"type":42,"tag":391,"props":15654,"children":15655},{"style":415},[15656],{"type":51,"value":7614},{"type":42,"tag":391,"props":15658,"children":15659},{"style":409},[15660],{"type":51,"value":247},{"type":42,"tag":391,"props":15662,"children":15663},{"style":415},[15664],{"type":51,"value":2743},{"type":42,"tag":391,"props":15666,"children":15667},{"style":515},[15668],{"type":51,"value":15669}," IN",{"type":42,"tag":391,"props":15671,"children":15672},{"style":409},[15673],{"type":51,"value":8607},{"type":42,"tag":391,"props":15675,"children":15676},{"style":403},[15677],{"type":51,"value":15678},"'paid'",{"type":42,"tag":391,"props":15680,"children":15681},{"style":409},[15682],{"type":51,"value":292},{"type":42,"tag":391,"props":15684,"children":15685},{"style":403},[15686],{"type":51,"value":15687},"'partially_refunded'",{"type":42,"tag":391,"props":15689,"children":15690},{"style":409},[15691],{"type":51,"value":7700},{"type":42,"tag":391,"props":15693,"children":15694},{"class":393,"line":7202},[15695,15699,15703],{"type":42,"tag":391,"props":15696,"children":15697},{"style":515},[15698],{"type":51,"value":13556},{"type":42,"tag":391,"props":15700,"children":15701},{"style":515},[15702],{"type":51,"value":8471},{"type":42,"tag":391,"props":15704,"children":15705},{"style":409},[15706],{"type":51,"value":15707},"(order_date)\n",{"type":42,"tag":391,"props":15709,"children":15710},{"class":393,"line":7264},[15711,15715],{"type":42,"tag":391,"props":15712,"children":15713},{"style":515},[15714],{"type":51,"value":15048},{"type":42,"tag":391,"props":15716,"children":15717},{"style":409},[15718],{"type":51,"value":15053},{"type":42,"tag":569,"props":15720,"children":15721},{"v-slot:snowflake":7},[15722],{"type":42,"tag":381,"props":15723,"children":15725},{"className":6761,"code":15724,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_daily_revenue\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_orders\ncolumns:\n  - name: order_date\n    type: date\n    checks:\n      - name: not_null\n      - name: unique\ncustom_checks:\n  - name: has_rows\n    query: \"SELECT count(*) > 0 FROM reports.rpt_daily_revenue\"\n    value: 1\n@bruin *\u002F\n\nSELECT\n    order_date::DATE AS order_date,\n    count(*) AS total_orders,\n    COUNT(CASE WHEN payment_status = 'paid' THEN 1 END) AS paid_orders,\n    COUNT(CASE WHEN cancel_reason IS NOT NULL THEN 1 END) AS cancelled_orders,\n    sum(order_total) AS gross_revenue,\n    sum(CASE WHEN payment_status = 'paid' THEN order_total ELSE 0 END) AS net_revenue,\n    sum(discount_amount) AS total_discounts,\n    sum(tax_amount) AS total_tax,\n    round(sum(CASE WHEN payment_status = 'paid' THEN order_total ELSE 0 END) \u002F NULLIF(COUNT(CASE WHEN payment_status = 'paid' THEN 1 END), 0), 2) AS avg_order_value,\n    round(COUNT(CASE WHEN cancel_reason IS NOT NULL THEN 1 END) \u002F NULLIF(count(*), 0) * 100, 2) AS cancellation_rate\nFROM staging.stg_orders\nGROUP BY order_date::DATE\nORDER BY order_date\n",[15726],{"type":42,"tag":240,"props":15727,"children":15728},{"__ignoreMap":7},[15729,15736,15743,15750,15757,15764,15771,15778,15785,15792,15799,15806,15813,15820,15827,15834,15841,15848,15855,15862,15869,15889,15916,15971,16023,16042,16105,16124,16143,16287,16402,16421,16437],{"type":42,"tag":391,"props":15730,"children":15731},{"class":393,"line":176},[15732],{"type":42,"tag":391,"props":15733,"children":15734},{"style":6773},[15735],{"type":51,"value":6776},{"type":42,"tag":391,"props":15737,"children":15738},{"class":393,"line":99},[15739],{"type":42,"tag":391,"props":15740,"children":15741},{"style":6773},[15742],{"type":51,"value":14530},{"type":42,"tag":391,"props":15744,"children":15745},{"class":393,"line":439},[15746],{"type":42,"tag":391,"props":15747,"children":15748},{"style":6773},[15749],{"type":51,"value":6792},{"type":42,"tag":391,"props":15751,"children":15752},{"class":393,"line":947},[15753],{"type":42,"tag":391,"props":15754,"children":15755},{"style":6773},[15756],{"type":51,"value":6800},{"type":42,"tag":391,"props":15758,"children":15759},{"class":393,"line":960},[15760],{"type":42,"tag":391,"props":15761,"children":15762},{"style":6773},[15763],{"type":51,"value":6808},{"type":42,"tag":391,"props":15765,"children":15766},{"class":393,"line":984},[15767],{"type":42,"tag":391,"props":15768,"children":15769},{"style":6773},[15770],{"type":51,"value":6816},{"type":42,"tag":391,"props":15772,"children":15773},{"class":393,"line":1002},[15774],{"type":42,"tag":391,"props":15775,"children":15776},{"style":6773},[15777],{"type":51,"value":14566},{"type":42,"tag":391,"props":15779,"children":15780},{"class":393,"line":165},[15781],{"type":42,"tag":391,"props":15782,"children":15783},{"style":6773},[15784],{"type":51,"value":6840},{"type":42,"tag":391,"props":15786,"children":15787},{"class":393,"line":2235},[15788],{"type":42,"tag":391,"props":15789,"children":15790},{"style":6773},[15791],{"type":51,"value":6893},{"type":42,"tag":391,"props":15793,"children":15794},{"class":393,"line":6843},[15795],{"type":42,"tag":391,"props":15796,"children":15797},{"style":6773},[15798],{"type":51,"value":10874},{"type":42,"tag":391,"props":15800,"children":15801},{"class":393,"line":6852},[15802],{"type":42,"tag":391,"props":15803,"children":15804},{"style":6773},[15805],{"type":51,"value":6867},{"type":42,"tag":391,"props":15807,"children":15808},{"class":393,"line":6861},[15809],{"type":42,"tag":391,"props":15810,"children":15811},{"style":6773},[15812],{"type":51,"value":6876},{"type":42,"tag":391,"props":15814,"children":15815},{"class":393,"line":6870},[15816],{"type":42,"tag":391,"props":15817,"children":15818},{"style":6773},[15819],{"type":51,"value":6885},{"type":42,"tag":391,"props":15821,"children":15822},{"class":393,"line":6879},[15823],{"type":42,"tag":391,"props":15824,"children":15825},{"style":6773},[15826],{"type":51,"value":6927},{"type":42,"tag":391,"props":15828,"children":15829},{"class":393,"line":1707},[15830],{"type":42,"tag":391,"props":15831,"children":15832},{"style":6773},[15833],{"type":51,"value":6936},{"type":42,"tag":391,"props":15835,"children":15836},{"class":393,"line":6896},[15837],{"type":42,"tag":391,"props":15838,"children":15839},{"style":6773},[15840],{"type":51,"value":14630},{"type":42,"tag":391,"props":15842,"children":15843},{"class":393,"line":6905},[15844],{"type":42,"tag":391,"props":15845,"children":15846},{"style":6773},[15847],{"type":51,"value":6954},{"type":42,"tag":391,"props":15849,"children":15850},{"class":393,"line":6913},[15851],{"type":42,"tag":391,"props":15852,"children":15853},{"style":6773},[15854],{"type":51,"value":6963},{"type":42,"tag":391,"props":15856,"children":15857},{"class":393,"line":6921},[15858],{"type":42,"tag":391,"props":15859,"children":15860},{"emptyLinePlaceholder":13},[15861],{"type":51,"value":6972},{"type":42,"tag":391,"props":15863,"children":15864},{"class":393,"line":6930},[15865],{"type":42,"tag":391,"props":15866,"children":15867},{"style":515},[15868],{"type":51,"value":6981},{"type":42,"tag":391,"props":15870,"children":15871},{"class":393,"line":6939},[15872,15877,15881,15885],{"type":42,"tag":391,"props":15873,"children":15874},{"style":409},[15875],{"type":51,"value":15876},"    order_date::",{"type":42,"tag":391,"props":15878,"children":15879},{"style":515},[15880],{"type":51,"value":9468},{"type":42,"tag":391,"props":15882,"children":15883},{"style":515},[15884],{"type":51,"value":7004},{"type":42,"tag":391,"props":15886,"children":15887},{"style":409},[15888],{"type":51,"value":7083},{"type":42,"tag":391,"props":15890,"children":15891},{"class":393,"line":6948},[15892,15896,15900,15904,15908,15912],{"type":42,"tag":391,"props":15893,"children":15894},{"style":415},[15895],{"type":51,"value":14682},{"type":42,"tag":391,"props":15897,"children":15898},{"style":409},[15899],{"type":51,"value":7143},{"type":42,"tag":391,"props":15901,"children":15902},{"style":515},[15903],{"type":51,"value":13108},{"type":42,"tag":391,"props":15905,"children":15906},{"style":409},[15907],{"type":51,"value":7672},{"type":42,"tag":391,"props":15909,"children":15910},{"style":515},[15911],{"type":51,"value":7194},{"type":42,"tag":391,"props":15913,"children":15914},{"style":409},[15915],{"type":51,"value":14703},{"type":42,"tag":391,"props":15917,"children":15918},{"class":393,"line":6957},[15919,15923,15927,15931,15935,15939,15943,15947,15951,15955,15959,15963,15967],{"type":42,"tag":391,"props":15920,"children":15921},{"style":415},[15922],{"type":51,"value":13099},{"type":42,"tag":391,"props":15924,"children":15925},{"style":409},[15926],{"type":51,"value":7143},{"type":42,"tag":391,"props":15928,"children":15929},{"style":515},[15930],{"type":51,"value":12546},{"type":42,"tag":391,"props":15932,"children":15933},{"style":515},[15934],{"type":51,"value":13140},{"type":42,"tag":391,"props":15936,"children":15937},{"style":409},[15938],{"type":51,"value":14805},{"type":42,"tag":391,"props":15940,"children":15941},{"style":515},[15942],{"type":51,"value":7677},{"type":42,"tag":391,"props":15944,"children":15945},{"style":403},[15946],{"type":51,"value":14720},{"type":42,"tag":391,"props":15948,"children":15949},{"style":515},[15950],{"type":51,"value":12735},{"type":42,"tag":391,"props":15952,"children":15953},{"style":415},[15954],{"type":51,"value":13172},{"type":42,"tag":391,"props":15956,"children":15957},{"style":515},[15958],{"type":51,"value":13177},{"type":42,"tag":391,"props":15960,"children":15961},{"style":409},[15962],{"type":51,"value":7672},{"type":42,"tag":391,"props":15964,"children":15965},{"style":515},[15966],{"type":51,"value":7194},{"type":42,"tag":391,"props":15968,"children":15969},{"style":409},[15970],{"type":51,"value":14733},{"type":42,"tag":391,"props":15972,"children":15973},{"class":393,"line":6966},[15974,15978,15982,15986,15990,15995,15999,16003,16007,16011,16015,16019],{"type":42,"tag":391,"props":15975,"children":15976},{"style":415},[15977],{"type":51,"value":13099},{"type":42,"tag":391,"props":15979,"children":15980},{"style":409},[15981],{"type":51,"value":7143},{"type":42,"tag":391,"props":15983,"children":15984},{"style":515},[15985],{"type":51,"value":12546},{"type":42,"tag":391,"props":15987,"children":15988},{"style":515},[15989],{"type":51,"value":13140},{"type":42,"tag":391,"props":15991,"children":15992},{"style":409},[15993],{"type":51,"value":15994}," cancel_reason ",{"type":42,"tag":391,"props":15996,"children":15997},{"style":515},[15998],{"type":51,"value":14746},{"type":42,"tag":391,"props":16000,"children":16001},{"style":515},[16002],{"type":51,"value":12735},{"type":42,"tag":391,"props":16004,"children":16005},{"style":415},[16006],{"type":51,"value":13172},{"type":42,"tag":391,"props":16008,"children":16009},{"style":515},[16010],{"type":51,"value":13177},{"type":42,"tag":391,"props":16012,"children":16013},{"style":409},[16014],{"type":51,"value":7672},{"type":42,"tag":391,"props":16016,"children":16017},{"style":515},[16018],{"type":51,"value":7194},{"type":42,"tag":391,"props":16020,"children":16021},{"style":409},[16022],{"type":51,"value":14759},{"type":42,"tag":391,"props":16024,"children":16025},{"class":393,"line":6975},[16026,16030,16034,16038],{"type":42,"tag":391,"props":16027,"children":16028},{"style":415},[16029],{"type":51,"value":14767},{"type":42,"tag":391,"props":16031,"children":16032},{"style":409},[16033],{"type":51,"value":14772},{"type":42,"tag":391,"props":16035,"children":16036},{"style":515},[16037],{"type":51,"value":7194},{"type":42,"tag":391,"props":16039,"children":16040},{"style":409},[16041],{"type":51,"value":14781},{"type":42,"tag":391,"props":16043,"children":16044},{"class":393,"line":6984},[16045,16049,16053,16057,16061,16065,16069,16073,16077,16081,16085,16089,16093,16097,16101],{"type":42,"tag":391,"props":16046,"children":16047},{"style":415},[16048],{"type":51,"value":14767},{"type":42,"tag":391,"props":16050,"children":16051},{"style":409},[16052],{"type":51,"value":7143},{"type":42,"tag":391,"props":16054,"children":16055},{"style":515},[16056],{"type":51,"value":12546},{"type":42,"tag":391,"props":16058,"children":16059},{"style":515},[16060],{"type":51,"value":13140},{"type":42,"tag":391,"props":16062,"children":16063},{"style":409},[16064],{"type":51,"value":14805},{"type":42,"tag":391,"props":16066,"children":16067},{"style":515},[16068],{"type":51,"value":7677},{"type":42,"tag":391,"props":16070,"children":16071},{"style":403},[16072],{"type":51,"value":14720},{"type":42,"tag":391,"props":16074,"children":16075},{"style":515},[16076],{"type":51,"value":12735},{"type":42,"tag":391,"props":16078,"children":16079},{"style":409},[16080],{"type":51,"value":14822},{"type":42,"tag":391,"props":16082,"children":16083},{"style":515},[16084],{"type":51,"value":14827},{"type":42,"tag":391,"props":16086,"children":16087},{"style":415},[16088],{"type":51,"value":14832},{"type":42,"tag":391,"props":16090,"children":16091},{"style":515},[16092],{"type":51,"value":13177},{"type":42,"tag":391,"props":16094,"children":16095},{"style":409},[16096],{"type":51,"value":7672},{"type":42,"tag":391,"props":16098,"children":16099},{"style":515},[16100],{"type":51,"value":7194},{"type":42,"tag":391,"props":16102,"children":16103},{"style":409},[16104],{"type":51,"value":14849},{"type":42,"tag":391,"props":16106,"children":16107},{"class":393,"line":7012},[16108,16112,16116,16120],{"type":42,"tag":391,"props":16109,"children":16110},{"style":415},[16111],{"type":51,"value":14767},{"type":42,"tag":391,"props":16113,"children":16114},{"style":409},[16115],{"type":51,"value":14861},{"type":42,"tag":391,"props":16117,"children":16118},{"style":515},[16119],{"type":51,"value":7194},{"type":42,"tag":391,"props":16121,"children":16122},{"style":409},[16123],{"type":51,"value":14870},{"type":42,"tag":391,"props":16125,"children":16126},{"class":393,"line":7034},[16127,16131,16135,16139],{"type":42,"tag":391,"props":16128,"children":16129},{"style":415},[16130],{"type":51,"value":14767},{"type":42,"tag":391,"props":16132,"children":16133},{"style":409},[16134],{"type":51,"value":14882},{"type":42,"tag":391,"props":16136,"children":16137},{"style":515},[16138],{"type":51,"value":7194},{"type":42,"tag":391,"props":16140,"children":16141},{"style":409},[16142],{"type":51,"value":14891},{"type":42,"tag":391,"props":16144,"children":16145},{"class":393,"line":7060},[16146,16150,16154,16158,16162,16166,16170,16174,16178,16182,16186,16190,16194,16198,16202,16206,16210,16214,16218,16223,16227,16231,16235,16239,16243,16247,16251,16255,16259,16263,16267,16271,16275,16279,16283],{"type":42,"tag":391,"props":16147,"children":16148},{"style":415},[16149],{"type":51,"value":14899},{"type":42,"tag":391,"props":16151,"children":16152},{"style":409},[16153],{"type":51,"value":7143},{"type":42,"tag":391,"props":16155,"children":16156},{"style":415},[16157],{"type":51,"value":15438},{"type":42,"tag":391,"props":16159,"children":16160},{"style":409},[16161],{"type":51,"value":7143},{"type":42,"tag":391,"props":16163,"children":16164},{"style":515},[16165],{"type":51,"value":12546},{"type":42,"tag":391,"props":16167,"children":16168},{"style":515},[16169],{"type":51,"value":13140},{"type":42,"tag":391,"props":16171,"children":16172},{"style":409},[16173],{"type":51,"value":14805},{"type":42,"tag":391,"props":16175,"children":16176},{"style":515},[16177],{"type":51,"value":7677},{"type":42,"tag":391,"props":16179,"children":16180},{"style":403},[16181],{"type":51,"value":14720},{"type":42,"tag":391,"props":16183,"children":16184},{"style":515},[16185],{"type":51,"value":12735},{"type":42,"tag":391,"props":16187,"children":16188},{"style":409},[16189],{"type":51,"value":14822},{"type":42,"tag":391,"props":16191,"children":16192},{"style":515},[16193],{"type":51,"value":14827},{"type":42,"tag":391,"props":16195,"children":16196},{"style":415},[16197],{"type":51,"value":14832},{"type":42,"tag":391,"props":16199,"children":16200},{"style":515},[16201],{"type":51,"value":13177},{"type":42,"tag":391,"props":16203,"children":16204},{"style":409},[16205],{"type":51,"value":7672},{"type":42,"tag":391,"props":16207,"children":16208},{"style":515},[16209],{"type":51,"value":14909},{"type":42,"tag":391,"props":16211,"children":16212},{"style":415},[16213],{"type":51,"value":15495},{"type":42,"tag":391,"props":16215,"children":16216},{"style":409},[16217],{"type":51,"value":7143},{"type":42,"tag":391,"props":16219,"children":16220},{"style":415},[16221],{"type":51,"value":16222},"COUNT",{"type":42,"tag":391,"props":16224,"children":16225},{"style":409},[16226],{"type":51,"value":7143},{"type":42,"tag":391,"props":16228,"children":16229},{"style":515},[16230],{"type":51,"value":12546},{"type":42,"tag":391,"props":16232,"children":16233},{"style":515},[16234],{"type":51,"value":13140},{"type":42,"tag":391,"props":16236,"children":16237},{"style":409},[16238],{"type":51,"value":14805},{"type":42,"tag":391,"props":16240,"children":16241},{"style":515},[16242],{"type":51,"value":7677},{"type":42,"tag":391,"props":16244,"children":16245},{"style":403},[16246],{"type":51,"value":14720},{"type":42,"tag":391,"props":16248,"children":16249},{"style":515},[16250],{"type":51,"value":12735},{"type":42,"tag":391,"props":16252,"children":16253},{"style":415},[16254],{"type":51,"value":13172},{"type":42,"tag":391,"props":16256,"children":16257},{"style":515},[16258],{"type":51,"value":13177},{"type":42,"tag":391,"props":16260,"children":16261},{"style":409},[16262],{"type":51,"value":14928},{"type":42,"tag":391,"props":16264,"children":16265},{"style":415},[16266],{"type":51,"value":7485},{"type":42,"tag":391,"props":16268,"children":16269},{"style":409},[16270],{"type":51,"value":14928},{"type":42,"tag":391,"props":16272,"children":16273},{"style":415},[16274],{"type":51,"value":7184},{"type":42,"tag":391,"props":16276,"children":16277},{"style":409},[16278],{"type":51,"value":7672},{"type":42,"tag":391,"props":16280,"children":16281},{"style":515},[16282],{"type":51,"value":7194},{"type":42,"tag":391,"props":16284,"children":16285},{"style":409},[16286],{"type":51,"value":14945},{"type":42,"tag":391,"props":16288,"children":16289},{"class":393,"line":7086},[16290,16294,16298,16302,16306,16310,16314,16318,16322,16326,16330,16334,16338,16342,16346,16350,16354,16358,16362,16366,16370,16374,16378,16382,16386,16390,16394,16398],{"type":42,"tag":391,"props":16291,"children":16292},{"style":415},[16293],{"type":51,"value":14899},{"type":42,"tag":391,"props":16295,"children":16296},{"style":409},[16297],{"type":51,"value":7143},{"type":42,"tag":391,"props":16299,"children":16300},{"style":415},[16301],{"type":51,"value":16222},{"type":42,"tag":391,"props":16303,"children":16304},{"style":409},[16305],{"type":51,"value":7143},{"type":42,"tag":391,"props":16307,"children":16308},{"style":515},[16309],{"type":51,"value":12546},{"type":42,"tag":391,"props":16311,"children":16312},{"style":515},[16313],{"type":51,"value":13140},{"type":42,"tag":391,"props":16315,"children":16316},{"style":409},[16317],{"type":51,"value":15994},{"type":42,"tag":391,"props":16319,"children":16320},{"style":515},[16321],{"type":51,"value":14746},{"type":42,"tag":391,"props":16323,"children":16324},{"style":515},[16325],{"type":51,"value":12735},{"type":42,"tag":391,"props":16327,"children":16328},{"style":415},[16329],{"type":51,"value":13172},{"type":42,"tag":391,"props":16331,"children":16332},{"style":515},[16333],{"type":51,"value":13177},{"type":42,"tag":391,"props":16335,"children":16336},{"style":409},[16337],{"type":51,"value":7672},{"type":42,"tag":391,"props":16339,"children":16340},{"style":515},[16341],{"type":51,"value":14909},{"type":42,"tag":391,"props":16343,"children":16344},{"style":415},[16345],{"type":51,"value":15495},{"type":42,"tag":391,"props":16347,"children":16348},{"style":409},[16349],{"type":51,"value":7143},{"type":42,"tag":391,"props":16351,"children":16352},{"style":415},[16353],{"type":51,"value":15573},{"type":42,"tag":391,"props":16355,"children":16356},{"style":409},[16357],{"type":51,"value":7143},{"type":42,"tag":391,"props":16359,"children":16360},{"style":515},[16361],{"type":51,"value":13108},{"type":42,"tag":391,"props":16363,"children":16364},{"style":409},[16365],{"type":51,"value":14928},{"type":42,"tag":391,"props":16367,"children":16368},{"style":415},[16369],{"type":51,"value":7485},{"type":42,"tag":391,"props":16371,"children":16372},{"style":409},[16373],{"type":51,"value":7672},{"type":42,"tag":391,"props":16375,"children":16376},{"style":515},[16377],{"type":51,"value":13108},{"type":42,"tag":391,"props":16379,"children":16380},{"style":415},[16381],{"type":51,"value":7476},{"type":42,"tag":391,"props":16383,"children":16384},{"style":409},[16385],{"type":51,"value":292},{"type":42,"tag":391,"props":16387,"children":16388},{"style":415},[16389],{"type":51,"value":7184},{"type":42,"tag":391,"props":16391,"children":16392},{"style":409},[16393],{"type":51,"value":7672},{"type":42,"tag":391,"props":16395,"children":16396},{"style":515},[16397],{"type":51,"value":7194},{"type":42,"tag":391,"props":16399,"children":16400},{"style":409},[16401],{"type":51,"value":15007},{"type":42,"tag":391,"props":16403,"children":16404},{"class":393,"line":7111},[16405,16409,16413,16417],{"type":42,"tag":391,"props":16406,"children":16407},{"style":515},[16408],{"type":51,"value":7555},{"type":42,"tag":391,"props":16410,"children":16411},{"style":415},[16412],{"type":51,"value":15019},{"type":42,"tag":391,"props":16414,"children":16415},{"style":409},[16416],{"type":51,"value":247},{"type":42,"tag":391,"props":16418,"children":16419},{"style":415},[16420],{"type":51,"value":15028},{"type":42,"tag":391,"props":16422,"children":16423},{"class":393,"line":7132},[16424,16428,16433],{"type":42,"tag":391,"props":16425,"children":16426},{"style":515},[16427],{"type":51,"value":13556},{"type":42,"tag":391,"props":16429,"children":16430},{"style":409},[16431],{"type":51,"value":16432}," order_date::",{"type":42,"tag":391,"props":16434,"children":16435},{"style":515},[16436],{"type":51,"value":9493},{"type":42,"tag":391,"props":16438,"children":16439},{"class":393,"line":7202},[16440,16444],{"type":42,"tag":391,"props":16441,"children":16442},{"style":515},[16443],{"type":51,"value":15048},{"type":42,"tag":391,"props":16445,"children":16446},{"style":409},[16447],{"type":51,"value":15053},{"type":42,"tag":361,"props":16449,"children":16451},{"id":16450},"_2-customer-cohorts-rpt_customer_cohortssql",[16452,16454],{"type":51,"value":16453},"2) Customer cohorts - ",{"type":42,"tag":240,"props":16455,"children":16457},{"className":16456},[],[16458],{"type":51,"value":16459},"rpt_customer_cohorts.sql",{"type":42,"tag":43,"props":16461,"children":16462},{},[16463],{"type":51,"value":16464},"Monthly cohort analysis showing retention and lifetime value. This tells you if you're acquiring customers who stick around.",{"type":42,"tag":43,"props":16466,"children":16467},{},[16468,16469,16478],{"type":51,"value":6741},{"type":42,"tag":47,"props":16470,"children":16471},{},[16472],{"type":42,"tag":240,"props":16473,"children":16475},{"className":16474},[],[16476],{"type":51,"value":16477},"ecommerce\u002Fassets\u002Freports\u002Frpt_customer_cohorts.sql",{"type":51,"value":6752},{"type":42,"tag":563,"props":16480,"children":16481},{":variants":565,"group":566},[16482,17411,18350],{"type":42,"tag":569,"props":16483,"children":16484},{"v-slot:clickhouse":7},[16485],{"type":42,"tag":381,"props":16486,"children":16488},{"className":6761,"code":16487,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_customer_cohorts\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_orders\n  - staging.stg_customers\ncolumns:\n  - name: cohort_month\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nWITH customer_orders AS (\n    SELECT\n        o.customer_email,\n        toStartOfMonth(c.first_seen_at) AS cohort_month,\n        toStartOfMonth(o.order_date) AS order_month,\n        o.order_total\n    FROM staging.stg_orders o\n    INNER JOIN staging.stg_customers c\n        ON o.customer_email = c.customer_email\n    WHERE o.payment_status = 'paid'\n),\ncohort_sizes AS (\n    SELECT\n        cohort_month,\n        count(DISTINCT customer_email) AS cohort_size\n    FROM customer_orders\n    GROUP BY cohort_month\n)\nSELECT\n    co.cohort_month,\n    cs.cohort_size,\n    dateDiff('month', co.cohort_month, co.order_month) AS months_since_first,\n    count(DISTINCT co.customer_email) AS active_customers,\n    round(active_customers \u002F nullIf(cs.cohort_size, 0) * 100, 2) AS retention_rate,\n    sum(co.order_total) AS cohort_revenue,\n    round(cohort_revenue \u002F nullIf(cs.cohort_size, 0), 2) AS revenue_per_customer\nFROM customer_orders co\nINNER JOIN cohort_sizes cs\n    ON co.cohort_month = cs.cohort_month\nGROUP BY co.cohort_month, cs.cohort_size, months_since_first\nORDER BY co.cohort_month, months_since_first\n",[16489],{"type":42,"tag":240,"props":16490,"children":16491},{"__ignoreMap":7},[16492,16499,16507,16514,16521,16528,16535,16542,16550,16557,16565,16572,16579,16586,16593,16600,16622,16630,16651,16685,16718,16734,16758,16783,16820,16850,16858,16874,16881,16889,16920,16932,16945,16952,16959,16980,17001,17065,17106,17184,17221,17286,17298,17311,17348,17388],{"type":42,"tag":391,"props":16493,"children":16494},{"class":393,"line":176},[16495],{"type":42,"tag":391,"props":16496,"children":16497},{"style":6773},[16498],{"type":51,"value":6776},{"type":42,"tag":391,"props":16500,"children":16501},{"class":393,"line":99},[16502],{"type":42,"tag":391,"props":16503,"children":16504},{"style":6773},[16505],{"type":51,"value":16506},"name: reports.rpt_customer_cohorts\n",{"type":42,"tag":391,"props":16508,"children":16509},{"class":393,"line":439},[16510],{"type":42,"tag":391,"props":16511,"children":16512},{"style":6773},[16513],{"type":51,"value":6792},{"type":42,"tag":391,"props":16515,"children":16516},{"class":393,"line":947},[16517],{"type":42,"tag":391,"props":16518,"children":16519},{"style":6773},[16520],{"type":51,"value":6800},{"type":42,"tag":391,"props":16522,"children":16523},{"class":393,"line":960},[16524],{"type":42,"tag":391,"props":16525,"children":16526},{"style":6773},[16527],{"type":51,"value":6808},{"type":42,"tag":391,"props":16529,"children":16530},{"class":393,"line":984},[16531],{"type":42,"tag":391,"props":16532,"children":16533},{"style":6773},[16534],{"type":51,"value":6816},{"type":42,"tag":391,"props":16536,"children":16537},{"class":393,"line":1002},[16538],{"type":42,"tag":391,"props":16539,"children":16540},{"style":6773},[16541],{"type":51,"value":14566},{"type":42,"tag":391,"props":16543,"children":16544},{"class":393,"line":165},[16545],{"type":42,"tag":391,"props":16546,"children":16547},{"style":6773},[16548],{"type":51,"value":16549},"  - staging.stg_customers\n",{"type":42,"tag":391,"props":16551,"children":16552},{"class":393,"line":2235},[16553],{"type":42,"tag":391,"props":16554,"children":16555},{"style":6773},[16556],{"type":51,"value":6840},{"type":42,"tag":391,"props":16558,"children":16559},{"class":393,"line":6843},[16560],{"type":42,"tag":391,"props":16561,"children":16562},{"style":6773},[16563],{"type":51,"value":16564},"  - name: cohort_month\n",{"type":42,"tag":391,"props":16566,"children":16567},{"class":393,"line":6852},[16568],{"type":42,"tag":391,"props":16569,"children":16570},{"style":6773},[16571],{"type":51,"value":10874},{"type":42,"tag":391,"props":16573,"children":16574},{"class":393,"line":6861},[16575],{"type":42,"tag":391,"props":16576,"children":16577},{"style":6773},[16578],{"type":51,"value":6867},{"type":42,"tag":391,"props":16580,"children":16581},{"class":393,"line":6870},[16582],{"type":42,"tag":391,"props":16583,"children":16584},{"style":6773},[16585],{"type":51,"value":6876},{"type":42,"tag":391,"props":16587,"children":16588},{"class":393,"line":6879},[16589],{"type":42,"tag":391,"props":16590,"children":16591},{"style":6773},[16592],{"type":51,"value":6963},{"type":42,"tag":391,"props":16594,"children":16595},{"class":393,"line":1707},[16596],{"type":42,"tag":391,"props":16597,"children":16598},{"emptyLinePlaceholder":13},[16599],{"type":51,"value":6972},{"type":42,"tag":391,"props":16601,"children":16602},{"class":393,"line":6896},[16603,16608,16613,16617],{"type":42,"tag":391,"props":16604,"children":16605},{"style":515},[16606],{"type":51,"value":16607},"WITH",{"type":42,"tag":391,"props":16609,"children":16610},{"style":409},[16611],{"type":51,"value":16612}," customer_orders ",{"type":42,"tag":391,"props":16614,"children":16615},{"style":515},[16616],{"type":51,"value":7194},{"type":42,"tag":391,"props":16618,"children":16619},{"style":409},[16620],{"type":51,"value":16621}," (\n",{"type":42,"tag":391,"props":16623,"children":16624},{"class":393,"line":6905},[16625],{"type":42,"tag":391,"props":16626,"children":16627},{"style":515},[16628],{"type":51,"value":16629},"    SELECT\n",{"type":42,"tag":391,"props":16631,"children":16632},{"class":393,"line":6913},[16633,16638,16642,16647],{"type":42,"tag":391,"props":16634,"children":16635},{"style":415},[16636],{"type":51,"value":16637},"        o",{"type":42,"tag":391,"props":16639,"children":16640},{"style":409},[16641],{"type":51,"value":247},{"type":42,"tag":391,"props":16643,"children":16644},{"style":415},[16645],{"type":51,"value":16646},"customer_email",{"type":42,"tag":391,"props":16648,"children":16649},{"style":409},[16650],{"type":51,"value":7031},{"type":42,"tag":391,"props":16652,"children":16653},{"class":393,"line":6921},[16654,16659,16663,16667,16672,16676,16680],{"type":42,"tag":391,"props":16655,"children":16656},{"style":409},[16657],{"type":51,"value":16658},"        toStartOfMonth(",{"type":42,"tag":391,"props":16660,"children":16661},{"style":415},[16662],{"type":51,"value":7686},{"type":42,"tag":391,"props":16664,"children":16665},{"style":409},[16666],{"type":51,"value":247},{"type":42,"tag":391,"props":16668,"children":16669},{"style":415},[16670],{"type":51,"value":16671},"first_seen_at",{"type":42,"tag":391,"props":16673,"children":16674},{"style":409},[16675],{"type":51,"value":7672},{"type":42,"tag":391,"props":16677,"children":16678},{"style":515},[16679],{"type":51,"value":7194},{"type":42,"tag":391,"props":16681,"children":16682},{"style":409},[16683],{"type":51,"value":16684}," cohort_month,\n",{"type":42,"tag":391,"props":16686,"children":16687},{"class":393,"line":6930},[16688,16692,16696,16700,16705,16709,16713],{"type":42,"tag":391,"props":16689,"children":16690},{"style":409},[16691],{"type":51,"value":16658},{"type":42,"tag":391,"props":16693,"children":16694},{"style":415},[16695],{"type":51,"value":7148},{"type":42,"tag":391,"props":16697,"children":16698},{"style":409},[16699],{"type":51,"value":247},{"type":42,"tag":391,"props":16701,"children":16702},{"style":415},[16703],{"type":51,"value":16704},"order_date",{"type":42,"tag":391,"props":16706,"children":16707},{"style":409},[16708],{"type":51,"value":7672},{"type":42,"tag":391,"props":16710,"children":16711},{"style":515},[16712],{"type":51,"value":7194},{"type":42,"tag":391,"props":16714,"children":16715},{"style":409},[16716],{"type":51,"value":16717}," order_month,\n",{"type":42,"tag":391,"props":16719,"children":16720},{"class":393,"line":6939},[16721,16725,16729],{"type":42,"tag":391,"props":16722,"children":16723},{"style":415},[16724],{"type":51,"value":16637},{"type":42,"tag":391,"props":16726,"children":16727},{"style":409},[16728],{"type":51,"value":247},{"type":42,"tag":391,"props":16730,"children":16731},{"style":415},[16732],{"type":51,"value":16733},"order_total\n",{"type":42,"tag":391,"props":16735,"children":16736},{"class":393,"line":6948},[16737,16742,16746,16750,16754],{"type":42,"tag":391,"props":16738,"children":16739},{"style":515},[16740],{"type":51,"value":16741},"    FROM",{"type":42,"tag":391,"props":16743,"children":16744},{"style":415},[16745],{"type":51,"value":15019},{"type":42,"tag":391,"props":16747,"children":16748},{"style":409},[16749],{"type":51,"value":247},{"type":42,"tag":391,"props":16751,"children":16752},{"style":415},[16753],{"type":51,"value":15641},{"type":42,"tag":391,"props":16755,"children":16756},{"style":409},[16757],{"type":51,"value":7574},{"type":42,"tag":391,"props":16759,"children":16760},{"class":393,"line":6957},[16761,16766,16770,16774,16779],{"type":42,"tag":391,"props":16762,"children":16763},{"style":515},[16764],{"type":51,"value":16765},"    INNER JOIN",{"type":42,"tag":391,"props":16767,"children":16768},{"style":415},[16769],{"type":51,"value":15019},{"type":42,"tag":391,"props":16771,"children":16772},{"style":409},[16773],{"type":51,"value":247},{"type":42,"tag":391,"props":16775,"children":16776},{"style":415},[16777],{"type":51,"value":16778},"stg_customers",{"type":42,"tag":391,"props":16780,"children":16781},{"style":409},[16782],{"type":51,"value":7600},{"type":42,"tag":391,"props":16784,"children":16785},{"class":393,"line":6966},[16786,16791,16795,16799,16803,16807,16811,16815],{"type":42,"tag":391,"props":16787,"children":16788},{"style":515},[16789],{"type":51,"value":16790},"        ON",{"type":42,"tag":391,"props":16792,"children":16793},{"style":415},[16794],{"type":51,"value":7614},{"type":42,"tag":391,"props":16796,"children":16797},{"style":409},[16798],{"type":51,"value":247},{"type":42,"tag":391,"props":16800,"children":16801},{"style":415},[16802],{"type":51,"value":16646},{"type":42,"tag":391,"props":16804,"children":16805},{"style":515},[16806],{"type":51,"value":7627},{"type":42,"tag":391,"props":16808,"children":16809},{"style":415},[16810],{"type":51,"value":7632},{"type":42,"tag":391,"props":16812,"children":16813},{"style":409},[16814],{"type":51,"value":247},{"type":42,"tag":391,"props":16816,"children":16817},{"style":415},[16818],{"type":51,"value":16819},"customer_email\n",{"type":42,"tag":391,"props":16821,"children":16822},{"class":393,"line":6975},[16823,16828,16832,16836,16841,16845],{"type":42,"tag":391,"props":16824,"children":16825},{"style":515},[16826],{"type":51,"value":16827},"    WHERE",{"type":42,"tag":391,"props":16829,"children":16830},{"style":415},[16831],{"type":51,"value":7614},{"type":42,"tag":391,"props":16833,"children":16834},{"style":409},[16835],{"type":51,"value":247},{"type":42,"tag":391,"props":16837,"children":16838},{"style":415},[16839],{"type":51,"value":16840},"payment_status",{"type":42,"tag":391,"props":16842,"children":16843},{"style":515},[16844],{"type":51,"value":7627},{"type":42,"tag":391,"props":16846,"children":16847},{"style":403},[16848],{"type":51,"value":16849}," 'paid'\n",{"type":42,"tag":391,"props":16851,"children":16852},{"class":393,"line":6984},[16853],{"type":42,"tag":391,"props":16854,"children":16855},{"style":409},[16856],{"type":51,"value":16857},"),\n",{"type":42,"tag":391,"props":16859,"children":16860},{"class":393,"line":7012},[16861,16866,16870],{"type":42,"tag":391,"props":16862,"children":16863},{"style":409},[16864],{"type":51,"value":16865},"cohort_sizes ",{"type":42,"tag":391,"props":16867,"children":16868},{"style":515},[16869],{"type":51,"value":7194},{"type":42,"tag":391,"props":16871,"children":16872},{"style":409},[16873],{"type":51,"value":16621},{"type":42,"tag":391,"props":16875,"children":16876},{"class":393,"line":7034},[16877],{"type":42,"tag":391,"props":16878,"children":16879},{"style":515},[16880],{"type":51,"value":16629},{"type":42,"tag":391,"props":16882,"children":16883},{"class":393,"line":7060},[16884],{"type":42,"tag":391,"props":16885,"children":16886},{"style":409},[16887],{"type":51,"value":16888},"        cohort_month,\n",{"type":42,"tag":391,"props":16890,"children":16891},{"class":393,"line":7086},[16892,16897,16901,16906,16911,16915],{"type":42,"tag":391,"props":16893,"children":16894},{"style":415},[16895],{"type":51,"value":16896},"        count",{"type":42,"tag":391,"props":16898,"children":16899},{"style":409},[16900],{"type":51,"value":7143},{"type":42,"tag":391,"props":16902,"children":16903},{"style":515},[16904],{"type":51,"value":16905},"DISTINCT",{"type":42,"tag":391,"props":16907,"children":16908},{"style":409},[16909],{"type":51,"value":16910}," customer_email) ",{"type":42,"tag":391,"props":16912,"children":16913},{"style":515},[16914],{"type":51,"value":7194},{"type":42,"tag":391,"props":16916,"children":16917},{"style":409},[16918],{"type":51,"value":16919}," cohort_size\n",{"type":42,"tag":391,"props":16921,"children":16922},{"class":393,"line":7111},[16923,16927],{"type":42,"tag":391,"props":16924,"children":16925},{"style":515},[16926],{"type":51,"value":16741},{"type":42,"tag":391,"props":16928,"children":16929},{"style":409},[16930],{"type":51,"value":16931}," customer_orders\n",{"type":42,"tag":391,"props":16933,"children":16934},{"class":393,"line":7132},[16935,16940],{"type":42,"tag":391,"props":16936,"children":16937},{"style":515},[16938],{"type":51,"value":16939},"    GROUP BY",{"type":42,"tag":391,"props":16941,"children":16942},{"style":409},[16943],{"type":51,"value":16944}," cohort_month\n",{"type":42,"tag":391,"props":16946,"children":16947},{"class":393,"line":7202},[16948],{"type":42,"tag":391,"props":16949,"children":16950},{"style":409},[16951],{"type":51,"value":7700},{"type":42,"tag":391,"props":16953,"children":16954},{"class":393,"line":7264},[16955],{"type":42,"tag":391,"props":16956,"children":16957},{"style":515},[16958],{"type":51,"value":6981},{"type":42,"tag":391,"props":16960,"children":16961},{"class":393,"line":7326},[16962,16967,16971,16976],{"type":42,"tag":391,"props":16963,"children":16964},{"style":415},[16965],{"type":51,"value":16966},"    co",{"type":42,"tag":391,"props":16968,"children":16969},{"style":409},[16970],{"type":51,"value":247},{"type":42,"tag":391,"props":16972,"children":16973},{"style":415},[16974],{"type":51,"value":16975},"cohort_month",{"type":42,"tag":391,"props":16977,"children":16978},{"style":409},[16979],{"type":51,"value":7031},{"type":42,"tag":391,"props":16981,"children":16982},{"class":393,"line":7388},[16983,16988,16992,16997],{"type":42,"tag":391,"props":16984,"children":16985},{"style":415},[16986],{"type":51,"value":16987},"    cs",{"type":42,"tag":391,"props":16989,"children":16990},{"style":409},[16991],{"type":51,"value":247},{"type":42,"tag":391,"props":16993,"children":16994},{"style":415},[16995],{"type":51,"value":16996},"cohort_size",{"type":42,"tag":391,"props":16998,"children":16999},{"style":409},[17000],{"type":51,"value":7031},{"type":42,"tag":391,"props":17002,"children":17003},{"class":393,"line":7409},[17004,17009,17013,17018,17022,17027,17031,17035,17039,17043,17047,17052,17056,17060],{"type":42,"tag":391,"props":17005,"children":17006},{"style":415},[17007],{"type":51,"value":17008},"    dateDiff",{"type":42,"tag":391,"props":17010,"children":17011},{"style":409},[17012],{"type":51,"value":7143},{"type":42,"tag":391,"props":17014,"children":17015},{"style":403},[17016],{"type":51,"value":17017},"'month'",{"type":42,"tag":391,"props":17019,"children":17020},{"style":409},[17021],{"type":51,"value":292},{"type":42,"tag":391,"props":17023,"children":17024},{"style":415},[17025],{"type":51,"value":17026},"co",{"type":42,"tag":391,"props":17028,"children":17029},{"style":409},[17030],{"type":51,"value":247},{"type":42,"tag":391,"props":17032,"children":17033},{"style":415},[17034],{"type":51,"value":16975},{"type":42,"tag":391,"props":17036,"children":17037},{"style":409},[17038],{"type":51,"value":292},{"type":42,"tag":391,"props":17040,"children":17041},{"style":415},[17042],{"type":51,"value":17026},{"type":42,"tag":391,"props":17044,"children":17045},{"style":409},[17046],{"type":51,"value":247},{"type":42,"tag":391,"props":17048,"children":17049},{"style":415},[17050],{"type":51,"value":17051},"order_month",{"type":42,"tag":391,"props":17053,"children":17054},{"style":409},[17055],{"type":51,"value":7672},{"type":42,"tag":391,"props":17057,"children":17058},{"style":515},[17059],{"type":51,"value":7194},{"type":42,"tag":391,"props":17061,"children":17062},{"style":409},[17063],{"type":51,"value":17064}," months_since_first,\n",{"type":42,"tag":391,"props":17066,"children":17067},{"class":393,"line":7430},[17068,17072,17076,17080,17085,17089,17093,17097,17101],{"type":42,"tag":391,"props":17069,"children":17070},{"style":415},[17071],{"type":51,"value":14682},{"type":42,"tag":391,"props":17073,"children":17074},{"style":409},[17075],{"type":51,"value":7143},{"type":42,"tag":391,"props":17077,"children":17078},{"style":515},[17079],{"type":51,"value":16905},{"type":42,"tag":391,"props":17081,"children":17082},{"style":415},[17083],{"type":51,"value":17084}," co",{"type":42,"tag":391,"props":17086,"children":17087},{"style":409},[17088],{"type":51,"value":247},{"type":42,"tag":391,"props":17090,"children":17091},{"style":415},[17092],{"type":51,"value":16646},{"type":42,"tag":391,"props":17094,"children":17095},{"style":409},[17096],{"type":51,"value":7672},{"type":42,"tag":391,"props":17098,"children":17099},{"style":515},[17100],{"type":51,"value":7194},{"type":42,"tag":391,"props":17102,"children":17103},{"style":409},[17104],{"type":51,"value":17105}," active_customers,\n",{"type":42,"tag":391,"props":17107,"children":17108},{"class":393,"line":7451},[17109,17113,17118,17122,17126,17130,17135,17139,17143,17147,17151,17155,17159,17163,17167,17171,17175,17179],{"type":42,"tag":391,"props":17110,"children":17111},{"style":415},[17112],{"type":51,"value":14899},{"type":42,"tag":391,"props":17114,"children":17115},{"style":409},[17116],{"type":51,"value":17117},"(active_customers ",{"type":42,"tag":391,"props":17119,"children":17120},{"style":515},[17121],{"type":51,"value":14909},{"type":42,"tag":391,"props":17123,"children":17124},{"style":415},[17125],{"type":51,"value":14914},{"type":42,"tag":391,"props":17127,"children":17128},{"style":409},[17129],{"type":51,"value":7143},{"type":42,"tag":391,"props":17131,"children":17132},{"style":415},[17133],{"type":51,"value":17134},"cs",{"type":42,"tag":391,"props":17136,"children":17137},{"style":409},[17138],{"type":51,"value":247},{"type":42,"tag":391,"props":17140,"children":17141},{"style":415},[17142],{"type":51,"value":16996},{"type":42,"tag":391,"props":17144,"children":17145},{"style":409},[17146],{"type":51,"value":292},{"type":42,"tag":391,"props":17148,"children":17149},{"style":415},[17150],{"type":51,"value":7485},{"type":42,"tag":391,"props":17152,"children":17153},{"style":409},[17154],{"type":51,"value":7672},{"type":42,"tag":391,"props":17156,"children":17157},{"style":515},[17158],{"type":51,"value":13108},{"type":42,"tag":391,"props":17160,"children":17161},{"style":415},[17162],{"type":51,"value":7476},{"type":42,"tag":391,"props":17164,"children":17165},{"style":409},[17166],{"type":51,"value":292},{"type":42,"tag":391,"props":17168,"children":17169},{"style":415},[17170],{"type":51,"value":7184},{"type":42,"tag":391,"props":17172,"children":17173},{"style":409},[17174],{"type":51,"value":7672},{"type":42,"tag":391,"props":17176,"children":17177},{"style":515},[17178],{"type":51,"value":7194},{"type":42,"tag":391,"props":17180,"children":17181},{"style":409},[17182],{"type":51,"value":17183}," retention_rate,\n",{"type":42,"tag":391,"props":17185,"children":17186},{"class":393,"line":7497},[17187,17191,17195,17199,17203,17208,17212,17216],{"type":42,"tag":391,"props":17188,"children":17189},{"style":415},[17190],{"type":51,"value":14767},{"type":42,"tag":391,"props":17192,"children":17193},{"style":409},[17194],{"type":51,"value":7143},{"type":42,"tag":391,"props":17196,"children":17197},{"style":415},[17198],{"type":51,"value":17026},{"type":42,"tag":391,"props":17200,"children":17201},{"style":409},[17202],{"type":51,"value":247},{"type":42,"tag":391,"props":17204,"children":17205},{"style":415},[17206],{"type":51,"value":17207},"order_total",{"type":42,"tag":391,"props":17209,"children":17210},{"style":409},[17211],{"type":51,"value":7672},{"type":42,"tag":391,"props":17213,"children":17214},{"style":515},[17215],{"type":51,"value":7194},{"type":42,"tag":391,"props":17217,"children":17218},{"style":409},[17219],{"type":51,"value":17220}," cohort_revenue,\n",{"type":42,"tag":391,"props":17222,"children":17223},{"class":393,"line":7523},[17224,17228,17233,17237,17241,17245,17249,17253,17257,17261,17265,17269,17273,17277,17281],{"type":42,"tag":391,"props":17225,"children":17226},{"style":415},[17227],{"type":51,"value":14899},{"type":42,"tag":391,"props":17229,"children":17230},{"style":409},[17231],{"type":51,"value":17232},"(cohort_revenue ",{"type":42,"tag":391,"props":17234,"children":17235},{"style":515},[17236],{"type":51,"value":14909},{"type":42,"tag":391,"props":17238,"children":17239},{"style":415},[17240],{"type":51,"value":14914},{"type":42,"tag":391,"props":17242,"children":17243},{"style":409},[17244],{"type":51,"value":7143},{"type":42,"tag":391,"props":17246,"children":17247},{"style":415},[17248],{"type":51,"value":17134},{"type":42,"tag":391,"props":17250,"children":17251},{"style":409},[17252],{"type":51,"value":247},{"type":42,"tag":391,"props":17254,"children":17255},{"style":415},[17256],{"type":51,"value":16996},{"type":42,"tag":391,"props":17258,"children":17259},{"style":409},[17260],{"type":51,"value":292},{"type":42,"tag":391,"props":17262,"children":17263},{"style":415},[17264],{"type":51,"value":7485},{"type":42,"tag":391,"props":17266,"children":17267},{"style":409},[17268],{"type":51,"value":14928},{"type":42,"tag":391,"props":17270,"children":17271},{"style":415},[17272],{"type":51,"value":7184},{"type":42,"tag":391,"props":17274,"children":17275},{"style":409},[17276],{"type":51,"value":7672},{"type":42,"tag":391,"props":17278,"children":17279},{"style":515},[17280],{"type":51,"value":7194},{"type":42,"tag":391,"props":17282,"children":17283},{"style":409},[17284],{"type":51,"value":17285}," revenue_per_customer\n",{"type":42,"tag":391,"props":17287,"children":17288},{"class":393,"line":7549},[17289,17293],{"type":42,"tag":391,"props":17290,"children":17291},{"style":515},[17292],{"type":51,"value":7555},{"type":42,"tag":391,"props":17294,"children":17295},{"style":409},[17296],{"type":51,"value":17297}," customer_orders co\n",{"type":42,"tag":391,"props":17299,"children":17300},{"class":393,"line":7577},[17301,17306],{"type":42,"tag":391,"props":17302,"children":17303},{"style":515},[17304],{"type":51,"value":17305},"INNER JOIN",{"type":42,"tag":391,"props":17307,"children":17308},{"style":409},[17309],{"type":51,"value":17310}," cohort_sizes cs\n",{"type":42,"tag":391,"props":17312,"children":17313},{"class":393,"line":7603},[17314,17318,17322,17326,17330,17334,17339,17343],{"type":42,"tag":391,"props":17315,"children":17316},{"style":515},[17317],{"type":51,"value":7609},{"type":42,"tag":391,"props":17319,"children":17320},{"style":415},[17321],{"type":51,"value":17084},{"type":42,"tag":391,"props":17323,"children":17324},{"style":409},[17325],{"type":51,"value":247},{"type":42,"tag":391,"props":17327,"children":17328},{"style":415},[17329],{"type":51,"value":16975},{"type":42,"tag":391,"props":17331,"children":17332},{"style":515},[17333],{"type":51,"value":7627},{"type":42,"tag":391,"props":17335,"children":17336},{"style":415},[17337],{"type":51,"value":17338}," cs",{"type":42,"tag":391,"props":17340,"children":17341},{"style":409},[17342],{"type":51,"value":247},{"type":42,"tag":391,"props":17344,"children":17345},{"style":415},[17346],{"type":51,"value":17347},"cohort_month\n",{"type":42,"tag":391,"props":17349,"children":17350},{"class":393,"line":7644},[17351,17355,17359,17363,17367,17371,17375,17379,17383],{"type":42,"tag":391,"props":17352,"children":17353},{"style":515},[17354],{"type":51,"value":13556},{"type":42,"tag":391,"props":17356,"children":17357},{"style":415},[17358],{"type":51,"value":17084},{"type":42,"tag":391,"props":17360,"children":17361},{"style":409},[17362],{"type":51,"value":247},{"type":42,"tag":391,"props":17364,"children":17365},{"style":415},[17366],{"type":51,"value":16975},{"type":42,"tag":391,"props":17368,"children":17369},{"style":409},[17370],{"type":51,"value":292},{"type":42,"tag":391,"props":17372,"children":17373},{"style":415},[17374],{"type":51,"value":17134},{"type":42,"tag":391,"props":17376,"children":17377},{"style":409},[17378],{"type":51,"value":247},{"type":42,"tag":391,"props":17380,"children":17381},{"style":415},[17382],{"type":51,"value":16996},{"type":42,"tag":391,"props":17384,"children":17385},{"style":409},[17386],{"type":51,"value":17387},", months_since_first\n",{"type":42,"tag":391,"props":17389,"children":17390},{"class":393,"line":8522},[17391,17395,17399,17403,17407],{"type":42,"tag":391,"props":17392,"children":17393},{"style":515},[17394],{"type":51,"value":15048},{"type":42,"tag":391,"props":17396,"children":17397},{"style":415},[17398],{"type":51,"value":17084},{"type":42,"tag":391,"props":17400,"children":17401},{"style":409},[17402],{"type":51,"value":247},{"type":42,"tag":391,"props":17404,"children":17405},{"style":415},[17406],{"type":51,"value":16975},{"type":42,"tag":391,"props":17408,"children":17409},{"style":409},[17410],{"type":51,"value":17387},{"type":42,"tag":569,"props":17412,"children":17413},{"v-slot:bigquery":7},[17414],{"type":42,"tag":381,"props":17415,"children":17417},{"className":6761,"code":17416,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_customer_cohorts\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_orders\n  - staging.stg_customers\ncolumns:\n  - name: cohort_month\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nWITH customer_orders AS (\n    SELECT\n        o.customer_email,\n        DATE_TRUNC(c.first_seen_at, MONTH) AS cohort_month,\n        DATE_TRUNC(o.order_date, MONTH) AS order_month,\n        o.order_total\n    FROM staging.stg_orders o\n    INNER JOIN staging.stg_customers c\n        ON o.customer_email = c.customer_email\n    WHERE o.payment_status = 'paid'\n),\ncohort_sizes AS (\n    SELECT\n        cohort_month,\n        count(DISTINCT customer_email) AS cohort_size\n    FROM customer_orders\n    GROUP BY cohort_month\n)\nSELECT\n    co.cohort_month,\n    cs.cohort_size,\n    DATE_DIFF(co.order_month, co.cohort_month, MONTH) AS months_since_first,\n    count(DISTINCT co.customer_email) AS active_customers,\n    round(count(DISTINCT co.customer_email) \u002F NULLIF(cs.cohort_size, 0) * 100, 2) AS retention_rate,\n    sum(co.order_total) AS cohort_revenue,\n    round(sum(co.order_total) \u002F NULLIF(cs.cohort_size, 0), 2) AS revenue_per_customer\nFROM customer_orders co\nINNER JOIN cohort_sizes cs\n    ON co.cohort_month = cs.cohort_month\nGROUP BY co.cohort_month, cs.cohort_size, months_since_first\nORDER BY co.cohort_month, months_since_first\n",[17418],{"type":42,"tag":240,"props":17419,"children":17420},{"__ignoreMap":7},[17421,17428,17435,17442,17449,17456,17463,17470,17477,17484,17491,17498,17505,17512,17519,17526,17545,17552,17571,17612,17651,17666,17689,17712,17747,17774,17781,17796,17803,17810,17837,17848,17859,17866,17873,17892,17911,17967,18006,18109,18144,18231,18242,18253,18288,18327],{"type":42,"tag":391,"props":17422,"children":17423},{"class":393,"line":176},[17424],{"type":42,"tag":391,"props":17425,"children":17426},{"style":6773},[17427],{"type":51,"value":6776},{"type":42,"tag":391,"props":17429,"children":17430},{"class":393,"line":99},[17431],{"type":42,"tag":391,"props":17432,"children":17433},{"style":6773},[17434],{"type":51,"value":16506},{"type":42,"tag":391,"props":17436,"children":17437},{"class":393,"line":439},[17438],{"type":42,"tag":391,"props":17439,"children":17440},{"style":6773},[17441],{"type":51,"value":6792},{"type":42,"tag":391,"props":17443,"children":17444},{"class":393,"line":947},[17445],{"type":42,"tag":391,"props":17446,"children":17447},{"style":6773},[17448],{"type":51,"value":6800},{"type":42,"tag":391,"props":17450,"children":17451},{"class":393,"line":960},[17452],{"type":42,"tag":391,"props":17453,"children":17454},{"style":6773},[17455],{"type":51,"value":6808},{"type":42,"tag":391,"props":17457,"children":17458},{"class":393,"line":984},[17459],{"type":42,"tag":391,"props":17460,"children":17461},{"style":6773},[17462],{"type":51,"value":6816},{"type":42,"tag":391,"props":17464,"children":17465},{"class":393,"line":1002},[17466],{"type":42,"tag":391,"props":17467,"children":17468},{"style":6773},[17469],{"type":51,"value":14566},{"type":42,"tag":391,"props":17471,"children":17472},{"class":393,"line":165},[17473],{"type":42,"tag":391,"props":17474,"children":17475},{"style":6773},[17476],{"type":51,"value":16549},{"type":42,"tag":391,"props":17478,"children":17479},{"class":393,"line":2235},[17480],{"type":42,"tag":391,"props":17481,"children":17482},{"style":6773},[17483],{"type":51,"value":6840},{"type":42,"tag":391,"props":17485,"children":17486},{"class":393,"line":6843},[17487],{"type":42,"tag":391,"props":17488,"children":17489},{"style":6773},[17490],{"type":51,"value":16564},{"type":42,"tag":391,"props":17492,"children":17493},{"class":393,"line":6852},[17494],{"type":42,"tag":391,"props":17495,"children":17496},{"style":6773},[17497],{"type":51,"value":10874},{"type":42,"tag":391,"props":17499,"children":17500},{"class":393,"line":6861},[17501],{"type":42,"tag":391,"props":17502,"children":17503},{"style":6773},[17504],{"type":51,"value":6867},{"type":42,"tag":391,"props":17506,"children":17507},{"class":393,"line":6870},[17508],{"type":42,"tag":391,"props":17509,"children":17510},{"style":6773},[17511],{"type":51,"value":6876},{"type":42,"tag":391,"props":17513,"children":17514},{"class":393,"line":6879},[17515],{"type":42,"tag":391,"props":17516,"children":17517},{"style":6773},[17518],{"type":51,"value":6963},{"type":42,"tag":391,"props":17520,"children":17521},{"class":393,"line":1707},[17522],{"type":42,"tag":391,"props":17523,"children":17524},{"emptyLinePlaceholder":13},[17525],{"type":51,"value":6972},{"type":42,"tag":391,"props":17527,"children":17528},{"class":393,"line":6896},[17529,17533,17537,17541],{"type":42,"tag":391,"props":17530,"children":17531},{"style":515},[17532],{"type":51,"value":16607},{"type":42,"tag":391,"props":17534,"children":17535},{"style":409},[17536],{"type":51,"value":16612},{"type":42,"tag":391,"props":17538,"children":17539},{"style":515},[17540],{"type":51,"value":7194},{"type":42,"tag":391,"props":17542,"children":17543},{"style":409},[17544],{"type":51,"value":16621},{"type":42,"tag":391,"props":17546,"children":17547},{"class":393,"line":6905},[17548],{"type":42,"tag":391,"props":17549,"children":17550},{"style":515},[17551],{"type":51,"value":16629},{"type":42,"tag":391,"props":17553,"children":17554},{"class":393,"line":6913},[17555,17559,17563,17567],{"type":42,"tag":391,"props":17556,"children":17557},{"style":415},[17558],{"type":51,"value":16637},{"type":42,"tag":391,"props":17560,"children":17561},{"style":409},[17562],{"type":51,"value":247},{"type":42,"tag":391,"props":17564,"children":17565},{"style":415},[17566],{"type":51,"value":16646},{"type":42,"tag":391,"props":17568,"children":17569},{"style":409},[17570],{"type":51,"value":7031},{"type":42,"tag":391,"props":17572,"children":17573},{"class":393,"line":6921},[17574,17579,17583,17587,17591,17595,17600,17604,17608],{"type":42,"tag":391,"props":17575,"children":17576},{"style":409},[17577],{"type":51,"value":17578},"        DATE_TRUNC(",{"type":42,"tag":391,"props":17580,"children":17581},{"style":415},[17582],{"type":51,"value":7686},{"type":42,"tag":391,"props":17584,"children":17585},{"style":409},[17586],{"type":51,"value":247},{"type":42,"tag":391,"props":17588,"children":17589},{"style":415},[17590],{"type":51,"value":16671},{"type":42,"tag":391,"props":17592,"children":17593},{"style":409},[17594],{"type":51,"value":292},{"type":42,"tag":391,"props":17596,"children":17597},{"style":515},[17598],{"type":51,"value":17599},"MONTH",{"type":42,"tag":391,"props":17601,"children":17602},{"style":409},[17603],{"type":51,"value":7672},{"type":42,"tag":391,"props":17605,"children":17606},{"style":515},[17607],{"type":51,"value":7194},{"type":42,"tag":391,"props":17609,"children":17610},{"style":409},[17611],{"type":51,"value":16684},{"type":42,"tag":391,"props":17613,"children":17614},{"class":393,"line":6930},[17615,17619,17623,17627,17631,17635,17639,17643,17647],{"type":42,"tag":391,"props":17616,"children":17617},{"style":409},[17618],{"type":51,"value":17578},{"type":42,"tag":391,"props":17620,"children":17621},{"style":415},[17622],{"type":51,"value":7148},{"type":42,"tag":391,"props":17624,"children":17625},{"style":409},[17626],{"type":51,"value":247},{"type":42,"tag":391,"props":17628,"children":17629},{"style":415},[17630],{"type":51,"value":16704},{"type":42,"tag":391,"props":17632,"children":17633},{"style":409},[17634],{"type":51,"value":292},{"type":42,"tag":391,"props":17636,"children":17637},{"style":515},[17638],{"type":51,"value":17599},{"type":42,"tag":391,"props":17640,"children":17641},{"style":409},[17642],{"type":51,"value":7672},{"type":42,"tag":391,"props":17644,"children":17645},{"style":515},[17646],{"type":51,"value":7194},{"type":42,"tag":391,"props":17648,"children":17649},{"style":409},[17650],{"type":51,"value":16717},{"type":42,"tag":391,"props":17652,"children":17653},{"class":393,"line":6939},[17654,17658,17662],{"type":42,"tag":391,"props":17655,"children":17656},{"style":415},[17657],{"type":51,"value":16637},{"type":42,"tag":391,"props":17659,"children":17660},{"style":409},[17661],{"type":51,"value":247},{"type":42,"tag":391,"props":17663,"children":17664},{"style":415},[17665],{"type":51,"value":16733},{"type":42,"tag":391,"props":17667,"children":17668},{"class":393,"line":6948},[17669,17673,17677,17681,17685],{"type":42,"tag":391,"props":17670,"children":17671},{"style":515},[17672],{"type":51,"value":16741},{"type":42,"tag":391,"props":17674,"children":17675},{"style":415},[17676],{"type":51,"value":15019},{"type":42,"tag":391,"props":17678,"children":17679},{"style":409},[17680],{"type":51,"value":247},{"type":42,"tag":391,"props":17682,"children":17683},{"style":415},[17684],{"type":51,"value":15641},{"type":42,"tag":391,"props":17686,"children":17687},{"style":409},[17688],{"type":51,"value":7574},{"type":42,"tag":391,"props":17690,"children":17691},{"class":393,"line":6957},[17692,17696,17700,17704,17708],{"type":42,"tag":391,"props":17693,"children":17694},{"style":515},[17695],{"type":51,"value":16765},{"type":42,"tag":391,"props":17697,"children":17698},{"style":415},[17699],{"type":51,"value":15019},{"type":42,"tag":391,"props":17701,"children":17702},{"style":409},[17703],{"type":51,"value":247},{"type":42,"tag":391,"props":17705,"children":17706},{"style":415},[17707],{"type":51,"value":16778},{"type":42,"tag":391,"props":17709,"children":17710},{"style":409},[17711],{"type":51,"value":7600},{"type":42,"tag":391,"props":17713,"children":17714},{"class":393,"line":6966},[17715,17719,17723,17727,17731,17735,17739,17743],{"type":42,"tag":391,"props":17716,"children":17717},{"style":515},[17718],{"type":51,"value":16790},{"type":42,"tag":391,"props":17720,"children":17721},{"style":415},[17722],{"type":51,"value":7614},{"type":42,"tag":391,"props":17724,"children":17725},{"style":409},[17726],{"type":51,"value":247},{"type":42,"tag":391,"props":17728,"children":17729},{"style":415},[17730],{"type":51,"value":16646},{"type":42,"tag":391,"props":17732,"children":17733},{"style":515},[17734],{"type":51,"value":7627},{"type":42,"tag":391,"props":17736,"children":17737},{"style":415},[17738],{"type":51,"value":7632},{"type":42,"tag":391,"props":17740,"children":17741},{"style":409},[17742],{"type":51,"value":247},{"type":42,"tag":391,"props":17744,"children":17745},{"style":415},[17746],{"type":51,"value":16819},{"type":42,"tag":391,"props":17748,"children":17749},{"class":393,"line":6975},[17750,17754,17758,17762,17766,17770],{"type":42,"tag":391,"props":17751,"children":17752},{"style":515},[17753],{"type":51,"value":16827},{"type":42,"tag":391,"props":17755,"children":17756},{"style":415},[17757],{"type":51,"value":7614},{"type":42,"tag":391,"props":17759,"children":17760},{"style":409},[17761],{"type":51,"value":247},{"type":42,"tag":391,"props":17763,"children":17764},{"style":415},[17765],{"type":51,"value":16840},{"type":42,"tag":391,"props":17767,"children":17768},{"style":515},[17769],{"type":51,"value":7627},{"type":42,"tag":391,"props":17771,"children":17772},{"style":403},[17773],{"type":51,"value":16849},{"type":42,"tag":391,"props":17775,"children":17776},{"class":393,"line":6984},[17777],{"type":42,"tag":391,"props":17778,"children":17779},{"style":409},[17780],{"type":51,"value":16857},{"type":42,"tag":391,"props":17782,"children":17783},{"class":393,"line":7012},[17784,17788,17792],{"type":42,"tag":391,"props":17785,"children":17786},{"style":409},[17787],{"type":51,"value":16865},{"type":42,"tag":391,"props":17789,"children":17790},{"style":515},[17791],{"type":51,"value":7194},{"type":42,"tag":391,"props":17793,"children":17794},{"style":409},[17795],{"type":51,"value":16621},{"type":42,"tag":391,"props":17797,"children":17798},{"class":393,"line":7034},[17799],{"type":42,"tag":391,"props":17800,"children":17801},{"style":515},[17802],{"type":51,"value":16629},{"type":42,"tag":391,"props":17804,"children":17805},{"class":393,"line":7060},[17806],{"type":42,"tag":391,"props":17807,"children":17808},{"style":409},[17809],{"type":51,"value":16888},{"type":42,"tag":391,"props":17811,"children":17812},{"class":393,"line":7086},[17813,17817,17821,17825,17829,17833],{"type":42,"tag":391,"props":17814,"children":17815},{"style":415},[17816],{"type":51,"value":16896},{"type":42,"tag":391,"props":17818,"children":17819},{"style":409},[17820],{"type":51,"value":7143},{"type":42,"tag":391,"props":17822,"children":17823},{"style":515},[17824],{"type":51,"value":16905},{"type":42,"tag":391,"props":17826,"children":17827},{"style":409},[17828],{"type":51,"value":16910},{"type":42,"tag":391,"props":17830,"children":17831},{"style":515},[17832],{"type":51,"value":7194},{"type":42,"tag":391,"props":17834,"children":17835},{"style":409},[17836],{"type":51,"value":16919},{"type":42,"tag":391,"props":17838,"children":17839},{"class":393,"line":7111},[17840,17844],{"type":42,"tag":391,"props":17841,"children":17842},{"style":515},[17843],{"type":51,"value":16741},{"type":42,"tag":391,"props":17845,"children":17846},{"style":409},[17847],{"type":51,"value":16931},{"type":42,"tag":391,"props":17849,"children":17850},{"class":393,"line":7132},[17851,17855],{"type":42,"tag":391,"props":17852,"children":17853},{"style":515},[17854],{"type":51,"value":16939},{"type":42,"tag":391,"props":17856,"children":17857},{"style":409},[17858],{"type":51,"value":16944},{"type":42,"tag":391,"props":17860,"children":17861},{"class":393,"line":7202},[17862],{"type":42,"tag":391,"props":17863,"children":17864},{"style":409},[17865],{"type":51,"value":7700},{"type":42,"tag":391,"props":17867,"children":17868},{"class":393,"line":7264},[17869],{"type":42,"tag":391,"props":17870,"children":17871},{"style":515},[17872],{"type":51,"value":6981},{"type":42,"tag":391,"props":17874,"children":17875},{"class":393,"line":7326},[17876,17880,17884,17888],{"type":42,"tag":391,"props":17877,"children":17878},{"style":415},[17879],{"type":51,"value":16966},{"type":42,"tag":391,"props":17881,"children":17882},{"style":409},[17883],{"type":51,"value":247},{"type":42,"tag":391,"props":17885,"children":17886},{"style":415},[17887],{"type":51,"value":16975},{"type":42,"tag":391,"props":17889,"children":17890},{"style":409},[17891],{"type":51,"value":7031},{"type":42,"tag":391,"props":17893,"children":17894},{"class":393,"line":7388},[17895,17899,17903,17907],{"type":42,"tag":391,"props":17896,"children":17897},{"style":415},[17898],{"type":51,"value":16987},{"type":42,"tag":391,"props":17900,"children":17901},{"style":409},[17902],{"type":51,"value":247},{"type":42,"tag":391,"props":17904,"children":17905},{"style":415},[17906],{"type":51,"value":16996},{"type":42,"tag":391,"props":17908,"children":17909},{"style":409},[17910],{"type":51,"value":7031},{"type":42,"tag":391,"props":17912,"children":17913},{"class":393,"line":7409},[17914,17919,17923,17927,17931,17935,17939,17943,17947,17951,17955,17959,17963],{"type":42,"tag":391,"props":17915,"children":17916},{"style":409},[17917],{"type":51,"value":17918},"    DATE_DIFF(",{"type":42,"tag":391,"props":17920,"children":17921},{"style":415},[17922],{"type":51,"value":17026},{"type":42,"tag":391,"props":17924,"children":17925},{"style":409},[17926],{"type":51,"value":247},{"type":42,"tag":391,"props":17928,"children":17929},{"style":415},[17930],{"type":51,"value":17051},{"type":42,"tag":391,"props":17932,"children":17933},{"style":409},[17934],{"type":51,"value":292},{"type":42,"tag":391,"props":17936,"children":17937},{"style":415},[17938],{"type":51,"value":17026},{"type":42,"tag":391,"props":17940,"children":17941},{"style":409},[17942],{"type":51,"value":247},{"type":42,"tag":391,"props":17944,"children":17945},{"style":415},[17946],{"type":51,"value":16975},{"type":42,"tag":391,"props":17948,"children":17949},{"style":409},[17950],{"type":51,"value":292},{"type":42,"tag":391,"props":17952,"children":17953},{"style":515},[17954],{"type":51,"value":17599},{"type":42,"tag":391,"props":17956,"children":17957},{"style":409},[17958],{"type":51,"value":7672},{"type":42,"tag":391,"props":17960,"children":17961},{"style":515},[17962],{"type":51,"value":7194},{"type":42,"tag":391,"props":17964,"children":17965},{"style":409},[17966],{"type":51,"value":17064},{"type":42,"tag":391,"props":17968,"children":17969},{"class":393,"line":7430},[17970,17974,17978,17982,17986,17990,17994,17998,18002],{"type":42,"tag":391,"props":17971,"children":17972},{"style":415},[17973],{"type":51,"value":14682},{"type":42,"tag":391,"props":17975,"children":17976},{"style":409},[17977],{"type":51,"value":7143},{"type":42,"tag":391,"props":17979,"children":17980},{"style":515},[17981],{"type":51,"value":16905},{"type":42,"tag":391,"props":17983,"children":17984},{"style":415},[17985],{"type":51,"value":17084},{"type":42,"tag":391,"props":17987,"children":17988},{"style":409},[17989],{"type":51,"value":247},{"type":42,"tag":391,"props":17991,"children":17992},{"style":415},[17993],{"type":51,"value":16646},{"type":42,"tag":391,"props":17995,"children":17996},{"style":409},[17997],{"type":51,"value":7672},{"type":42,"tag":391,"props":17999,"children":18000},{"style":515},[18001],{"type":51,"value":7194},{"type":42,"tag":391,"props":18003,"children":18004},{"style":409},[18005],{"type":51,"value":17105},{"type":42,"tag":391,"props":18007,"children":18008},{"class":393,"line":7451},[18009,18013,18017,18021,18025,18029,18033,18037,18041,18045,18049,18053,18057,18061,18065,18069,18073,18077,18081,18085,18089,18093,18097,18101,18105],{"type":42,"tag":391,"props":18010,"children":18011},{"style":415},[18012],{"type":51,"value":14899},{"type":42,"tag":391,"props":18014,"children":18015},{"style":409},[18016],{"type":51,"value":7143},{"type":42,"tag":391,"props":18018,"children":18019},{"style":415},[18020],{"type":51,"value":15573},{"type":42,"tag":391,"props":18022,"children":18023},{"style":409},[18024],{"type":51,"value":7143},{"type":42,"tag":391,"props":18026,"children":18027},{"style":515},[18028],{"type":51,"value":16905},{"type":42,"tag":391,"props":18030,"children":18031},{"style":415},[18032],{"type":51,"value":17084},{"type":42,"tag":391,"props":18034,"children":18035},{"style":409},[18036],{"type":51,"value":247},{"type":42,"tag":391,"props":18038,"children":18039},{"style":415},[18040],{"type":51,"value":16646},{"type":42,"tag":391,"props":18042,"children":18043},{"style":409},[18044],{"type":51,"value":7672},{"type":42,"tag":391,"props":18046,"children":18047},{"style":515},[18048],{"type":51,"value":14909},{"type":42,"tag":391,"props":18050,"children":18051},{"style":415},[18052],{"type":51,"value":15495},{"type":42,"tag":391,"props":18054,"children":18055},{"style":409},[18056],{"type":51,"value":7143},{"type":42,"tag":391,"props":18058,"children":18059},{"style":415},[18060],{"type":51,"value":17134},{"type":42,"tag":391,"props":18062,"children":18063},{"style":409},[18064],{"type":51,"value":247},{"type":42,"tag":391,"props":18066,"children":18067},{"style":415},[18068],{"type":51,"value":16996},{"type":42,"tag":391,"props":18070,"children":18071},{"style":409},[18072],{"type":51,"value":292},{"type":42,"tag":391,"props":18074,"children":18075},{"style":415},[18076],{"type":51,"value":7485},{"type":42,"tag":391,"props":18078,"children":18079},{"style":409},[18080],{"type":51,"value":7672},{"type":42,"tag":391,"props":18082,"children":18083},{"style":515},[18084],{"type":51,"value":13108},{"type":42,"tag":391,"props":18086,"children":18087},{"style":415},[18088],{"type":51,"value":7476},{"type":42,"tag":391,"props":18090,"children":18091},{"style":409},[18092],{"type":51,"value":292},{"type":42,"tag":391,"props":18094,"children":18095},{"style":415},[18096],{"type":51,"value":7184},{"type":42,"tag":391,"props":18098,"children":18099},{"style":409},[18100],{"type":51,"value":7672},{"type":42,"tag":391,"props":18102,"children":18103},{"style":515},[18104],{"type":51,"value":7194},{"type":42,"tag":391,"props":18106,"children":18107},{"style":409},[18108],{"type":51,"value":17183},{"type":42,"tag":391,"props":18110,"children":18111},{"class":393,"line":7497},[18112,18116,18120,18124,18128,18132,18136,18140],{"type":42,"tag":391,"props":18113,"children":18114},{"style":415},[18115],{"type":51,"value":14767},{"type":42,"tag":391,"props":18117,"children":18118},{"style":409},[18119],{"type":51,"value":7143},{"type":42,"tag":391,"props":18121,"children":18122},{"style":415},[18123],{"type":51,"value":17026},{"type":42,"tag":391,"props":18125,"children":18126},{"style":409},[18127],{"type":51,"value":247},{"type":42,"tag":391,"props":18129,"children":18130},{"style":415},[18131],{"type":51,"value":17207},{"type":42,"tag":391,"props":18133,"children":18134},{"style":409},[18135],{"type":51,"value":7672},{"type":42,"tag":391,"props":18137,"children":18138},{"style":515},[18139],{"type":51,"value":7194},{"type":42,"tag":391,"props":18141,"children":18142},{"style":409},[18143],{"type":51,"value":17220},{"type":42,"tag":391,"props":18145,"children":18146},{"class":393,"line":7523},[18147,18151,18155,18159,18163,18167,18171,18175,18179,18183,18187,18191,18195,18199,18203,18207,18211,18215,18219,18223,18227],{"type":42,"tag":391,"props":18148,"children":18149},{"style":415},[18150],{"type":51,"value":14899},{"type":42,"tag":391,"props":18152,"children":18153},{"style":409},[18154],{"type":51,"value":7143},{"type":42,"tag":391,"props":18156,"children":18157},{"style":415},[18158],{"type":51,"value":15438},{"type":42,"tag":391,"props":18160,"children":18161},{"style":409},[18162],{"type":51,"value":7143},{"type":42,"tag":391,"props":18164,"children":18165},{"style":415},[18166],{"type":51,"value":17026},{"type":42,"tag":391,"props":18168,"children":18169},{"style":409},[18170],{"type":51,"value":247},{"type":42,"tag":391,"props":18172,"children":18173},{"style":415},[18174],{"type":51,"value":17207},{"type":42,"tag":391,"props":18176,"children":18177},{"style":409},[18178],{"type":51,"value":7672},{"type":42,"tag":391,"props":18180,"children":18181},{"style":515},[18182],{"type":51,"value":14909},{"type":42,"tag":391,"props":18184,"children":18185},{"style":415},[18186],{"type":51,"value":15495},{"type":42,"tag":391,"props":18188,"children":18189},{"style":409},[18190],{"type":51,"value":7143},{"type":42,"tag":391,"props":18192,"children":18193},{"style":415},[18194],{"type":51,"value":17134},{"type":42,"tag":391,"props":18196,"children":18197},{"style":409},[18198],{"type":51,"value":247},{"type":42,"tag":391,"props":18200,"children":18201},{"style":415},[18202],{"type":51,"value":16996},{"type":42,"tag":391,"props":18204,"children":18205},{"style":409},[18206],{"type":51,"value":292},{"type":42,"tag":391,"props":18208,"children":18209},{"style":415},[18210],{"type":51,"value":7485},{"type":42,"tag":391,"props":18212,"children":18213},{"style":409},[18214],{"type":51,"value":14928},{"type":42,"tag":391,"props":18216,"children":18217},{"style":415},[18218],{"type":51,"value":7184},{"type":42,"tag":391,"props":18220,"children":18221},{"style":409},[18222],{"type":51,"value":7672},{"type":42,"tag":391,"props":18224,"children":18225},{"style":515},[18226],{"type":51,"value":7194},{"type":42,"tag":391,"props":18228,"children":18229},{"style":409},[18230],{"type":51,"value":17285},{"type":42,"tag":391,"props":18232,"children":18233},{"class":393,"line":7549},[18234,18238],{"type":42,"tag":391,"props":18235,"children":18236},{"style":515},[18237],{"type":51,"value":7555},{"type":42,"tag":391,"props":18239,"children":18240},{"style":409},[18241],{"type":51,"value":17297},{"type":42,"tag":391,"props":18243,"children":18244},{"class":393,"line":7577},[18245,18249],{"type":42,"tag":391,"props":18246,"children":18247},{"style":515},[18248],{"type":51,"value":17305},{"type":42,"tag":391,"props":18250,"children":18251},{"style":409},[18252],{"type":51,"value":17310},{"type":42,"tag":391,"props":18254,"children":18255},{"class":393,"line":7603},[18256,18260,18264,18268,18272,18276,18280,18284],{"type":42,"tag":391,"props":18257,"children":18258},{"style":515},[18259],{"type":51,"value":7609},{"type":42,"tag":391,"props":18261,"children":18262},{"style":415},[18263],{"type":51,"value":17084},{"type":42,"tag":391,"props":18265,"children":18266},{"style":409},[18267],{"type":51,"value":247},{"type":42,"tag":391,"props":18269,"children":18270},{"style":415},[18271],{"type":51,"value":16975},{"type":42,"tag":391,"props":18273,"children":18274},{"style":515},[18275],{"type":51,"value":7627},{"type":42,"tag":391,"props":18277,"children":18278},{"style":415},[18279],{"type":51,"value":17338},{"type":42,"tag":391,"props":18281,"children":18282},{"style":409},[18283],{"type":51,"value":247},{"type":42,"tag":391,"props":18285,"children":18286},{"style":415},[18287],{"type":51,"value":17347},{"type":42,"tag":391,"props":18289,"children":18290},{"class":393,"line":7644},[18291,18295,18299,18303,18307,18311,18315,18319,18323],{"type":42,"tag":391,"props":18292,"children":18293},{"style":515},[18294],{"type":51,"value":13556},{"type":42,"tag":391,"props":18296,"children":18297},{"style":415},[18298],{"type":51,"value":17084},{"type":42,"tag":391,"props":18300,"children":18301},{"style":409},[18302],{"type":51,"value":247},{"type":42,"tag":391,"props":18304,"children":18305},{"style":415},[18306],{"type":51,"value":16975},{"type":42,"tag":391,"props":18308,"children":18309},{"style":409},[18310],{"type":51,"value":292},{"type":42,"tag":391,"props":18312,"children":18313},{"style":415},[18314],{"type":51,"value":17134},{"type":42,"tag":391,"props":18316,"children":18317},{"style":409},[18318],{"type":51,"value":247},{"type":42,"tag":391,"props":18320,"children":18321},{"style":415},[18322],{"type":51,"value":16996},{"type":42,"tag":391,"props":18324,"children":18325},{"style":409},[18326],{"type":51,"value":17387},{"type":42,"tag":391,"props":18328,"children":18329},{"class":393,"line":8522},[18330,18334,18338,18342,18346],{"type":42,"tag":391,"props":18331,"children":18332},{"style":515},[18333],{"type":51,"value":15048},{"type":42,"tag":391,"props":18335,"children":18336},{"style":415},[18337],{"type":51,"value":17084},{"type":42,"tag":391,"props":18339,"children":18340},{"style":409},[18341],{"type":51,"value":247},{"type":42,"tag":391,"props":18343,"children":18344},{"style":415},[18345],{"type":51,"value":16975},{"type":42,"tag":391,"props":18347,"children":18348},{"style":409},[18349],{"type":51,"value":17387},{"type":42,"tag":569,"props":18351,"children":18352},{"v-slot:snowflake":7},[18353],{"type":42,"tag":381,"props":18354,"children":18356},{"className":6761,"code":18355,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_customer_cohorts\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_orders\n  - staging.stg_customers\ncolumns:\n  - name: cohort_month\n    type: date\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nWITH customer_orders AS (\n    SELECT\n        o.customer_email,\n        DATE_TRUNC('month', c.first_seen_at) AS cohort_month,\n        DATE_TRUNC('month', o.order_date) AS order_month,\n        o.order_total\n    FROM staging.stg_orders o\n    INNER JOIN staging.stg_customers c\n        ON o.customer_email = c.customer_email\n    WHERE o.payment_status = 'paid'\n),\ncohort_sizes AS (\n    SELECT\n        cohort_month,\n        count(DISTINCT customer_email) AS cohort_size\n    FROM customer_orders\n    GROUP BY cohort_month\n)\nSELECT\n    co.cohort_month,\n    cs.cohort_size,\n    DATEDIFF('month', co.cohort_month, co.order_month) AS months_since_first,\n    count(DISTINCT co.customer_email) AS active_customers,\n    round(count(DISTINCT co.customer_email) \u002F NULLIF(cs.cohort_size, 0) * 100, 2) AS retention_rate,\n    sum(co.order_total) AS cohort_revenue,\n    round(sum(co.order_total) \u002F NULLIF(cs.cohort_size, 0), 2) AS revenue_per_customer\nFROM customer_orders co\nINNER JOIN cohort_sizes cs\n    ON co.cohort_month = cs.cohort_month\nGROUP BY co.cohort_month, cs.cohort_size, months_since_first\nORDER BY co.cohort_month, months_since_first\n",[18357],{"type":42,"tag":240,"props":18358,"children":18359},{"__ignoreMap":7},[18360,18367,18374,18381,18388,18395,18402,18409,18416,18423,18430,18437,18444,18451,18458,18465,18484,18491,18510,18549,18588,18603,18626,18649,18684,18711,18718,18733,18740,18747,18774,18785,18796,18803,18810,18829,18848,18908,18947,19050,19085,19172,19183,19194,19229,19268],{"type":42,"tag":391,"props":18361,"children":18362},{"class":393,"line":176},[18363],{"type":42,"tag":391,"props":18364,"children":18365},{"style":6773},[18366],{"type":51,"value":6776},{"type":42,"tag":391,"props":18368,"children":18369},{"class":393,"line":99},[18370],{"type":42,"tag":391,"props":18371,"children":18372},{"style":6773},[18373],{"type":51,"value":16506},{"type":42,"tag":391,"props":18375,"children":18376},{"class":393,"line":439},[18377],{"type":42,"tag":391,"props":18378,"children":18379},{"style":6773},[18380],{"type":51,"value":6792},{"type":42,"tag":391,"props":18382,"children":18383},{"class":393,"line":947},[18384],{"type":42,"tag":391,"props":18385,"children":18386},{"style":6773},[18387],{"type":51,"value":6800},{"type":42,"tag":391,"props":18389,"children":18390},{"class":393,"line":960},[18391],{"type":42,"tag":391,"props":18392,"children":18393},{"style":6773},[18394],{"type":51,"value":6808},{"type":42,"tag":391,"props":18396,"children":18397},{"class":393,"line":984},[18398],{"type":42,"tag":391,"props":18399,"children":18400},{"style":6773},[18401],{"type":51,"value":6816},{"type":42,"tag":391,"props":18403,"children":18404},{"class":393,"line":1002},[18405],{"type":42,"tag":391,"props":18406,"children":18407},{"style":6773},[18408],{"type":51,"value":14566},{"type":42,"tag":391,"props":18410,"children":18411},{"class":393,"line":165},[18412],{"type":42,"tag":391,"props":18413,"children":18414},{"style":6773},[18415],{"type":51,"value":16549},{"type":42,"tag":391,"props":18417,"children":18418},{"class":393,"line":2235},[18419],{"type":42,"tag":391,"props":18420,"children":18421},{"style":6773},[18422],{"type":51,"value":6840},{"type":42,"tag":391,"props":18424,"children":18425},{"class":393,"line":6843},[18426],{"type":42,"tag":391,"props":18427,"children":18428},{"style":6773},[18429],{"type":51,"value":16564},{"type":42,"tag":391,"props":18431,"children":18432},{"class":393,"line":6852},[18433],{"type":42,"tag":391,"props":18434,"children":18435},{"style":6773},[18436],{"type":51,"value":10874},{"type":42,"tag":391,"props":18438,"children":18439},{"class":393,"line":6861},[18440],{"type":42,"tag":391,"props":18441,"children":18442},{"style":6773},[18443],{"type":51,"value":6867},{"type":42,"tag":391,"props":18445,"children":18446},{"class":393,"line":6870},[18447],{"type":42,"tag":391,"props":18448,"children":18449},{"style":6773},[18450],{"type":51,"value":6876},{"type":42,"tag":391,"props":18452,"children":18453},{"class":393,"line":6879},[18454],{"type":42,"tag":391,"props":18455,"children":18456},{"style":6773},[18457],{"type":51,"value":6963},{"type":42,"tag":391,"props":18459,"children":18460},{"class":393,"line":1707},[18461],{"type":42,"tag":391,"props":18462,"children":18463},{"emptyLinePlaceholder":13},[18464],{"type":51,"value":6972},{"type":42,"tag":391,"props":18466,"children":18467},{"class":393,"line":6896},[18468,18472,18476,18480],{"type":42,"tag":391,"props":18469,"children":18470},{"style":515},[18471],{"type":51,"value":16607},{"type":42,"tag":391,"props":18473,"children":18474},{"style":409},[18475],{"type":51,"value":16612},{"type":42,"tag":391,"props":18477,"children":18478},{"style":515},[18479],{"type":51,"value":7194},{"type":42,"tag":391,"props":18481,"children":18482},{"style":409},[18483],{"type":51,"value":16621},{"type":42,"tag":391,"props":18485,"children":18486},{"class":393,"line":6905},[18487],{"type":42,"tag":391,"props":18488,"children":18489},{"style":515},[18490],{"type":51,"value":16629},{"type":42,"tag":391,"props":18492,"children":18493},{"class":393,"line":6913},[18494,18498,18502,18506],{"type":42,"tag":391,"props":18495,"children":18496},{"style":415},[18497],{"type":51,"value":16637},{"type":42,"tag":391,"props":18499,"children":18500},{"style":409},[18501],{"type":51,"value":247},{"type":42,"tag":391,"props":18503,"children":18504},{"style":415},[18505],{"type":51,"value":16646},{"type":42,"tag":391,"props":18507,"children":18508},{"style":409},[18509],{"type":51,"value":7031},{"type":42,"tag":391,"props":18511,"children":18512},{"class":393,"line":6921},[18513,18517,18521,18525,18529,18533,18537,18541,18545],{"type":42,"tag":391,"props":18514,"children":18515},{"style":409},[18516],{"type":51,"value":17578},{"type":42,"tag":391,"props":18518,"children":18519},{"style":403},[18520],{"type":51,"value":17017},{"type":42,"tag":391,"props":18522,"children":18523},{"style":409},[18524],{"type":51,"value":292},{"type":42,"tag":391,"props":18526,"children":18527},{"style":415},[18528],{"type":51,"value":7686},{"type":42,"tag":391,"props":18530,"children":18531},{"style":409},[18532],{"type":51,"value":247},{"type":42,"tag":391,"props":18534,"children":18535},{"style":415},[18536],{"type":51,"value":16671},{"type":42,"tag":391,"props":18538,"children":18539},{"style":409},[18540],{"type":51,"value":7672},{"type":42,"tag":391,"props":18542,"children":18543},{"style":515},[18544],{"type":51,"value":7194},{"type":42,"tag":391,"props":18546,"children":18547},{"style":409},[18548],{"type":51,"value":16684},{"type":42,"tag":391,"props":18550,"children":18551},{"class":393,"line":6930},[18552,18556,18560,18564,18568,18572,18576,18580,18584],{"type":42,"tag":391,"props":18553,"children":18554},{"style":409},[18555],{"type":51,"value":17578},{"type":42,"tag":391,"props":18557,"children":18558},{"style":403},[18559],{"type":51,"value":17017},{"type":42,"tag":391,"props":18561,"children":18562},{"style":409},[18563],{"type":51,"value":292},{"type":42,"tag":391,"props":18565,"children":18566},{"style":415},[18567],{"type":51,"value":7148},{"type":42,"tag":391,"props":18569,"children":18570},{"style":409},[18571],{"type":51,"value":247},{"type":42,"tag":391,"props":18573,"children":18574},{"style":415},[18575],{"type":51,"value":16704},{"type":42,"tag":391,"props":18577,"children":18578},{"style":409},[18579],{"type":51,"value":7672},{"type":42,"tag":391,"props":18581,"children":18582},{"style":515},[18583],{"type":51,"value":7194},{"type":42,"tag":391,"props":18585,"children":18586},{"style":409},[18587],{"type":51,"value":16717},{"type":42,"tag":391,"props":18589,"children":18590},{"class":393,"line":6939},[18591,18595,18599],{"type":42,"tag":391,"props":18592,"children":18593},{"style":415},[18594],{"type":51,"value":16637},{"type":42,"tag":391,"props":18596,"children":18597},{"style":409},[18598],{"type":51,"value":247},{"type":42,"tag":391,"props":18600,"children":18601},{"style":415},[18602],{"type":51,"value":16733},{"type":42,"tag":391,"props":18604,"children":18605},{"class":393,"line":6948},[18606,18610,18614,18618,18622],{"type":42,"tag":391,"props":18607,"children":18608},{"style":515},[18609],{"type":51,"value":16741},{"type":42,"tag":391,"props":18611,"children":18612},{"style":415},[18613],{"type":51,"value":15019},{"type":42,"tag":391,"props":18615,"children":18616},{"style":409},[18617],{"type":51,"value":247},{"type":42,"tag":391,"props":18619,"children":18620},{"style":415},[18621],{"type":51,"value":15641},{"type":42,"tag":391,"props":18623,"children":18624},{"style":409},[18625],{"type":51,"value":7574},{"type":42,"tag":391,"props":18627,"children":18628},{"class":393,"line":6957},[18629,18633,18637,18641,18645],{"type":42,"tag":391,"props":18630,"children":18631},{"style":515},[18632],{"type":51,"value":16765},{"type":42,"tag":391,"props":18634,"children":18635},{"style":415},[18636],{"type":51,"value":15019},{"type":42,"tag":391,"props":18638,"children":18639},{"style":409},[18640],{"type":51,"value":247},{"type":42,"tag":391,"props":18642,"children":18643},{"style":415},[18644],{"type":51,"value":16778},{"type":42,"tag":391,"props":18646,"children":18647},{"style":409},[18648],{"type":51,"value":7600},{"type":42,"tag":391,"props":18650,"children":18651},{"class":393,"line":6966},[18652,18656,18660,18664,18668,18672,18676,18680],{"type":42,"tag":391,"props":18653,"children":18654},{"style":515},[18655],{"type":51,"value":16790},{"type":42,"tag":391,"props":18657,"children":18658},{"style":415},[18659],{"type":51,"value":7614},{"type":42,"tag":391,"props":18661,"children":18662},{"style":409},[18663],{"type":51,"value":247},{"type":42,"tag":391,"props":18665,"children":18666},{"style":415},[18667],{"type":51,"value":16646},{"type":42,"tag":391,"props":18669,"children":18670},{"style":515},[18671],{"type":51,"value":7627},{"type":42,"tag":391,"props":18673,"children":18674},{"style":415},[18675],{"type":51,"value":7632},{"type":42,"tag":391,"props":18677,"children":18678},{"style":409},[18679],{"type":51,"value":247},{"type":42,"tag":391,"props":18681,"children":18682},{"style":415},[18683],{"type":51,"value":16819},{"type":42,"tag":391,"props":18685,"children":18686},{"class":393,"line":6975},[18687,18691,18695,18699,18703,18707],{"type":42,"tag":391,"props":18688,"children":18689},{"style":515},[18690],{"type":51,"value":16827},{"type":42,"tag":391,"props":18692,"children":18693},{"style":415},[18694],{"type":51,"value":7614},{"type":42,"tag":391,"props":18696,"children":18697},{"style":409},[18698],{"type":51,"value":247},{"type":42,"tag":391,"props":18700,"children":18701},{"style":415},[18702],{"type":51,"value":16840},{"type":42,"tag":391,"props":18704,"children":18705},{"style":515},[18706],{"type":51,"value":7627},{"type":42,"tag":391,"props":18708,"children":18709},{"style":403},[18710],{"type":51,"value":16849},{"type":42,"tag":391,"props":18712,"children":18713},{"class":393,"line":6984},[18714],{"type":42,"tag":391,"props":18715,"children":18716},{"style":409},[18717],{"type":51,"value":16857},{"type":42,"tag":391,"props":18719,"children":18720},{"class":393,"line":7012},[18721,18725,18729],{"type":42,"tag":391,"props":18722,"children":18723},{"style":409},[18724],{"type":51,"value":16865},{"type":42,"tag":391,"props":18726,"children":18727},{"style":515},[18728],{"type":51,"value":7194},{"type":42,"tag":391,"props":18730,"children":18731},{"style":409},[18732],{"type":51,"value":16621},{"type":42,"tag":391,"props":18734,"children":18735},{"class":393,"line":7034},[18736],{"type":42,"tag":391,"props":18737,"children":18738},{"style":515},[18739],{"type":51,"value":16629},{"type":42,"tag":391,"props":18741,"children":18742},{"class":393,"line":7060},[18743],{"type":42,"tag":391,"props":18744,"children":18745},{"style":409},[18746],{"type":51,"value":16888},{"type":42,"tag":391,"props":18748,"children":18749},{"class":393,"line":7086},[18750,18754,18758,18762,18766,18770],{"type":42,"tag":391,"props":18751,"children":18752},{"style":415},[18753],{"type":51,"value":16896},{"type":42,"tag":391,"props":18755,"children":18756},{"style":409},[18757],{"type":51,"value":7143},{"type":42,"tag":391,"props":18759,"children":18760},{"style":515},[18761],{"type":51,"value":16905},{"type":42,"tag":391,"props":18763,"children":18764},{"style":409},[18765],{"type":51,"value":16910},{"type":42,"tag":391,"props":18767,"children":18768},{"style":515},[18769],{"type":51,"value":7194},{"type":42,"tag":391,"props":18771,"children":18772},{"style":409},[18773],{"type":51,"value":16919},{"type":42,"tag":391,"props":18775,"children":18776},{"class":393,"line":7111},[18777,18781],{"type":42,"tag":391,"props":18778,"children":18779},{"style":515},[18780],{"type":51,"value":16741},{"type":42,"tag":391,"props":18782,"children":18783},{"style":409},[18784],{"type":51,"value":16931},{"type":42,"tag":391,"props":18786,"children":18787},{"class":393,"line":7132},[18788,18792],{"type":42,"tag":391,"props":18789,"children":18790},{"style":515},[18791],{"type":51,"value":16939},{"type":42,"tag":391,"props":18793,"children":18794},{"style":409},[18795],{"type":51,"value":16944},{"type":42,"tag":391,"props":18797,"children":18798},{"class":393,"line":7202},[18799],{"type":42,"tag":391,"props":18800,"children":18801},{"style":409},[18802],{"type":51,"value":7700},{"type":42,"tag":391,"props":18804,"children":18805},{"class":393,"line":7264},[18806],{"type":42,"tag":391,"props":18807,"children":18808},{"style":515},[18809],{"type":51,"value":6981},{"type":42,"tag":391,"props":18811,"children":18812},{"class":393,"line":7326},[18813,18817,18821,18825],{"type":42,"tag":391,"props":18814,"children":18815},{"style":415},[18816],{"type":51,"value":16966},{"type":42,"tag":391,"props":18818,"children":18819},{"style":409},[18820],{"type":51,"value":247},{"type":42,"tag":391,"props":18822,"children":18823},{"style":415},[18824],{"type":51,"value":16975},{"type":42,"tag":391,"props":18826,"children":18827},{"style":409},[18828],{"type":51,"value":7031},{"type":42,"tag":391,"props":18830,"children":18831},{"class":393,"line":7388},[18832,18836,18840,18844],{"type":42,"tag":391,"props":18833,"children":18834},{"style":415},[18835],{"type":51,"value":16987},{"type":42,"tag":391,"props":18837,"children":18838},{"style":409},[18839],{"type":51,"value":247},{"type":42,"tag":391,"props":18841,"children":18842},{"style":415},[18843],{"type":51,"value":16996},{"type":42,"tag":391,"props":18845,"children":18846},{"style":409},[18847],{"type":51,"value":7031},{"type":42,"tag":391,"props":18849,"children":18850},{"class":393,"line":7409},[18851,18856,18860,18864,18868,18872,18876,18880,18884,18888,18892,18896,18900,18904],{"type":42,"tag":391,"props":18852,"children":18853},{"style":415},[18854],{"type":51,"value":18855},"    DATEDIFF",{"type":42,"tag":391,"props":18857,"children":18858},{"style":409},[18859],{"type":51,"value":7143},{"type":42,"tag":391,"props":18861,"children":18862},{"style":403},[18863],{"type":51,"value":17017},{"type":42,"tag":391,"props":18865,"children":18866},{"style":409},[18867],{"type":51,"value":292},{"type":42,"tag":391,"props":18869,"children":18870},{"style":415},[18871],{"type":51,"value":17026},{"type":42,"tag":391,"props":18873,"children":18874},{"style":409},[18875],{"type":51,"value":247},{"type":42,"tag":391,"props":18877,"children":18878},{"style":415},[18879],{"type":51,"value":16975},{"type":42,"tag":391,"props":18881,"children":18882},{"style":409},[18883],{"type":51,"value":292},{"type":42,"tag":391,"props":18885,"children":18886},{"style":415},[18887],{"type":51,"value":17026},{"type":42,"tag":391,"props":18889,"children":18890},{"style":409},[18891],{"type":51,"value":247},{"type":42,"tag":391,"props":18893,"children":18894},{"style":415},[18895],{"type":51,"value":17051},{"type":42,"tag":391,"props":18897,"children":18898},{"style":409},[18899],{"type":51,"value":7672},{"type":42,"tag":391,"props":18901,"children":18902},{"style":515},[18903],{"type":51,"value":7194},{"type":42,"tag":391,"props":18905,"children":18906},{"style":409},[18907],{"type":51,"value":17064},{"type":42,"tag":391,"props":18909,"children":18910},{"class":393,"line":7430},[18911,18915,18919,18923,18927,18931,18935,18939,18943],{"type":42,"tag":391,"props":18912,"children":18913},{"style":415},[18914],{"type":51,"value":14682},{"type":42,"tag":391,"props":18916,"children":18917},{"style":409},[18918],{"type":51,"value":7143},{"type":42,"tag":391,"props":18920,"children":18921},{"style":515},[18922],{"type":51,"value":16905},{"type":42,"tag":391,"props":18924,"children":18925},{"style":415},[18926],{"type":51,"value":17084},{"type":42,"tag":391,"props":18928,"children":18929},{"style":409},[18930],{"type":51,"value":247},{"type":42,"tag":391,"props":18932,"children":18933},{"style":415},[18934],{"type":51,"value":16646},{"type":42,"tag":391,"props":18936,"children":18937},{"style":409},[18938],{"type":51,"value":7672},{"type":42,"tag":391,"props":18940,"children":18941},{"style":515},[18942],{"type":51,"value":7194},{"type":42,"tag":391,"props":18944,"children":18945},{"style":409},[18946],{"type":51,"value":17105},{"type":42,"tag":391,"props":18948,"children":18949},{"class":393,"line":7451},[18950,18954,18958,18962,18966,18970,18974,18978,18982,18986,18990,18994,18998,19002,19006,19010,19014,19018,19022,19026,19030,19034,19038,19042,19046],{"type":42,"tag":391,"props":18951,"children":18952},{"style":415},[18953],{"type":51,"value":14899},{"type":42,"tag":391,"props":18955,"children":18956},{"style":409},[18957],{"type":51,"value":7143},{"type":42,"tag":391,"props":18959,"children":18960},{"style":415},[18961],{"type":51,"value":15573},{"type":42,"tag":391,"props":18963,"children":18964},{"style":409},[18965],{"type":51,"value":7143},{"type":42,"tag":391,"props":18967,"children":18968},{"style":515},[18969],{"type":51,"value":16905},{"type":42,"tag":391,"props":18971,"children":18972},{"style":415},[18973],{"type":51,"value":17084},{"type":42,"tag":391,"props":18975,"children":18976},{"style":409},[18977],{"type":51,"value":247},{"type":42,"tag":391,"props":18979,"children":18980},{"style":415},[18981],{"type":51,"value":16646},{"type":42,"tag":391,"props":18983,"children":18984},{"style":409},[18985],{"type":51,"value":7672},{"type":42,"tag":391,"props":18987,"children":18988},{"style":515},[18989],{"type":51,"value":14909},{"type":42,"tag":391,"props":18991,"children":18992},{"style":415},[18993],{"type":51,"value":15495},{"type":42,"tag":391,"props":18995,"children":18996},{"style":409},[18997],{"type":51,"value":7143},{"type":42,"tag":391,"props":18999,"children":19000},{"style":415},[19001],{"type":51,"value":17134},{"type":42,"tag":391,"props":19003,"children":19004},{"style":409},[19005],{"type":51,"value":247},{"type":42,"tag":391,"props":19007,"children":19008},{"style":415},[19009],{"type":51,"value":16996},{"type":42,"tag":391,"props":19011,"children":19012},{"style":409},[19013],{"type":51,"value":292},{"type":42,"tag":391,"props":19015,"children":19016},{"style":415},[19017],{"type":51,"value":7485},{"type":42,"tag":391,"props":19019,"children":19020},{"style":409},[19021],{"type":51,"value":7672},{"type":42,"tag":391,"props":19023,"children":19024},{"style":515},[19025],{"type":51,"value":13108},{"type":42,"tag":391,"props":19027,"children":19028},{"style":415},[19029],{"type":51,"value":7476},{"type":42,"tag":391,"props":19031,"children":19032},{"style":409},[19033],{"type":51,"value":292},{"type":42,"tag":391,"props":19035,"children":19036},{"style":415},[19037],{"type":51,"value":7184},{"type":42,"tag":391,"props":19039,"children":19040},{"style":409},[19041],{"type":51,"value":7672},{"type":42,"tag":391,"props":19043,"children":19044},{"style":515},[19045],{"type":51,"value":7194},{"type":42,"tag":391,"props":19047,"children":19048},{"style":409},[19049],{"type":51,"value":17183},{"type":42,"tag":391,"props":19051,"children":19052},{"class":393,"line":7497},[19053,19057,19061,19065,19069,19073,19077,19081],{"type":42,"tag":391,"props":19054,"children":19055},{"style":415},[19056],{"type":51,"value":14767},{"type":42,"tag":391,"props":19058,"children":19059},{"style":409},[19060],{"type":51,"value":7143},{"type":42,"tag":391,"props":19062,"children":19063},{"style":415},[19064],{"type":51,"value":17026},{"type":42,"tag":391,"props":19066,"children":19067},{"style":409},[19068],{"type":51,"value":247},{"type":42,"tag":391,"props":19070,"children":19071},{"style":415},[19072],{"type":51,"value":17207},{"type":42,"tag":391,"props":19074,"children":19075},{"style":409},[19076],{"type":51,"value":7672},{"type":42,"tag":391,"props":19078,"children":19079},{"style":515},[19080],{"type":51,"value":7194},{"type":42,"tag":391,"props":19082,"children":19083},{"style":409},[19084],{"type":51,"value":17220},{"type":42,"tag":391,"props":19086,"children":19087},{"class":393,"line":7523},[19088,19092,19096,19100,19104,19108,19112,19116,19120,19124,19128,19132,19136,19140,19144,19148,19152,19156,19160,19164,19168],{"type":42,"tag":391,"props":19089,"children":19090},{"style":415},[19091],{"type":51,"value":14899},{"type":42,"tag":391,"props":19093,"children":19094},{"style":409},[19095],{"type":51,"value":7143},{"type":42,"tag":391,"props":19097,"children":19098},{"style":415},[19099],{"type":51,"value":15438},{"type":42,"tag":391,"props":19101,"children":19102},{"style":409},[19103],{"type":51,"value":7143},{"type":42,"tag":391,"props":19105,"children":19106},{"style":415},[19107],{"type":51,"value":17026},{"type":42,"tag":391,"props":19109,"children":19110},{"style":409},[19111],{"type":51,"value":247},{"type":42,"tag":391,"props":19113,"children":19114},{"style":415},[19115],{"type":51,"value":17207},{"type":42,"tag":391,"props":19117,"children":19118},{"style":409},[19119],{"type":51,"value":7672},{"type":42,"tag":391,"props":19121,"children":19122},{"style":515},[19123],{"type":51,"value":14909},{"type":42,"tag":391,"props":19125,"children":19126},{"style":415},[19127],{"type":51,"value":15495},{"type":42,"tag":391,"props":19129,"children":19130},{"style":409},[19131],{"type":51,"value":7143},{"type":42,"tag":391,"props":19133,"children":19134},{"style":415},[19135],{"type":51,"value":17134},{"type":42,"tag":391,"props":19137,"children":19138},{"style":409},[19139],{"type":51,"value":247},{"type":42,"tag":391,"props":19141,"children":19142},{"style":415},[19143],{"type":51,"value":16996},{"type":42,"tag":391,"props":19145,"children":19146},{"style":409},[19147],{"type":51,"value":292},{"type":42,"tag":391,"props":19149,"children":19150},{"style":415},[19151],{"type":51,"value":7485},{"type":42,"tag":391,"props":19153,"children":19154},{"style":409},[19155],{"type":51,"value":14928},{"type":42,"tag":391,"props":19157,"children":19158},{"style":415},[19159],{"type":51,"value":7184},{"type":42,"tag":391,"props":19161,"children":19162},{"style":409},[19163],{"type":51,"value":7672},{"type":42,"tag":391,"props":19165,"children":19166},{"style":515},[19167],{"type":51,"value":7194},{"type":42,"tag":391,"props":19169,"children":19170},{"style":409},[19171],{"type":51,"value":17285},{"type":42,"tag":391,"props":19173,"children":19174},{"class":393,"line":7549},[19175,19179],{"type":42,"tag":391,"props":19176,"children":19177},{"style":515},[19178],{"type":51,"value":7555},{"type":42,"tag":391,"props":19180,"children":19181},{"style":409},[19182],{"type":51,"value":17297},{"type":42,"tag":391,"props":19184,"children":19185},{"class":393,"line":7577},[19186,19190],{"type":42,"tag":391,"props":19187,"children":19188},{"style":515},[19189],{"type":51,"value":17305},{"type":42,"tag":391,"props":19191,"children":19192},{"style":409},[19193],{"type":51,"value":17310},{"type":42,"tag":391,"props":19195,"children":19196},{"class":393,"line":7603},[19197,19201,19205,19209,19213,19217,19221,19225],{"type":42,"tag":391,"props":19198,"children":19199},{"style":515},[19200],{"type":51,"value":7609},{"type":42,"tag":391,"props":19202,"children":19203},{"style":415},[19204],{"type":51,"value":17084},{"type":42,"tag":391,"props":19206,"children":19207},{"style":409},[19208],{"type":51,"value":247},{"type":42,"tag":391,"props":19210,"children":19211},{"style":415},[19212],{"type":51,"value":16975},{"type":42,"tag":391,"props":19214,"children":19215},{"style":515},[19216],{"type":51,"value":7627},{"type":42,"tag":391,"props":19218,"children":19219},{"style":415},[19220],{"type":51,"value":17338},{"type":42,"tag":391,"props":19222,"children":19223},{"style":409},[19224],{"type":51,"value":247},{"type":42,"tag":391,"props":19226,"children":19227},{"style":415},[19228],{"type":51,"value":17347},{"type":42,"tag":391,"props":19230,"children":19231},{"class":393,"line":7644},[19232,19236,19240,19244,19248,19252,19256,19260,19264],{"type":42,"tag":391,"props":19233,"children":19234},{"style":515},[19235],{"type":51,"value":13556},{"type":42,"tag":391,"props":19237,"children":19238},{"style":415},[19239],{"type":51,"value":17084},{"type":42,"tag":391,"props":19241,"children":19242},{"style":409},[19243],{"type":51,"value":247},{"type":42,"tag":391,"props":19245,"children":19246},{"style":415},[19247],{"type":51,"value":16975},{"type":42,"tag":391,"props":19249,"children":19250},{"style":409},[19251],{"type":51,"value":292},{"type":42,"tag":391,"props":19253,"children":19254},{"style":415},[19255],{"type":51,"value":17134},{"type":42,"tag":391,"props":19257,"children":19258},{"style":409},[19259],{"type":51,"value":247},{"type":42,"tag":391,"props":19261,"children":19262},{"style":415},[19263],{"type":51,"value":16996},{"type":42,"tag":391,"props":19265,"children":19266},{"style":409},[19267],{"type":51,"value":17387},{"type":42,"tag":391,"props":19269,"children":19270},{"class":393,"line":8522},[19271,19275,19279,19283,19287],{"type":42,"tag":391,"props":19272,"children":19273},{"style":515},[19274],{"type":51,"value":15048},{"type":42,"tag":391,"props":19276,"children":19277},{"style":415},[19278],{"type":51,"value":17084},{"type":42,"tag":391,"props":19280,"children":19281},{"style":409},[19282],{"type":51,"value":247},{"type":42,"tag":391,"props":19284,"children":19285},{"style":415},[19286],{"type":51,"value":16975},{"type":42,"tag":391,"props":19288,"children":19289},{"style":409},[19290],{"type":51,"value":17387},{"type":42,"tag":361,"props":19292,"children":19294},{"id":19293},"_3-product-performance-rpt_product_performancesql",[19295,19297],{"type":51,"value":19296},"3) Product performance - ",{"type":42,"tag":240,"props":19298,"children":19300},{"className":19299},[],[19301],{"type":51,"value":19302},"rpt_product_performance.sql",{"type":42,"tag":43,"props":19304,"children":19305},{},[19306],{"type":51,"value":19307},"A product catalog report showing all products with their key attributes and status.",{"type":42,"tag":339,"props":19309,"children":19310},{},[19311],{"type":42,"tag":43,"props":19312,"children":19313},{},[19314,19316,19321,19323,19329],{"type":51,"value":19315},"A full product performance report would need an order_line_items staging table to connect orders to individual products. Shopify stores line items as nested JSON in the orders table. For production use, ask Claude Code to create a ",{"type":42,"tag":240,"props":19317,"children":19319},{"className":19318},[],[19320],{"type":51,"value":6616},{"type":51,"value":19322}," asset that flattens this data. This simplified version shows product catalog metrics from ",{"type":42,"tag":240,"props":19324,"children":19326},{"className":19325},[],[19327],{"type":51,"value":19328},"stg_products",{"type":51,"value":247},{"type":42,"tag":43,"props":19331,"children":19332},{},[19333,19334,19343],{"type":51,"value":6741},{"type":42,"tag":47,"props":19335,"children":19336},{},[19337],{"type":42,"tag":240,"props":19338,"children":19340},{"className":19339},[],[19341],{"type":51,"value":19342},"ecommerce\u002Fassets\u002Freports\u002Frpt_product_performance.sql",{"type":51,"value":6752},{"type":42,"tag":381,"props":19345,"children":19347},{"className":6761,"code":19346,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_product_performance\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_products\ncolumns:\n  - name: product_id\n    type: varchar\n    checks:\n      - name: not_null\n      - name: unique\n@bruin *\u002F\n\nSELECT\n    product_id,\n    product_name,\n    category,\n    vendor,\n    price,\n    product_status,\n    created_at,\n    updated_at\nFROM staging.stg_products\nORDER BY product_name\n",[19348],{"type":42,"tag":240,"props":19349,"children":19350},{"__ignoreMap":7},[19351,19358,19366,19373,19380,19387,19394,19402,19409,19416,19423,19430,19437,19444,19451,19458,19465,19473,19481,19489,19496,19504,19512,19519,19526,19546],{"type":42,"tag":391,"props":19352,"children":19353},{"class":393,"line":176},[19354],{"type":42,"tag":391,"props":19355,"children":19356},{"style":6773},[19357],{"type":51,"value":6776},{"type":42,"tag":391,"props":19359,"children":19360},{"class":393,"line":99},[19361],{"type":42,"tag":391,"props":19362,"children":19363},{"style":6773},[19364],{"type":51,"value":19365},"name: reports.rpt_product_performance\n",{"type":42,"tag":391,"props":19367,"children":19368},{"class":393,"line":439},[19369],{"type":42,"tag":391,"props":19370,"children":19371},{"style":6773},[19372],{"type":51,"value":6792},{"type":42,"tag":391,"props":19374,"children":19375},{"class":393,"line":947},[19376],{"type":42,"tag":391,"props":19377,"children":19378},{"style":6773},[19379],{"type":51,"value":6800},{"type":42,"tag":391,"props":19381,"children":19382},{"class":393,"line":960},[19383],{"type":42,"tag":391,"props":19384,"children":19385},{"style":6773},[19386],{"type":51,"value":6808},{"type":42,"tag":391,"props":19388,"children":19389},{"class":393,"line":984},[19390],{"type":42,"tag":391,"props":19391,"children":19392},{"style":6773},[19393],{"type":51,"value":6816},{"type":42,"tag":391,"props":19395,"children":19396},{"class":393,"line":1002},[19397],{"type":42,"tag":391,"props":19398,"children":19399},{"style":6773},[19400],{"type":51,"value":19401},"  - staging.stg_products\n",{"type":42,"tag":391,"props":19403,"children":19404},{"class":393,"line":165},[19405],{"type":42,"tag":391,"props":19406,"children":19407},{"style":6773},[19408],{"type":51,"value":6840},{"type":42,"tag":391,"props":19410,"children":19411},{"class":393,"line":2235},[19412],{"type":42,"tag":391,"props":19413,"children":19414},{"style":6773},[19415],{"type":51,"value":10478},{"type":42,"tag":391,"props":19417,"children":19418},{"class":393,"line":6843},[19419],{"type":42,"tag":391,"props":19420,"children":19421},{"style":6773},[19422],{"type":51,"value":6858},{"type":42,"tag":391,"props":19424,"children":19425},{"class":393,"line":6852},[19426],{"type":42,"tag":391,"props":19427,"children":19428},{"style":6773},[19429],{"type":51,"value":6867},{"type":42,"tag":391,"props":19431,"children":19432},{"class":393,"line":6861},[19433],{"type":42,"tag":391,"props":19434,"children":19435},{"style":6773},[19436],{"type":51,"value":6876},{"type":42,"tag":391,"props":19438,"children":19439},{"class":393,"line":6870},[19440],{"type":42,"tag":391,"props":19441,"children":19442},{"style":6773},[19443],{"type":51,"value":6885},{"type":42,"tag":391,"props":19445,"children":19446},{"class":393,"line":6879},[19447],{"type":42,"tag":391,"props":19448,"children":19449},{"style":6773},[19450],{"type":51,"value":6963},{"type":42,"tag":391,"props":19452,"children":19453},{"class":393,"line":1707},[19454],{"type":42,"tag":391,"props":19455,"children":19456},{"emptyLinePlaceholder":13},[19457],{"type":51,"value":6972},{"type":42,"tag":391,"props":19459,"children":19460},{"class":393,"line":6896},[19461],{"type":42,"tag":391,"props":19462,"children":19463},{"style":515},[19464],{"type":51,"value":6981},{"type":42,"tag":391,"props":19466,"children":19467},{"class":393,"line":6905},[19468],{"type":42,"tag":391,"props":19469,"children":19470},{"style":409},[19471],{"type":51,"value":19472},"    product_id,\n",{"type":42,"tag":391,"props":19474,"children":19475},{"class":393,"line":6913},[19476],{"type":42,"tag":391,"props":19477,"children":19478},{"style":409},[19479],{"type":51,"value":19480},"    product_name,\n",{"type":42,"tag":391,"props":19482,"children":19483},{"class":393,"line":6921},[19484],{"type":42,"tag":391,"props":19485,"children":19486},{"style":409},[19487],{"type":51,"value":19488},"    category,\n",{"type":42,"tag":391,"props":19490,"children":19491},{"class":393,"line":6930},[19492],{"type":42,"tag":391,"props":19493,"children":19494},{"style":409},[19495],{"type":51,"value":10586},{"type":42,"tag":391,"props":19497,"children":19498},{"class":393,"line":6939},[19499],{"type":42,"tag":391,"props":19500,"children":19501},{"style":409},[19502],{"type":51,"value":19503},"    price,\n",{"type":42,"tag":391,"props":19505,"children":19506},{"class":393,"line":6948},[19507],{"type":42,"tag":391,"props":19508,"children":19509},{"style":409},[19510],{"type":51,"value":19511},"    product_status,\n",{"type":42,"tag":391,"props":19513,"children":19514},{"class":393,"line":6957},[19515],{"type":42,"tag":391,"props":19516,"children":19517},{"style":409},[19518],{"type":51,"value":10673},{"type":42,"tag":391,"props":19520,"children":19521},{"class":393,"line":6966},[19522],{"type":42,"tag":391,"props":19523,"children":19524},{"style":409},[19525],{"type":51,"value":10681},{"type":42,"tag":391,"props":19527,"children":19528},{"class":393,"line":6975},[19529,19533,19537,19541],{"type":42,"tag":391,"props":19530,"children":19531},{"style":515},[19532],{"type":51,"value":7555},{"type":42,"tag":391,"props":19534,"children":19535},{"style":415},[19536],{"type":51,"value":15019},{"type":42,"tag":391,"props":19538,"children":19539},{"style":409},[19540],{"type":51,"value":247},{"type":42,"tag":391,"props":19542,"children":19543},{"style":415},[19544],{"type":51,"value":19545},"stg_products\n",{"type":42,"tag":391,"props":19547,"children":19548},{"class":393,"line":6984},[19549,19553],{"type":42,"tag":391,"props":19550,"children":19551},{"style":515},[19552],{"type":51,"value":15048},{"type":42,"tag":391,"props":19554,"children":19555},{"style":409},[19556],{"type":51,"value":19557}," product_name\n",{"type":42,"tag":361,"props":19559,"children":19561},{"id":19560},"_4-marketing-roi-rpt_marketing_roisql",[19562,19564],{"type":51,"value":19563},"4) Marketing ROI - ",{"type":42,"tag":240,"props":19565,"children":19567},{"className":19566},[],[19568],{"type":51,"value":19569},"rpt_marketing_roi.sql",{"type":42,"tag":43,"props":19571,"children":19572},{},[19573],{"type":51,"value":19574},"Spend, revenue, and ROAS by marketing channel. This is the report that answers \"where should we spend more?\"",{"type":42,"tag":43,"props":19576,"children":19577},{},[19578,19579,19588],{"type":51,"value":6741},{"type":42,"tag":47,"props":19580,"children":19581},{},[19582],{"type":42,"tag":240,"props":19583,"children":19585},{"className":19584},[],[19586],{"type":51,"value":19587},"ecommerce\u002Fassets\u002Freports\u002Frpt_marketing_roi.sql",{"type":51,"value":6752},{"type":42,"tag":563,"props":19590,"children":19591},{":variants":565,"group":566},[19592,20954,22249],{"type":42,"tag":569,"props":19593,"children":19594},{"v-slot:clickhouse":7},[19595],{"type":42,"tag":381,"props":19596,"children":19598},{"className":6761,"code":19597,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_marketing_roi\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_marketing_spend\n  - staging.stg_web_sessions\n  - staging.stg_orders\ncolumns:\n  - name: channel\n    type: varchar\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nWITH channel_spend AS (\n    SELECT\n        spend_date,\n        channel,\n        sum(spend) AS total_spend,\n        sum(impressions) AS total_impressions,\n        sum(clicks) AS total_clicks,\n        sum(conversions) AS total_conversions\n    FROM staging.stg_marketing_spend\n    GROUP BY spend_date, channel\n),\nchannel_sessions AS (\n    SELECT\n        session_date,\n        channel,\n        sum(total_sessions) AS sessions,\n        sum(new_users) AS new_users,\n        sum(purchase_events) AS purchases\n    FROM staging.stg_web_sessions\n    GROUP BY session_date, channel\n),\nchannel_revenue AS (\n    SELECT\n        toDate(order_date) AS order_date,\n        ws.channel,\n        sum(o.order_total) AS attributed_revenue\n    FROM staging.stg_orders o\n    INNER JOIN staging.stg_web_sessions ws\n        ON toDate(o.order_date) = ws.session_date\n    WHERE o.payment_status = 'paid'\n    GROUP BY toDate(order_date), ws.channel\n)\nSELECT\n    cs.spend_date AS report_date,\n    cs.channel,\n    cs.total_spend,\n    cs.total_impressions,\n    cs.total_clicks,\n    cs.total_conversions,\n    sess.sessions,\n    sess.new_users,\n    cr.attributed_revenue,\n    round(cr.attributed_revenue \u002F nullIf(cs.total_spend, 0), 2) AS roas,\n    round(cs.total_spend \u002F nullIf(cs.total_conversions, 0), 2) AS cost_per_acquisition,\n    round(cs.total_clicks \u002F nullIf(cs.total_impressions, 0) * 100, 2) AS click_through_rate\nFROM channel_spend cs\nLEFT JOIN channel_sessions sess\n    ON cs.spend_date = sess.session_date\n    AND cs.channel = sess.channel\nLEFT JOIN channel_revenue cr\n    ON cs.spend_date = cr.order_date\n    AND cs.channel = cr.channel\nORDER BY cs.spend_date DESC, cs.total_spend DESC\n",[19599],{"type":42,"tag":240,"props":19600,"children":19601},{"__ignoreMap":7},[19602,19609,19617,19624,19631,19638,19645,19653,19661,19668,19675,19683,19690,19697,19704,19711,19718,19738,19745,19753,19761,19783,19804,19825,19846,19866,19878,19885,19901,19908,19916,19923,19948,19968,19989,20009,20021,20028,20044,20051,20067,20088,20124,20147,20172,20217,20244,20270,20278,20286,20312,20332,20353,20374,20395,20416,20437,20457,20479,20557,20634,20723,20736,20749,20786,20822,20835,20873,20909],{"type":42,"tag":391,"props":19603,"children":19604},{"class":393,"line":176},[19605],{"type":42,"tag":391,"props":19606,"children":19607},{"style":6773},[19608],{"type":51,"value":6776},{"type":42,"tag":391,"props":19610,"children":19611},{"class":393,"line":99},[19612],{"type":42,"tag":391,"props":19613,"children":19614},{"style":6773},[19615],{"type":51,"value":19616},"name: reports.rpt_marketing_roi\n",{"type":42,"tag":391,"props":19618,"children":19619},{"class":393,"line":439},[19620],{"type":42,"tag":391,"props":19621,"children":19622},{"style":6773},[19623],{"type":51,"value":6792},{"type":42,"tag":391,"props":19625,"children":19626},{"class":393,"line":947},[19627],{"type":42,"tag":391,"props":19628,"children":19629},{"style":6773},[19630],{"type":51,"value":6800},{"type":42,"tag":391,"props":19632,"children":19633},{"class":393,"line":960},[19634],{"type":42,"tag":391,"props":19635,"children":19636},{"style":6773},[19637],{"type":51,"value":6808},{"type":42,"tag":391,"props":19639,"children":19640},{"class":393,"line":984},[19641],{"type":42,"tag":391,"props":19642,"children":19643},{"style":6773},[19644],{"type":51,"value":6816},{"type":42,"tag":391,"props":19646,"children":19647},{"class":393,"line":1002},[19648],{"type":42,"tag":391,"props":19649,"children":19650},{"style":6773},[19651],{"type":51,"value":19652},"  - staging.stg_marketing_spend\n",{"type":42,"tag":391,"props":19654,"children":19655},{"class":393,"line":165},[19656],{"type":42,"tag":391,"props":19657,"children":19658},{"style":6773},[19659],{"type":51,"value":19660},"  - staging.stg_web_sessions\n",{"type":42,"tag":391,"props":19662,"children":19663},{"class":393,"line":2235},[19664],{"type":42,"tag":391,"props":19665,"children":19666},{"style":6773},[19667],{"type":51,"value":14566},{"type":42,"tag":391,"props":19669,"children":19670},{"class":393,"line":6843},[19671],{"type":42,"tag":391,"props":19672,"children":19673},{"style":6773},[19674],{"type":51,"value":6840},{"type":42,"tag":391,"props":19676,"children":19677},{"class":393,"line":6852},[19678],{"type":42,"tag":391,"props":19679,"children":19680},{"style":6773},[19681],{"type":51,"value":19682},"  - name: channel\n",{"type":42,"tag":391,"props":19684,"children":19685},{"class":393,"line":6861},[19686],{"type":42,"tag":391,"props":19687,"children":19688},{"style":6773},[19689],{"type":51,"value":6858},{"type":42,"tag":391,"props":19691,"children":19692},{"class":393,"line":6870},[19693],{"type":42,"tag":391,"props":19694,"children":19695},{"style":6773},[19696],{"type":51,"value":6867},{"type":42,"tag":391,"props":19698,"children":19699},{"class":393,"line":6879},[19700],{"type":42,"tag":391,"props":19701,"children":19702},{"style":6773},[19703],{"type":51,"value":6876},{"type":42,"tag":391,"props":19705,"children":19706},{"class":393,"line":1707},[19707],{"type":42,"tag":391,"props":19708,"children":19709},{"style":6773},[19710],{"type":51,"value":6963},{"type":42,"tag":391,"props":19712,"children":19713},{"class":393,"line":6896},[19714],{"type":42,"tag":391,"props":19715,"children":19716},{"emptyLinePlaceholder":13},[19717],{"type":51,"value":6972},{"type":42,"tag":391,"props":19719,"children":19720},{"class":393,"line":6905},[19721,19725,19730,19734],{"type":42,"tag":391,"props":19722,"children":19723},{"style":515},[19724],{"type":51,"value":16607},{"type":42,"tag":391,"props":19726,"children":19727},{"style":409},[19728],{"type":51,"value":19729}," channel_spend ",{"type":42,"tag":391,"props":19731,"children":19732},{"style":515},[19733],{"type":51,"value":7194},{"type":42,"tag":391,"props":19735,"children":19736},{"style":409},[19737],{"type":51,"value":16621},{"type":42,"tag":391,"props":19739,"children":19740},{"class":393,"line":6913},[19741],{"type":42,"tag":391,"props":19742,"children":19743},{"style":515},[19744],{"type":51,"value":16629},{"type":42,"tag":391,"props":19746,"children":19747},{"class":393,"line":6921},[19748],{"type":42,"tag":391,"props":19749,"children":19750},{"style":409},[19751],{"type":51,"value":19752},"        spend_date,\n",{"type":42,"tag":391,"props":19754,"children":19755},{"class":393,"line":6930},[19756],{"type":42,"tag":391,"props":19757,"children":19758},{"style":409},[19759],{"type":51,"value":19760},"        channel,\n",{"type":42,"tag":391,"props":19762,"children":19763},{"class":393,"line":6939},[19764,19769,19774,19778],{"type":42,"tag":391,"props":19765,"children":19766},{"style":415},[19767],{"type":51,"value":19768},"        sum",{"type":42,"tag":391,"props":19770,"children":19771},{"style":409},[19772],{"type":51,"value":19773},"(spend) ",{"type":42,"tag":391,"props":19775,"children":19776},{"style":515},[19777],{"type":51,"value":7194},{"type":42,"tag":391,"props":19779,"children":19780},{"style":409},[19781],{"type":51,"value":19782}," total_spend,\n",{"type":42,"tag":391,"props":19784,"children":19785},{"class":393,"line":6948},[19786,19790,19795,19799],{"type":42,"tag":391,"props":19787,"children":19788},{"style":415},[19789],{"type":51,"value":19768},{"type":42,"tag":391,"props":19791,"children":19792},{"style":409},[19793],{"type":51,"value":19794},"(impressions) ",{"type":42,"tag":391,"props":19796,"children":19797},{"style":515},[19798],{"type":51,"value":7194},{"type":42,"tag":391,"props":19800,"children":19801},{"style":409},[19802],{"type":51,"value":19803}," total_impressions,\n",{"type":42,"tag":391,"props":19805,"children":19806},{"class":393,"line":6957},[19807,19811,19816,19820],{"type":42,"tag":391,"props":19808,"children":19809},{"style":415},[19810],{"type":51,"value":19768},{"type":42,"tag":391,"props":19812,"children":19813},{"style":409},[19814],{"type":51,"value":19815},"(clicks) ",{"type":42,"tag":391,"props":19817,"children":19818},{"style":515},[19819],{"type":51,"value":7194},{"type":42,"tag":391,"props":19821,"children":19822},{"style":409},[19823],{"type":51,"value":19824}," total_clicks,\n",{"type":42,"tag":391,"props":19826,"children":19827},{"class":393,"line":6966},[19828,19832,19837,19841],{"type":42,"tag":391,"props":19829,"children":19830},{"style":415},[19831],{"type":51,"value":19768},{"type":42,"tag":391,"props":19833,"children":19834},{"style":409},[19835],{"type":51,"value":19836},"(conversions) ",{"type":42,"tag":391,"props":19838,"children":19839},{"style":515},[19840],{"type":51,"value":7194},{"type":42,"tag":391,"props":19842,"children":19843},{"style":409},[19844],{"type":51,"value":19845}," total_conversions\n",{"type":42,"tag":391,"props":19847,"children":19848},{"class":393,"line":6975},[19849,19853,19857,19861],{"type":42,"tag":391,"props":19850,"children":19851},{"style":515},[19852],{"type":51,"value":16741},{"type":42,"tag":391,"props":19854,"children":19855},{"style":415},[19856],{"type":51,"value":15019},{"type":42,"tag":391,"props":19858,"children":19859},{"style":409},[19860],{"type":51,"value":247},{"type":42,"tag":391,"props":19862,"children":19863},{"style":415},[19864],{"type":51,"value":19865},"stg_marketing_spend\n",{"type":42,"tag":391,"props":19867,"children":19868},{"class":393,"line":6984},[19869,19873],{"type":42,"tag":391,"props":19870,"children":19871},{"style":515},[19872],{"type":51,"value":16939},{"type":42,"tag":391,"props":19874,"children":19875},{"style":409},[19876],{"type":51,"value":19877}," spend_date, channel\n",{"type":42,"tag":391,"props":19879,"children":19880},{"class":393,"line":7012},[19881],{"type":42,"tag":391,"props":19882,"children":19883},{"style":409},[19884],{"type":51,"value":16857},{"type":42,"tag":391,"props":19886,"children":19887},{"class":393,"line":7034},[19888,19893,19897],{"type":42,"tag":391,"props":19889,"children":19890},{"style":409},[19891],{"type":51,"value":19892},"channel_sessions ",{"type":42,"tag":391,"props":19894,"children":19895},{"style":515},[19896],{"type":51,"value":7194},{"type":42,"tag":391,"props":19898,"children":19899},{"style":409},[19900],{"type":51,"value":16621},{"type":42,"tag":391,"props":19902,"children":19903},{"class":393,"line":7060},[19904],{"type":42,"tag":391,"props":19905,"children":19906},{"style":515},[19907],{"type":51,"value":16629},{"type":42,"tag":391,"props":19909,"children":19910},{"class":393,"line":7086},[19911],{"type":42,"tag":391,"props":19912,"children":19913},{"style":409},[19914],{"type":51,"value":19915},"        session_date,\n",{"type":42,"tag":391,"props":19917,"children":19918},{"class":393,"line":7111},[19919],{"type":42,"tag":391,"props":19920,"children":19921},{"style":409},[19922],{"type":51,"value":19760},{"type":42,"tag":391,"props":19924,"children":19925},{"class":393,"line":7132},[19926,19930,19935,19939,19944],{"type":42,"tag":391,"props":19927,"children":19928},{"style":415},[19929],{"type":51,"value":19768},{"type":42,"tag":391,"props":19931,"children":19932},{"style":409},[19933],{"type":51,"value":19934},"(total_sessions) ",{"type":42,"tag":391,"props":19936,"children":19937},{"style":515},[19938],{"type":51,"value":7194},{"type":42,"tag":391,"props":19940,"children":19941},{"style":515},[19942],{"type":51,"value":19943}," sessions",{"type":42,"tag":391,"props":19945,"children":19946},{"style":409},[19947],{"type":51,"value":7031},{"type":42,"tag":391,"props":19949,"children":19950},{"class":393,"line":7202},[19951,19955,19960,19964],{"type":42,"tag":391,"props":19952,"children":19953},{"style":415},[19954],{"type":51,"value":19768},{"type":42,"tag":391,"props":19956,"children":19957},{"style":409},[19958],{"type":51,"value":19959},"(new_users) ",{"type":42,"tag":391,"props":19961,"children":19962},{"style":515},[19963],{"type":51,"value":7194},{"type":42,"tag":391,"props":19965,"children":19966},{"style":409},[19967],{"type":51,"value":13190},{"type":42,"tag":391,"props":19969,"children":19970},{"class":393,"line":7264},[19971,19975,19980,19984],{"type":42,"tag":391,"props":19972,"children":19973},{"style":415},[19974],{"type":51,"value":19768},{"type":42,"tag":391,"props":19976,"children":19977},{"style":409},[19978],{"type":51,"value":19979},"(purchase_events) ",{"type":42,"tag":391,"props":19981,"children":19982},{"style":515},[19983],{"type":51,"value":7194},{"type":42,"tag":391,"props":19985,"children":19986},{"style":409},[19987],{"type":51,"value":19988}," purchases\n",{"type":42,"tag":391,"props":19990,"children":19991},{"class":393,"line":7326},[19992,19996,20000,20004],{"type":42,"tag":391,"props":19993,"children":19994},{"style":515},[19995],{"type":51,"value":16741},{"type":42,"tag":391,"props":19997,"children":19998},{"style":415},[19999],{"type":51,"value":15019},{"type":42,"tag":391,"props":20001,"children":20002},{"style":409},[20003],{"type":51,"value":247},{"type":42,"tag":391,"props":20005,"children":20006},{"style":415},[20007],{"type":51,"value":20008},"stg_web_sessions\n",{"type":42,"tag":391,"props":20010,"children":20011},{"class":393,"line":7388},[20012,20016],{"type":42,"tag":391,"props":20013,"children":20014},{"style":515},[20015],{"type":51,"value":16939},{"type":42,"tag":391,"props":20017,"children":20018},{"style":409},[20019],{"type":51,"value":20020}," session_date, channel\n",{"type":42,"tag":391,"props":20022,"children":20023},{"class":393,"line":7409},[20024],{"type":42,"tag":391,"props":20025,"children":20026},{"style":409},[20027],{"type":51,"value":16857},{"type":42,"tag":391,"props":20029,"children":20030},{"class":393,"line":7430},[20031,20036,20040],{"type":42,"tag":391,"props":20032,"children":20033},{"style":409},[20034],{"type":51,"value":20035},"channel_revenue ",{"type":42,"tag":391,"props":20037,"children":20038},{"style":515},[20039],{"type":51,"value":7194},{"type":42,"tag":391,"props":20041,"children":20042},{"style":409},[20043],{"type":51,"value":16621},{"type":42,"tag":391,"props":20045,"children":20046},{"class":393,"line":7451},[20047],{"type":42,"tag":391,"props":20048,"children":20049},{"style":515},[20050],{"type":51,"value":16629},{"type":42,"tag":391,"props":20052,"children":20053},{"class":393,"line":7497},[20054,20059,20063],{"type":42,"tag":391,"props":20055,"children":20056},{"style":409},[20057],{"type":51,"value":20058},"        toDate(order_date) ",{"type":42,"tag":391,"props":20060,"children":20061},{"style":515},[20062],{"type":51,"value":7194},{"type":42,"tag":391,"props":20064,"children":20065},{"style":409},[20066],{"type":51,"value":7083},{"type":42,"tag":391,"props":20068,"children":20069},{"class":393,"line":7523},[20070,20075,20079,20084],{"type":42,"tag":391,"props":20071,"children":20072},{"style":415},[20073],{"type":51,"value":20074},"        ws",{"type":42,"tag":391,"props":20076,"children":20077},{"style":409},[20078],{"type":51,"value":247},{"type":42,"tag":391,"props":20080,"children":20081},{"style":415},[20082],{"type":51,"value":20083},"channel",{"type":42,"tag":391,"props":20085,"children":20086},{"style":409},[20087],{"type":51,"value":7031},{"type":42,"tag":391,"props":20089,"children":20090},{"class":393,"line":7549},[20091,20095,20099,20103,20107,20111,20115,20119],{"type":42,"tag":391,"props":20092,"children":20093},{"style":415},[20094],{"type":51,"value":19768},{"type":42,"tag":391,"props":20096,"children":20097},{"style":409},[20098],{"type":51,"value":7143},{"type":42,"tag":391,"props":20100,"children":20101},{"style":415},[20102],{"type":51,"value":7148},{"type":42,"tag":391,"props":20104,"children":20105},{"style":409},[20106],{"type":51,"value":247},{"type":42,"tag":391,"props":20108,"children":20109},{"style":415},[20110],{"type":51,"value":17207},{"type":42,"tag":391,"props":20112,"children":20113},{"style":409},[20114],{"type":51,"value":7672},{"type":42,"tag":391,"props":20116,"children":20117},{"style":515},[20118],{"type":51,"value":7194},{"type":42,"tag":391,"props":20120,"children":20121},{"style":409},[20122],{"type":51,"value":20123}," attributed_revenue\n",{"type":42,"tag":391,"props":20125,"children":20126},{"class":393,"line":7577},[20127,20131,20135,20139,20143],{"type":42,"tag":391,"props":20128,"children":20129},{"style":515},[20130],{"type":51,"value":16741},{"type":42,"tag":391,"props":20132,"children":20133},{"style":415},[20134],{"type":51,"value":15019},{"type":42,"tag":391,"props":20136,"children":20137},{"style":409},[20138],{"type":51,"value":247},{"type":42,"tag":391,"props":20140,"children":20141},{"style":415},[20142],{"type":51,"value":15641},{"type":42,"tag":391,"props":20144,"children":20145},{"style":409},[20146],{"type":51,"value":7574},{"type":42,"tag":391,"props":20148,"children":20149},{"class":393,"line":7603},[20150,20154,20158,20162,20167],{"type":42,"tag":391,"props":20151,"children":20152},{"style":515},[20153],{"type":51,"value":16765},{"type":42,"tag":391,"props":20155,"children":20156},{"style":415},[20157],{"type":51,"value":15019},{"type":42,"tag":391,"props":20159,"children":20160},{"style":409},[20161],{"type":51,"value":247},{"type":42,"tag":391,"props":20163,"children":20164},{"style":415},[20165],{"type":51,"value":20166},"stg_web_sessions",{"type":42,"tag":391,"props":20168,"children":20169},{"style":409},[20170],{"type":51,"value":20171}," ws\n",{"type":42,"tag":391,"props":20173,"children":20174},{"class":393,"line":7644},[20175,20179,20183,20187,20191,20195,20199,20203,20208,20212],{"type":42,"tag":391,"props":20176,"children":20177},{"style":515},[20178],{"type":51,"value":16790},{"type":42,"tag":391,"props":20180,"children":20181},{"style":409},[20182],{"type":51,"value":7655},{"type":42,"tag":391,"props":20184,"children":20185},{"style":415},[20186],{"type":51,"value":7148},{"type":42,"tag":391,"props":20188,"children":20189},{"style":409},[20190],{"type":51,"value":247},{"type":42,"tag":391,"props":20192,"children":20193},{"style":415},[20194],{"type":51,"value":16704},{"type":42,"tag":391,"props":20196,"children":20197},{"style":409},[20198],{"type":51,"value":7672},{"type":42,"tag":391,"props":20200,"children":20201},{"style":515},[20202],{"type":51,"value":7677},{"type":42,"tag":391,"props":20204,"children":20205},{"style":415},[20206],{"type":51,"value":20207}," ws",{"type":42,"tag":391,"props":20209,"children":20210},{"style":409},[20211],{"type":51,"value":247},{"type":42,"tag":391,"props":20213,"children":20214},{"style":415},[20215],{"type":51,"value":20216},"session_date\n",{"type":42,"tag":391,"props":20218,"children":20219},{"class":393,"line":8522},[20220,20224,20228,20232,20236,20240],{"type":42,"tag":391,"props":20221,"children":20222},{"style":515},[20223],{"type":51,"value":16827},{"type":42,"tag":391,"props":20225,"children":20226},{"style":415},[20227],{"type":51,"value":7614},{"type":42,"tag":391,"props":20229,"children":20230},{"style":409},[20231],{"type":51,"value":247},{"type":42,"tag":391,"props":20233,"children":20234},{"style":415},[20235],{"type":51,"value":16840},{"type":42,"tag":391,"props":20237,"children":20238},{"style":515},[20239],{"type":51,"value":7627},{"type":42,"tag":391,"props":20241,"children":20242},{"style":403},[20243],{"type":51,"value":16849},{"type":42,"tag":391,"props":20245,"children":20246},{"class":393,"line":8581},[20247,20251,20256,20261,20265],{"type":42,"tag":391,"props":20248,"children":20249},{"style":515},[20250],{"type":51,"value":16939},{"type":42,"tag":391,"props":20252,"children":20253},{"style":409},[20254],{"type":51,"value":20255}," toDate(order_date), ",{"type":42,"tag":391,"props":20257,"children":20258},{"style":415},[20259],{"type":51,"value":20260},"ws",{"type":42,"tag":391,"props":20262,"children":20263},{"style":409},[20264],{"type":51,"value":247},{"type":42,"tag":391,"props":20266,"children":20267},{"style":415},[20268],{"type":51,"value":20269},"channel\n",{"type":42,"tag":391,"props":20271,"children":20273},{"class":393,"line":20272},48,[20274],{"type":42,"tag":391,"props":20275,"children":20276},{"style":409},[20277],{"type":51,"value":7700},{"type":42,"tag":391,"props":20279,"children":20281},{"class":393,"line":20280},49,[20282],{"type":42,"tag":391,"props":20283,"children":20284},{"style":515},[20285],{"type":51,"value":6981},{"type":42,"tag":391,"props":20287,"children":20289},{"class":393,"line":20288},50,[20290,20294,20298,20303,20307],{"type":42,"tag":391,"props":20291,"children":20292},{"style":415},[20293],{"type":51,"value":16987},{"type":42,"tag":391,"props":20295,"children":20296},{"style":409},[20297],{"type":51,"value":247},{"type":42,"tag":391,"props":20299,"children":20300},{"style":415},[20301],{"type":51,"value":20302},"spend_date",{"type":42,"tag":391,"props":20304,"children":20305},{"style":515},[20306],{"type":51,"value":7004},{"type":42,"tag":391,"props":20308,"children":20309},{"style":409},[20310],{"type":51,"value":20311}," report_date,\n",{"type":42,"tag":391,"props":20313,"children":20315},{"class":393,"line":20314},51,[20316,20320,20324,20328],{"type":42,"tag":391,"props":20317,"children":20318},{"style":415},[20319],{"type":51,"value":16987},{"type":42,"tag":391,"props":20321,"children":20322},{"style":409},[20323],{"type":51,"value":247},{"type":42,"tag":391,"props":20325,"children":20326},{"style":415},[20327],{"type":51,"value":20083},{"type":42,"tag":391,"props":20329,"children":20330},{"style":409},[20331],{"type":51,"value":7031},{"type":42,"tag":391,"props":20333,"children":20335},{"class":393,"line":20334},52,[20336,20340,20344,20349],{"type":42,"tag":391,"props":20337,"children":20338},{"style":415},[20339],{"type":51,"value":16987},{"type":42,"tag":391,"props":20341,"children":20342},{"style":409},[20343],{"type":51,"value":247},{"type":42,"tag":391,"props":20345,"children":20346},{"style":415},[20347],{"type":51,"value":20348},"total_spend",{"type":42,"tag":391,"props":20350,"children":20351},{"style":409},[20352],{"type":51,"value":7031},{"type":42,"tag":391,"props":20354,"children":20356},{"class":393,"line":20355},53,[20357,20361,20365,20370],{"type":42,"tag":391,"props":20358,"children":20359},{"style":415},[20360],{"type":51,"value":16987},{"type":42,"tag":391,"props":20362,"children":20363},{"style":409},[20364],{"type":51,"value":247},{"type":42,"tag":391,"props":20366,"children":20367},{"style":415},[20368],{"type":51,"value":20369},"total_impressions",{"type":42,"tag":391,"props":20371,"children":20372},{"style":409},[20373],{"type":51,"value":7031},{"type":42,"tag":391,"props":20375,"children":20377},{"class":393,"line":20376},54,[20378,20382,20386,20391],{"type":42,"tag":391,"props":20379,"children":20380},{"style":415},[20381],{"type":51,"value":16987},{"type":42,"tag":391,"props":20383,"children":20384},{"style":409},[20385],{"type":51,"value":247},{"type":42,"tag":391,"props":20387,"children":20388},{"style":415},[20389],{"type":51,"value":20390},"total_clicks",{"type":42,"tag":391,"props":20392,"children":20393},{"style":409},[20394],{"type":51,"value":7031},{"type":42,"tag":391,"props":20396,"children":20398},{"class":393,"line":20397},55,[20399,20403,20407,20412],{"type":42,"tag":391,"props":20400,"children":20401},{"style":415},[20402],{"type":51,"value":16987},{"type":42,"tag":391,"props":20404,"children":20405},{"style":409},[20406],{"type":51,"value":247},{"type":42,"tag":391,"props":20408,"children":20409},{"style":415},[20410],{"type":51,"value":20411},"total_conversions",{"type":42,"tag":391,"props":20413,"children":20414},{"style":409},[20415],{"type":51,"value":7031},{"type":42,"tag":391,"props":20417,"children":20419},{"class":393,"line":20418},56,[20420,20425,20429,20433],{"type":42,"tag":391,"props":20421,"children":20422},{"style":415},[20423],{"type":51,"value":20424},"    sess",{"type":42,"tag":391,"props":20426,"children":20427},{"style":409},[20428],{"type":51,"value":247},{"type":42,"tag":391,"props":20430,"children":20431},{"style":415},[20432],{"type":51,"value":12616},{"type":42,"tag":391,"props":20434,"children":20435},{"style":409},[20436],{"type":51,"value":7031},{"type":42,"tag":391,"props":20438,"children":20440},{"class":393,"line":20439},57,[20441,20445,20449,20453],{"type":42,"tag":391,"props":20442,"children":20443},{"style":415},[20444],{"type":51,"value":20424},{"type":42,"tag":391,"props":20446,"children":20447},{"style":409},[20448],{"type":51,"value":247},{"type":42,"tag":391,"props":20450,"children":20451},{"style":415},[20452],{"type":51,"value":12641},{"type":42,"tag":391,"props":20454,"children":20455},{"style":409},[20456],{"type":51,"value":7031},{"type":42,"tag":391,"props":20458,"children":20460},{"class":393,"line":20459},58,[20461,20466,20470,20475],{"type":42,"tag":391,"props":20462,"children":20463},{"style":415},[20464],{"type":51,"value":20465},"    cr",{"type":42,"tag":391,"props":20467,"children":20468},{"style":409},[20469],{"type":51,"value":247},{"type":42,"tag":391,"props":20471,"children":20472},{"style":415},[20473],{"type":51,"value":20474},"attributed_revenue",{"type":42,"tag":391,"props":20476,"children":20477},{"style":409},[20478],{"type":51,"value":7031},{"type":42,"tag":391,"props":20480,"children":20482},{"class":393,"line":20481},59,[20483,20487,20491,20496,20500,20504,20508,20512,20516,20520,20524,20528,20532,20536,20540,20544,20548,20552],{"type":42,"tag":391,"props":20484,"children":20485},{"style":415},[20486],{"type":51,"value":14899},{"type":42,"tag":391,"props":20488,"children":20489},{"style":409},[20490],{"type":51,"value":7143},{"type":42,"tag":391,"props":20492,"children":20493},{"style":415},[20494],{"type":51,"value":20495},"cr",{"type":42,"tag":391,"props":20497,"children":20498},{"style":409},[20499],{"type":51,"value":247},{"type":42,"tag":391,"props":20501,"children":20502},{"style":415},[20503],{"type":51,"value":20474},{"type":42,"tag":391,"props":20505,"children":20506},{"style":515},[20507],{"type":51,"value":7471},{"type":42,"tag":391,"props":20509,"children":20510},{"style":415},[20511],{"type":51,"value":14914},{"type":42,"tag":391,"props":20513,"children":20514},{"style":409},[20515],{"type":51,"value":7143},{"type":42,"tag":391,"props":20517,"children":20518},{"style":415},[20519],{"type":51,"value":17134},{"type":42,"tag":391,"props":20521,"children":20522},{"style":409},[20523],{"type":51,"value":247},{"type":42,"tag":391,"props":20525,"children":20526},{"style":415},[20527],{"type":51,"value":20348},{"type":42,"tag":391,"props":20529,"children":20530},{"style":409},[20531],{"type":51,"value":292},{"type":42,"tag":391,"props":20533,"children":20534},{"style":415},[20535],{"type":51,"value":7485},{"type":42,"tag":391,"props":20537,"children":20538},{"style":409},[20539],{"type":51,"value":14928},{"type":42,"tag":391,"props":20541,"children":20542},{"style":415},[20543],{"type":51,"value":7184},{"type":42,"tag":391,"props":20545,"children":20546},{"style":409},[20547],{"type":51,"value":7672},{"type":42,"tag":391,"props":20549,"children":20550},{"style":515},[20551],{"type":51,"value":7194},{"type":42,"tag":391,"props":20553,"children":20554},{"style":409},[20555],{"type":51,"value":20556}," roas,\n",{"type":42,"tag":391,"props":20558,"children":20560},{"class":393,"line":20559},60,[20561,20565,20569,20573,20577,20581,20585,20589,20593,20597,20601,20605,20609,20613,20617,20621,20625,20629],{"type":42,"tag":391,"props":20562,"children":20563},{"style":415},[20564],{"type":51,"value":14899},{"type":42,"tag":391,"props":20566,"children":20567},{"style":409},[20568],{"type":51,"value":7143},{"type":42,"tag":391,"props":20570,"children":20571},{"style":415},[20572],{"type":51,"value":17134},{"type":42,"tag":391,"props":20574,"children":20575},{"style":409},[20576],{"type":51,"value":247},{"type":42,"tag":391,"props":20578,"children":20579},{"style":415},[20580],{"type":51,"value":20348},{"type":42,"tag":391,"props":20582,"children":20583},{"style":515},[20584],{"type":51,"value":7471},{"type":42,"tag":391,"props":20586,"children":20587},{"style":415},[20588],{"type":51,"value":14914},{"type":42,"tag":391,"props":20590,"children":20591},{"style":409},[20592],{"type":51,"value":7143},{"type":42,"tag":391,"props":20594,"children":20595},{"style":415},[20596],{"type":51,"value":17134},{"type":42,"tag":391,"props":20598,"children":20599},{"style":409},[20600],{"type":51,"value":247},{"type":42,"tag":391,"props":20602,"children":20603},{"style":415},[20604],{"type":51,"value":20411},{"type":42,"tag":391,"props":20606,"children":20607},{"style":409},[20608],{"type":51,"value":292},{"type":42,"tag":391,"props":20610,"children":20611},{"style":415},[20612],{"type":51,"value":7485},{"type":42,"tag":391,"props":20614,"children":20615},{"style":409},[20616],{"type":51,"value":14928},{"type":42,"tag":391,"props":20618,"children":20619},{"style":415},[20620],{"type":51,"value":7184},{"type":42,"tag":391,"props":20622,"children":20623},{"style":409},[20624],{"type":51,"value":7672},{"type":42,"tag":391,"props":20626,"children":20627},{"style":515},[20628],{"type":51,"value":7194},{"type":42,"tag":391,"props":20630,"children":20631},{"style":409},[20632],{"type":51,"value":20633}," cost_per_acquisition,\n",{"type":42,"tag":391,"props":20635,"children":20637},{"class":393,"line":20636},61,[20638,20642,20646,20650,20654,20658,20662,20666,20670,20674,20678,20682,20686,20690,20694,20698,20702,20706,20710,20714,20718],{"type":42,"tag":391,"props":20639,"children":20640},{"style":415},[20641],{"type":51,"value":14899},{"type":42,"tag":391,"props":20643,"children":20644},{"style":409},[20645],{"type":51,"value":7143},{"type":42,"tag":391,"props":20647,"children":20648},{"style":415},[20649],{"type":51,"value":17134},{"type":42,"tag":391,"props":20651,"children":20652},{"style":409},[20653],{"type":51,"value":247},{"type":42,"tag":391,"props":20655,"children":20656},{"style":415},[20657],{"type":51,"value":20390},{"type":42,"tag":391,"props":20659,"children":20660},{"style":515},[20661],{"type":51,"value":7471},{"type":42,"tag":391,"props":20663,"children":20664},{"style":415},[20665],{"type":51,"value":14914},{"type":42,"tag":391,"props":20667,"children":20668},{"style":409},[20669],{"type":51,"value":7143},{"type":42,"tag":391,"props":20671,"children":20672},{"style":415},[20673],{"type":51,"value":17134},{"type":42,"tag":391,"props":20675,"children":20676},{"style":409},[20677],{"type":51,"value":247},{"type":42,"tag":391,"props":20679,"children":20680},{"style":415},[20681],{"type":51,"value":20369},{"type":42,"tag":391,"props":20683,"children":20684},{"style":409},[20685],{"type":51,"value":292},{"type":42,"tag":391,"props":20687,"children":20688},{"style":415},[20689],{"type":51,"value":7485},{"type":42,"tag":391,"props":20691,"children":20692},{"style":409},[20693],{"type":51,"value":7672},{"type":42,"tag":391,"props":20695,"children":20696},{"style":515},[20697],{"type":51,"value":13108},{"type":42,"tag":391,"props":20699,"children":20700},{"style":415},[20701],{"type":51,"value":7476},{"type":42,"tag":391,"props":20703,"children":20704},{"style":409},[20705],{"type":51,"value":292},{"type":42,"tag":391,"props":20707,"children":20708},{"style":415},[20709],{"type":51,"value":7184},{"type":42,"tag":391,"props":20711,"children":20712},{"style":409},[20713],{"type":51,"value":7672},{"type":42,"tag":391,"props":20715,"children":20716},{"style":515},[20717],{"type":51,"value":7194},{"type":42,"tag":391,"props":20719,"children":20720},{"style":409},[20721],{"type":51,"value":20722}," click_through_rate\n",{"type":42,"tag":391,"props":20724,"children":20726},{"class":393,"line":20725},62,[20727,20731],{"type":42,"tag":391,"props":20728,"children":20729},{"style":515},[20730],{"type":51,"value":7555},{"type":42,"tag":391,"props":20732,"children":20733},{"style":409},[20734],{"type":51,"value":20735}," channel_spend cs\n",{"type":42,"tag":391,"props":20737,"children":20739},{"class":393,"line":20738},63,[20740,20744],{"type":42,"tag":391,"props":20741,"children":20742},{"style":515},[20743],{"type":51,"value":6663},{"type":42,"tag":391,"props":20745,"children":20746},{"style":409},[20747],{"type":51,"value":20748}," channel_sessions sess\n",{"type":42,"tag":391,"props":20750,"children":20752},{"class":393,"line":20751},64,[20753,20757,20761,20765,20769,20773,20778,20782],{"type":42,"tag":391,"props":20754,"children":20755},{"style":515},[20756],{"type":51,"value":7609},{"type":42,"tag":391,"props":20758,"children":20759},{"style":415},[20760],{"type":51,"value":17338},{"type":42,"tag":391,"props":20762,"children":20763},{"style":409},[20764],{"type":51,"value":247},{"type":42,"tag":391,"props":20766,"children":20767},{"style":415},[20768],{"type":51,"value":20302},{"type":42,"tag":391,"props":20770,"children":20771},{"style":515},[20772],{"type":51,"value":7627},{"type":42,"tag":391,"props":20774,"children":20775},{"style":415},[20776],{"type":51,"value":20777}," sess",{"type":42,"tag":391,"props":20779,"children":20780},{"style":409},[20781],{"type":51,"value":247},{"type":42,"tag":391,"props":20783,"children":20784},{"style":415},[20785],{"type":51,"value":20216},{"type":42,"tag":391,"props":20787,"children":20789},{"class":393,"line":20788},65,[20790,20794,20798,20802,20806,20810,20814,20818],{"type":42,"tag":391,"props":20791,"children":20792},{"style":515},[20793],{"type":51,"value":7650},{"type":42,"tag":391,"props":20795,"children":20796},{"style":415},[20797],{"type":51,"value":17338},{"type":42,"tag":391,"props":20799,"children":20800},{"style":409},[20801],{"type":51,"value":247},{"type":42,"tag":391,"props":20803,"children":20804},{"style":415},[20805],{"type":51,"value":20083},{"type":42,"tag":391,"props":20807,"children":20808},{"style":515},[20809],{"type":51,"value":7627},{"type":42,"tag":391,"props":20811,"children":20812},{"style":415},[20813],{"type":51,"value":20777},{"type":42,"tag":391,"props":20815,"children":20816},{"style":409},[20817],{"type":51,"value":247},{"type":42,"tag":391,"props":20819,"children":20820},{"style":415},[20821],{"type":51,"value":20269},{"type":42,"tag":391,"props":20823,"children":20825},{"class":393,"line":20824},66,[20826,20830],{"type":42,"tag":391,"props":20827,"children":20828},{"style":515},[20829],{"type":51,"value":6663},{"type":42,"tag":391,"props":20831,"children":20832},{"style":409},[20833],{"type":51,"value":20834}," channel_revenue cr\n",{"type":42,"tag":391,"props":20836,"children":20838},{"class":393,"line":20837},67,[20839,20843,20847,20851,20855,20859,20864,20868],{"type":42,"tag":391,"props":20840,"children":20841},{"style":515},[20842],{"type":51,"value":7609},{"type":42,"tag":391,"props":20844,"children":20845},{"style":415},[20846],{"type":51,"value":17338},{"type":42,"tag":391,"props":20848,"children":20849},{"style":409},[20850],{"type":51,"value":247},{"type":42,"tag":391,"props":20852,"children":20853},{"style":415},[20854],{"type":51,"value":20302},{"type":42,"tag":391,"props":20856,"children":20857},{"style":515},[20858],{"type":51,"value":7627},{"type":42,"tag":391,"props":20860,"children":20861},{"style":415},[20862],{"type":51,"value":20863}," cr",{"type":42,"tag":391,"props":20865,"children":20866},{"style":409},[20867],{"type":51,"value":247},{"type":42,"tag":391,"props":20869,"children":20870},{"style":415},[20871],{"type":51,"value":20872},"order_date\n",{"type":42,"tag":391,"props":20874,"children":20876},{"class":393,"line":20875},68,[20877,20881,20885,20889,20893,20897,20901,20905],{"type":42,"tag":391,"props":20878,"children":20879},{"style":515},[20880],{"type":51,"value":7650},{"type":42,"tag":391,"props":20882,"children":20883},{"style":415},[20884],{"type":51,"value":17338},{"type":42,"tag":391,"props":20886,"children":20887},{"style":409},[20888],{"type":51,"value":247},{"type":42,"tag":391,"props":20890,"children":20891},{"style":415},[20892],{"type":51,"value":20083},{"type":42,"tag":391,"props":20894,"children":20895},{"style":515},[20896],{"type":51,"value":7627},{"type":42,"tag":391,"props":20898,"children":20899},{"style":415},[20900],{"type":51,"value":20863},{"type":42,"tag":391,"props":20902,"children":20903},{"style":409},[20904],{"type":51,"value":247},{"type":42,"tag":391,"props":20906,"children":20907},{"style":415},[20908],{"type":51,"value":20269},{"type":42,"tag":391,"props":20910,"children":20912},{"class":393,"line":20911},69,[20913,20917,20921,20925,20929,20933,20937,20941,20945,20949],{"type":42,"tag":391,"props":20914,"children":20915},{"style":515},[20916],{"type":51,"value":15048},{"type":42,"tag":391,"props":20918,"children":20919},{"style":415},[20920],{"type":51,"value":17338},{"type":42,"tag":391,"props":20922,"children":20923},{"style":409},[20924],{"type":51,"value":247},{"type":42,"tag":391,"props":20926,"children":20927},{"style":415},[20928],{"type":51,"value":20302},{"type":42,"tag":391,"props":20930,"children":20931},{"style":515},[20932],{"type":51,"value":8652},{"type":42,"tag":391,"props":20934,"children":20935},{"style":409},[20936],{"type":51,"value":292},{"type":42,"tag":391,"props":20938,"children":20939},{"style":415},[20940],{"type":51,"value":17134},{"type":42,"tag":391,"props":20942,"children":20943},{"style":409},[20944],{"type":51,"value":247},{"type":42,"tag":391,"props":20946,"children":20947},{"style":415},[20948],{"type":51,"value":20348},{"type":42,"tag":391,"props":20950,"children":20951},{"style":515},[20952],{"type":51,"value":20953}," DESC\n",{"type":42,"tag":569,"props":20955,"children":20956},{"v-slot:bigquery":7},[20957],{"type":42,"tag":381,"props":20958,"children":20960},{"className":6761,"code":20959,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_marketing_roi\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_marketing_spend\n  - staging.stg_web_sessions\n  - staging.stg_orders\ncolumns:\n  - name: channel\n    type: varchar\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nWITH channel_spend AS (\n    SELECT\n        spend_date,\n        channel,\n        sum(spend) AS total_spend,\n        sum(impressions) AS total_impressions,\n        sum(clicks) AS total_clicks,\n        sum(conversions) AS total_conversions\n    FROM staging.stg_marketing_spend\n    GROUP BY spend_date, channel\n),\nchannel_sessions AS (\n    SELECT\n        session_date,\n        channel,\n        sum(total_sessions) AS sessions,\n        sum(new_users) AS new_users,\n        sum(purchase_events) AS purchases\n    FROM staging.stg_web_sessions\n    GROUP BY session_date, channel\n),\nchannel_revenue AS (\n    SELECT\n        DATE(order_date) AS order_date,\n        ws.channel,\n        sum(o.order_total) AS attributed_revenue\n    FROM staging.stg_orders o\n    INNER JOIN staging.stg_web_sessions ws\n        ON DATE(o.order_date) = ws.session_date\n    WHERE o.payment_status = 'paid'\n    GROUP BY DATE(order_date), ws.channel\n)\nSELECT\n    cs.spend_date AS report_date,\n    cs.channel,\n    cs.total_spend,\n    cs.total_impressions,\n    cs.total_clicks,\n    cs.total_conversions,\n    sess.sessions,\n    sess.new_users,\n    cr.attributed_revenue,\n    round(cr.attributed_revenue \u002F NULLIF(cs.total_spend, 0), 2) AS roas,\n    round(cs.total_spend \u002F NULLIF(cs.total_conversions, 0), 2) AS cost_per_acquisition,\n    round(cs.total_clicks \u002F NULLIF(cs.total_impressions, 0) * 100, 2) AS click_through_rate\nFROM channel_spend cs\nLEFT JOIN channel_sessions sess\n    ON cs.spend_date = sess.session_date\n    AND cs.channel = sess.channel\nLEFT JOIN channel_revenue cr\n    ON cs.spend_date = cr.order_date\n    AND cs.channel = cr.channel\nORDER BY cs.spend_date DESC, cs.total_spend DESC\n",[20961],{"type":42,"tag":240,"props":20962,"children":20963},{"__ignoreMap":7},[20964,20971,20978,20985,20992,20999,21006,21013,21020,21027,21034,21041,21048,21055,21062,21069,21076,21095,21102,21109,21116,21135,21154,21173,21192,21211,21222,21229,21244,21251,21258,21265,21288,21307,21326,21345,21356,21363,21378,21385,21405,21424,21459,21482,21505,21552,21579,21607,21614,21621,21644,21663,21682,21701,21720,21739,21758,21777,21796,21871,21946,22033,22044,22055,22090,22125,22136,22171,22206],{"type":42,"tag":391,"props":20965,"children":20966},{"class":393,"line":176},[20967],{"type":42,"tag":391,"props":20968,"children":20969},{"style":6773},[20970],{"type":51,"value":6776},{"type":42,"tag":391,"props":20972,"children":20973},{"class":393,"line":99},[20974],{"type":42,"tag":391,"props":20975,"children":20976},{"style":6773},[20977],{"type":51,"value":19616},{"type":42,"tag":391,"props":20979,"children":20980},{"class":393,"line":439},[20981],{"type":42,"tag":391,"props":20982,"children":20983},{"style":6773},[20984],{"type":51,"value":6792},{"type":42,"tag":391,"props":20986,"children":20987},{"class":393,"line":947},[20988],{"type":42,"tag":391,"props":20989,"children":20990},{"style":6773},[20991],{"type":51,"value":6800},{"type":42,"tag":391,"props":20993,"children":20994},{"class":393,"line":960},[20995],{"type":42,"tag":391,"props":20996,"children":20997},{"style":6773},[20998],{"type":51,"value":6808},{"type":42,"tag":391,"props":21000,"children":21001},{"class":393,"line":984},[21002],{"type":42,"tag":391,"props":21003,"children":21004},{"style":6773},[21005],{"type":51,"value":6816},{"type":42,"tag":391,"props":21007,"children":21008},{"class":393,"line":1002},[21009],{"type":42,"tag":391,"props":21010,"children":21011},{"style":6773},[21012],{"type":51,"value":19652},{"type":42,"tag":391,"props":21014,"children":21015},{"class":393,"line":165},[21016],{"type":42,"tag":391,"props":21017,"children":21018},{"style":6773},[21019],{"type":51,"value":19660},{"type":42,"tag":391,"props":21021,"children":21022},{"class":393,"line":2235},[21023],{"type":42,"tag":391,"props":21024,"children":21025},{"style":6773},[21026],{"type":51,"value":14566},{"type":42,"tag":391,"props":21028,"children":21029},{"class":393,"line":6843},[21030],{"type":42,"tag":391,"props":21031,"children":21032},{"style":6773},[21033],{"type":51,"value":6840},{"type":42,"tag":391,"props":21035,"children":21036},{"class":393,"line":6852},[21037],{"type":42,"tag":391,"props":21038,"children":21039},{"style":6773},[21040],{"type":51,"value":19682},{"type":42,"tag":391,"props":21042,"children":21043},{"class":393,"line":6861},[21044],{"type":42,"tag":391,"props":21045,"children":21046},{"style":6773},[21047],{"type":51,"value":6858},{"type":42,"tag":391,"props":21049,"children":21050},{"class":393,"line":6870},[21051],{"type":42,"tag":391,"props":21052,"children":21053},{"style":6773},[21054],{"type":51,"value":6867},{"type":42,"tag":391,"props":21056,"children":21057},{"class":393,"line":6879},[21058],{"type":42,"tag":391,"props":21059,"children":21060},{"style":6773},[21061],{"type":51,"value":6876},{"type":42,"tag":391,"props":21063,"children":21064},{"class":393,"line":1707},[21065],{"type":42,"tag":391,"props":21066,"children":21067},{"style":6773},[21068],{"type":51,"value":6963},{"type":42,"tag":391,"props":21070,"children":21071},{"class":393,"line":6896},[21072],{"type":42,"tag":391,"props":21073,"children":21074},{"emptyLinePlaceholder":13},[21075],{"type":51,"value":6972},{"type":42,"tag":391,"props":21077,"children":21078},{"class":393,"line":6905},[21079,21083,21087,21091],{"type":42,"tag":391,"props":21080,"children":21081},{"style":515},[21082],{"type":51,"value":16607},{"type":42,"tag":391,"props":21084,"children":21085},{"style":409},[21086],{"type":51,"value":19729},{"type":42,"tag":391,"props":21088,"children":21089},{"style":515},[21090],{"type":51,"value":7194},{"type":42,"tag":391,"props":21092,"children":21093},{"style":409},[21094],{"type":51,"value":16621},{"type":42,"tag":391,"props":21096,"children":21097},{"class":393,"line":6913},[21098],{"type":42,"tag":391,"props":21099,"children":21100},{"style":515},[21101],{"type":51,"value":16629},{"type":42,"tag":391,"props":21103,"children":21104},{"class":393,"line":6921},[21105],{"type":42,"tag":391,"props":21106,"children":21107},{"style":409},[21108],{"type":51,"value":19752},{"type":42,"tag":391,"props":21110,"children":21111},{"class":393,"line":6930},[21112],{"type":42,"tag":391,"props":21113,"children":21114},{"style":409},[21115],{"type":51,"value":19760},{"type":42,"tag":391,"props":21117,"children":21118},{"class":393,"line":6939},[21119,21123,21127,21131],{"type":42,"tag":391,"props":21120,"children":21121},{"style":415},[21122],{"type":51,"value":19768},{"type":42,"tag":391,"props":21124,"children":21125},{"style":409},[21126],{"type":51,"value":19773},{"type":42,"tag":391,"props":21128,"children":21129},{"style":515},[21130],{"type":51,"value":7194},{"type":42,"tag":391,"props":21132,"children":21133},{"style":409},[21134],{"type":51,"value":19782},{"type":42,"tag":391,"props":21136,"children":21137},{"class":393,"line":6948},[21138,21142,21146,21150],{"type":42,"tag":391,"props":21139,"children":21140},{"style":415},[21141],{"type":51,"value":19768},{"type":42,"tag":391,"props":21143,"children":21144},{"style":409},[21145],{"type":51,"value":19794},{"type":42,"tag":391,"props":21147,"children":21148},{"style":515},[21149],{"type":51,"value":7194},{"type":42,"tag":391,"props":21151,"children":21152},{"style":409},[21153],{"type":51,"value":19803},{"type":42,"tag":391,"props":21155,"children":21156},{"class":393,"line":6957},[21157,21161,21165,21169],{"type":42,"tag":391,"props":21158,"children":21159},{"style":415},[21160],{"type":51,"value":19768},{"type":42,"tag":391,"props":21162,"children":21163},{"style":409},[21164],{"type":51,"value":19815},{"type":42,"tag":391,"props":21166,"children":21167},{"style":515},[21168],{"type":51,"value":7194},{"type":42,"tag":391,"props":21170,"children":21171},{"style":409},[21172],{"type":51,"value":19824},{"type":42,"tag":391,"props":21174,"children":21175},{"class":393,"line":6966},[21176,21180,21184,21188],{"type":42,"tag":391,"props":21177,"children":21178},{"style":415},[21179],{"type":51,"value":19768},{"type":42,"tag":391,"props":21181,"children":21182},{"style":409},[21183],{"type":51,"value":19836},{"type":42,"tag":391,"props":21185,"children":21186},{"style":515},[21187],{"type":51,"value":7194},{"type":42,"tag":391,"props":21189,"children":21190},{"style":409},[21191],{"type":51,"value":19845},{"type":42,"tag":391,"props":21193,"children":21194},{"class":393,"line":6975},[21195,21199,21203,21207],{"type":42,"tag":391,"props":21196,"children":21197},{"style":515},[21198],{"type":51,"value":16741},{"type":42,"tag":391,"props":21200,"children":21201},{"style":415},[21202],{"type":51,"value":15019},{"type":42,"tag":391,"props":21204,"children":21205},{"style":409},[21206],{"type":51,"value":247},{"type":42,"tag":391,"props":21208,"children":21209},{"style":415},[21210],{"type":51,"value":19865},{"type":42,"tag":391,"props":21212,"children":21213},{"class":393,"line":6984},[21214,21218],{"type":42,"tag":391,"props":21215,"children":21216},{"style":515},[21217],{"type":51,"value":16939},{"type":42,"tag":391,"props":21219,"children":21220},{"style":409},[21221],{"type":51,"value":19877},{"type":42,"tag":391,"props":21223,"children":21224},{"class":393,"line":7012},[21225],{"type":42,"tag":391,"props":21226,"children":21227},{"style":409},[21228],{"type":51,"value":16857},{"type":42,"tag":391,"props":21230,"children":21231},{"class":393,"line":7034},[21232,21236,21240],{"type":42,"tag":391,"props":21233,"children":21234},{"style":409},[21235],{"type":51,"value":19892},{"type":42,"tag":391,"props":21237,"children":21238},{"style":515},[21239],{"type":51,"value":7194},{"type":42,"tag":391,"props":21241,"children":21242},{"style":409},[21243],{"type":51,"value":16621},{"type":42,"tag":391,"props":21245,"children":21246},{"class":393,"line":7060},[21247],{"type":42,"tag":391,"props":21248,"children":21249},{"style":515},[21250],{"type":51,"value":16629},{"type":42,"tag":391,"props":21252,"children":21253},{"class":393,"line":7086},[21254],{"type":42,"tag":391,"props":21255,"children":21256},{"style":409},[21257],{"type":51,"value":19915},{"type":42,"tag":391,"props":21259,"children":21260},{"class":393,"line":7111},[21261],{"type":42,"tag":391,"props":21262,"children":21263},{"style":409},[21264],{"type":51,"value":19760},{"type":42,"tag":391,"props":21266,"children":21267},{"class":393,"line":7132},[21268,21272,21276,21280,21284],{"type":42,"tag":391,"props":21269,"children":21270},{"style":415},[21271],{"type":51,"value":19768},{"type":42,"tag":391,"props":21273,"children":21274},{"style":409},[21275],{"type":51,"value":19934},{"type":42,"tag":391,"props":21277,"children":21278},{"style":515},[21279],{"type":51,"value":7194},{"type":42,"tag":391,"props":21281,"children":21282},{"style":515},[21283],{"type":51,"value":19943},{"type":42,"tag":391,"props":21285,"children":21286},{"style":409},[21287],{"type":51,"value":7031},{"type":42,"tag":391,"props":21289,"children":21290},{"class":393,"line":7202},[21291,21295,21299,21303],{"type":42,"tag":391,"props":21292,"children":21293},{"style":415},[21294],{"type":51,"value":19768},{"type":42,"tag":391,"props":21296,"children":21297},{"style":409},[21298],{"type":51,"value":19959},{"type":42,"tag":391,"props":21300,"children":21301},{"style":515},[21302],{"type":51,"value":7194},{"type":42,"tag":391,"props":21304,"children":21305},{"style":409},[21306],{"type":51,"value":13190},{"type":42,"tag":391,"props":21308,"children":21309},{"class":393,"line":7264},[21310,21314,21318,21322],{"type":42,"tag":391,"props":21311,"children":21312},{"style":415},[21313],{"type":51,"value":19768},{"type":42,"tag":391,"props":21315,"children":21316},{"style":409},[21317],{"type":51,"value":19979},{"type":42,"tag":391,"props":21319,"children":21320},{"style":515},[21321],{"type":51,"value":7194},{"type":42,"tag":391,"props":21323,"children":21324},{"style":409},[21325],{"type":51,"value":19988},{"type":42,"tag":391,"props":21327,"children":21328},{"class":393,"line":7326},[21329,21333,21337,21341],{"type":42,"tag":391,"props":21330,"children":21331},{"style":515},[21332],{"type":51,"value":16741},{"type":42,"tag":391,"props":21334,"children":21335},{"style":415},[21336],{"type":51,"value":15019},{"type":42,"tag":391,"props":21338,"children":21339},{"style":409},[21340],{"type":51,"value":247},{"type":42,"tag":391,"props":21342,"children":21343},{"style":415},[21344],{"type":51,"value":20008},{"type":42,"tag":391,"props":21346,"children":21347},{"class":393,"line":7388},[21348,21352],{"type":42,"tag":391,"props":21349,"children":21350},{"style":515},[21351],{"type":51,"value":16939},{"type":42,"tag":391,"props":21353,"children":21354},{"style":409},[21355],{"type":51,"value":20020},{"type":42,"tag":391,"props":21357,"children":21358},{"class":393,"line":7409},[21359],{"type":42,"tag":391,"props":21360,"children":21361},{"style":409},[21362],{"type":51,"value":16857},{"type":42,"tag":391,"props":21364,"children":21365},{"class":393,"line":7430},[21366,21370,21374],{"type":42,"tag":391,"props":21367,"children":21368},{"style":409},[21369],{"type":51,"value":20035},{"type":42,"tag":391,"props":21371,"children":21372},{"style":515},[21373],{"type":51,"value":7194},{"type":42,"tag":391,"props":21375,"children":21376},{"style":409},[21377],{"type":51,"value":16621},{"type":42,"tag":391,"props":21379,"children":21380},{"class":393,"line":7451},[21381],{"type":42,"tag":391,"props":21382,"children":21383},{"style":515},[21384],{"type":51,"value":16629},{"type":42,"tag":391,"props":21386,"children":21387},{"class":393,"line":7497},[21388,21393,21397,21401],{"type":42,"tag":391,"props":21389,"children":21390},{"style":515},[21391],{"type":51,"value":21392},"        DATE",{"type":42,"tag":391,"props":21394,"children":21395},{"style":409},[21396],{"type":51,"value":15215},{"type":42,"tag":391,"props":21398,"children":21399},{"style":515},[21400],{"type":51,"value":7194},{"type":42,"tag":391,"props":21402,"children":21403},{"style":409},[21404],{"type":51,"value":7083},{"type":42,"tag":391,"props":21406,"children":21407},{"class":393,"line":7523},[21408,21412,21416,21420],{"type":42,"tag":391,"props":21409,"children":21410},{"style":415},[21411],{"type":51,"value":20074},{"type":42,"tag":391,"props":21413,"children":21414},{"style":409},[21415],{"type":51,"value":247},{"type":42,"tag":391,"props":21417,"children":21418},{"style":415},[21419],{"type":51,"value":20083},{"type":42,"tag":391,"props":21421,"children":21422},{"style":409},[21423],{"type":51,"value":7031},{"type":42,"tag":391,"props":21425,"children":21426},{"class":393,"line":7549},[21427,21431,21435,21439,21443,21447,21451,21455],{"type":42,"tag":391,"props":21428,"children":21429},{"style":415},[21430],{"type":51,"value":19768},{"type":42,"tag":391,"props":21432,"children":21433},{"style":409},[21434],{"type":51,"value":7143},{"type":42,"tag":391,"props":21436,"children":21437},{"style":415},[21438],{"type":51,"value":7148},{"type":42,"tag":391,"props":21440,"children":21441},{"style":409},[21442],{"type":51,"value":247},{"type":42,"tag":391,"props":21444,"children":21445},{"style":415},[21446],{"type":51,"value":17207},{"type":42,"tag":391,"props":21448,"children":21449},{"style":409},[21450],{"type":51,"value":7672},{"type":42,"tag":391,"props":21452,"children":21453},{"style":515},[21454],{"type":51,"value":7194},{"type":42,"tag":391,"props":21456,"children":21457},{"style":409},[21458],{"type":51,"value":20123},{"type":42,"tag":391,"props":21460,"children":21461},{"class":393,"line":7577},[21462,21466,21470,21474,21478],{"type":42,"tag":391,"props":21463,"children":21464},{"style":515},[21465],{"type":51,"value":16741},{"type":42,"tag":391,"props":21467,"children":21468},{"style":415},[21469],{"type":51,"value":15019},{"type":42,"tag":391,"props":21471,"children":21472},{"style":409},[21473],{"type":51,"value":247},{"type":42,"tag":391,"props":21475,"children":21476},{"style":415},[21477],{"type":51,"value":15641},{"type":42,"tag":391,"props":21479,"children":21480},{"style":409},[21481],{"type":51,"value":7574},{"type":42,"tag":391,"props":21483,"children":21484},{"class":393,"line":7603},[21485,21489,21493,21497,21501],{"type":42,"tag":391,"props":21486,"children":21487},{"style":515},[21488],{"type":51,"value":16765},{"type":42,"tag":391,"props":21490,"children":21491},{"style":415},[21492],{"type":51,"value":15019},{"type":42,"tag":391,"props":21494,"children":21495},{"style":409},[21496],{"type":51,"value":247},{"type":42,"tag":391,"props":21498,"children":21499},{"style":415},[21500],{"type":51,"value":20166},{"type":42,"tag":391,"props":21502,"children":21503},{"style":409},[21504],{"type":51,"value":20171},{"type":42,"tag":391,"props":21506,"children":21507},{"class":393,"line":7644},[21508,21512,21516,21520,21524,21528,21532,21536,21540,21544,21548],{"type":42,"tag":391,"props":21509,"children":21510},{"style":515},[21511],{"type":51,"value":16790},{"type":42,"tag":391,"props":21513,"children":21514},{"style":515},[21515],{"type":51,"value":8471},{"type":42,"tag":391,"props":21517,"children":21518},{"style":409},[21519],{"type":51,"value":7143},{"type":42,"tag":391,"props":21521,"children":21522},{"style":415},[21523],{"type":51,"value":7148},{"type":42,"tag":391,"props":21525,"children":21526},{"style":409},[21527],{"type":51,"value":247},{"type":42,"tag":391,"props":21529,"children":21530},{"style":415},[21531],{"type":51,"value":16704},{"type":42,"tag":391,"props":21533,"children":21534},{"style":409},[21535],{"type":51,"value":7672},{"type":42,"tag":391,"props":21537,"children":21538},{"style":515},[21539],{"type":51,"value":7677},{"type":42,"tag":391,"props":21541,"children":21542},{"style":415},[21543],{"type":51,"value":20207},{"type":42,"tag":391,"props":21545,"children":21546},{"style":409},[21547],{"type":51,"value":247},{"type":42,"tag":391,"props":21549,"children":21550},{"style":415},[21551],{"type":51,"value":20216},{"type":42,"tag":391,"props":21553,"children":21554},{"class":393,"line":8522},[21555,21559,21563,21567,21571,21575],{"type":42,"tag":391,"props":21556,"children":21557},{"style":515},[21558],{"type":51,"value":16827},{"type":42,"tag":391,"props":21560,"children":21561},{"style":415},[21562],{"type":51,"value":7614},{"type":42,"tag":391,"props":21564,"children":21565},{"style":409},[21566],{"type":51,"value":247},{"type":42,"tag":391,"props":21568,"children":21569},{"style":415},[21570],{"type":51,"value":16840},{"type":42,"tag":391,"props":21572,"children":21573},{"style":515},[21574],{"type":51,"value":7627},{"type":42,"tag":391,"props":21576,"children":21577},{"style":403},[21578],{"type":51,"value":16849},{"type":42,"tag":391,"props":21580,"children":21581},{"class":393,"line":8581},[21582,21586,21590,21595,21599,21603],{"type":42,"tag":391,"props":21583,"children":21584},{"style":515},[21585],{"type":51,"value":16939},{"type":42,"tag":391,"props":21587,"children":21588},{"style":515},[21589],{"type":51,"value":8471},{"type":42,"tag":391,"props":21591,"children":21592},{"style":409},[21593],{"type":51,"value":21594},"(order_date), ",{"type":42,"tag":391,"props":21596,"children":21597},{"style":415},[21598],{"type":51,"value":20260},{"type":42,"tag":391,"props":21600,"children":21601},{"style":409},[21602],{"type":51,"value":247},{"type":42,"tag":391,"props":21604,"children":21605},{"style":415},[21606],{"type":51,"value":20269},{"type":42,"tag":391,"props":21608,"children":21609},{"class":393,"line":20272},[21610],{"type":42,"tag":391,"props":21611,"children":21612},{"style":409},[21613],{"type":51,"value":7700},{"type":42,"tag":391,"props":21615,"children":21616},{"class":393,"line":20280},[21617],{"type":42,"tag":391,"props":21618,"children":21619},{"style":515},[21620],{"type":51,"value":6981},{"type":42,"tag":391,"props":21622,"children":21623},{"class":393,"line":20288},[21624,21628,21632,21636,21640],{"type":42,"tag":391,"props":21625,"children":21626},{"style":415},[21627],{"type":51,"value":16987},{"type":42,"tag":391,"props":21629,"children":21630},{"style":409},[21631],{"type":51,"value":247},{"type":42,"tag":391,"props":21633,"children":21634},{"style":415},[21635],{"type":51,"value":20302},{"type":42,"tag":391,"props":21637,"children":21638},{"style":515},[21639],{"type":51,"value":7004},{"type":42,"tag":391,"props":21641,"children":21642},{"style":409},[21643],{"type":51,"value":20311},{"type":42,"tag":391,"props":21645,"children":21646},{"class":393,"line":20314},[21647,21651,21655,21659],{"type":42,"tag":391,"props":21648,"children":21649},{"style":415},[21650],{"type":51,"value":16987},{"type":42,"tag":391,"props":21652,"children":21653},{"style":409},[21654],{"type":51,"value":247},{"type":42,"tag":391,"props":21656,"children":21657},{"style":415},[21658],{"type":51,"value":20083},{"type":42,"tag":391,"props":21660,"children":21661},{"style":409},[21662],{"type":51,"value":7031},{"type":42,"tag":391,"props":21664,"children":21665},{"class":393,"line":20334},[21666,21670,21674,21678],{"type":42,"tag":391,"props":21667,"children":21668},{"style":415},[21669],{"type":51,"value":16987},{"type":42,"tag":391,"props":21671,"children":21672},{"style":409},[21673],{"type":51,"value":247},{"type":42,"tag":391,"props":21675,"children":21676},{"style":415},[21677],{"type":51,"value":20348},{"type":42,"tag":391,"props":21679,"children":21680},{"style":409},[21681],{"type":51,"value":7031},{"type":42,"tag":391,"props":21683,"children":21684},{"class":393,"line":20355},[21685,21689,21693,21697],{"type":42,"tag":391,"props":21686,"children":21687},{"style":415},[21688],{"type":51,"value":16987},{"type":42,"tag":391,"props":21690,"children":21691},{"style":409},[21692],{"type":51,"value":247},{"type":42,"tag":391,"props":21694,"children":21695},{"style":415},[21696],{"type":51,"value":20369},{"type":42,"tag":391,"props":21698,"children":21699},{"style":409},[21700],{"type":51,"value":7031},{"type":42,"tag":391,"props":21702,"children":21703},{"class":393,"line":20376},[21704,21708,21712,21716],{"type":42,"tag":391,"props":21705,"children":21706},{"style":415},[21707],{"type":51,"value":16987},{"type":42,"tag":391,"props":21709,"children":21710},{"style":409},[21711],{"type":51,"value":247},{"type":42,"tag":391,"props":21713,"children":21714},{"style":415},[21715],{"type":51,"value":20390},{"type":42,"tag":391,"props":21717,"children":21718},{"style":409},[21719],{"type":51,"value":7031},{"type":42,"tag":391,"props":21721,"children":21722},{"class":393,"line":20397},[21723,21727,21731,21735],{"type":42,"tag":391,"props":21724,"children":21725},{"style":415},[21726],{"type":51,"value":16987},{"type":42,"tag":391,"props":21728,"children":21729},{"style":409},[21730],{"type":51,"value":247},{"type":42,"tag":391,"props":21732,"children":21733},{"style":415},[21734],{"type":51,"value":20411},{"type":42,"tag":391,"props":21736,"children":21737},{"style":409},[21738],{"type":51,"value":7031},{"type":42,"tag":391,"props":21740,"children":21741},{"class":393,"line":20418},[21742,21746,21750,21754],{"type":42,"tag":391,"props":21743,"children":21744},{"style":415},[21745],{"type":51,"value":20424},{"type":42,"tag":391,"props":21747,"children":21748},{"style":409},[21749],{"type":51,"value":247},{"type":42,"tag":391,"props":21751,"children":21752},{"style":415},[21753],{"type":51,"value":12616},{"type":42,"tag":391,"props":21755,"children":21756},{"style":409},[21757],{"type":51,"value":7031},{"type":42,"tag":391,"props":21759,"children":21760},{"class":393,"line":20439},[21761,21765,21769,21773],{"type":42,"tag":391,"props":21762,"children":21763},{"style":415},[21764],{"type":51,"value":20424},{"type":42,"tag":391,"props":21766,"children":21767},{"style":409},[21768],{"type":51,"value":247},{"type":42,"tag":391,"props":21770,"children":21771},{"style":415},[21772],{"type":51,"value":12641},{"type":42,"tag":391,"props":21774,"children":21775},{"style":409},[21776],{"type":51,"value":7031},{"type":42,"tag":391,"props":21778,"children":21779},{"class":393,"line":20459},[21780,21784,21788,21792],{"type":42,"tag":391,"props":21781,"children":21782},{"style":415},[21783],{"type":51,"value":20465},{"type":42,"tag":391,"props":21785,"children":21786},{"style":409},[21787],{"type":51,"value":247},{"type":42,"tag":391,"props":21789,"children":21790},{"style":415},[21791],{"type":51,"value":20474},{"type":42,"tag":391,"props":21793,"children":21794},{"style":409},[21795],{"type":51,"value":7031},{"type":42,"tag":391,"props":21797,"children":21798},{"class":393,"line":20481},[21799,21803,21807,21811,21815,21819,21823,21827,21831,21835,21839,21843,21847,21851,21855,21859,21863,21867],{"type":42,"tag":391,"props":21800,"children":21801},{"style":415},[21802],{"type":51,"value":14899},{"type":42,"tag":391,"props":21804,"children":21805},{"style":409},[21806],{"type":51,"value":7143},{"type":42,"tag":391,"props":21808,"children":21809},{"style":415},[21810],{"type":51,"value":20495},{"type":42,"tag":391,"props":21812,"children":21813},{"style":409},[21814],{"type":51,"value":247},{"type":42,"tag":391,"props":21816,"children":21817},{"style":415},[21818],{"type":51,"value":20474},{"type":42,"tag":391,"props":21820,"children":21821},{"style":515},[21822],{"type":51,"value":7471},{"type":42,"tag":391,"props":21824,"children":21825},{"style":415},[21826],{"type":51,"value":15495},{"type":42,"tag":391,"props":21828,"children":21829},{"style":409},[21830],{"type":51,"value":7143},{"type":42,"tag":391,"props":21832,"children":21833},{"style":415},[21834],{"type":51,"value":17134},{"type":42,"tag":391,"props":21836,"children":21837},{"style":409},[21838],{"type":51,"value":247},{"type":42,"tag":391,"props":21840,"children":21841},{"style":415},[21842],{"type":51,"value":20348},{"type":42,"tag":391,"props":21844,"children":21845},{"style":409},[21846],{"type":51,"value":292},{"type":42,"tag":391,"props":21848,"children":21849},{"style":415},[21850],{"type":51,"value":7485},{"type":42,"tag":391,"props":21852,"children":21853},{"style":409},[21854],{"type":51,"value":14928},{"type":42,"tag":391,"props":21856,"children":21857},{"style":415},[21858],{"type":51,"value":7184},{"type":42,"tag":391,"props":21860,"children":21861},{"style":409},[21862],{"type":51,"value":7672},{"type":42,"tag":391,"props":21864,"children":21865},{"style":515},[21866],{"type":51,"value":7194},{"type":42,"tag":391,"props":21868,"children":21869},{"style":409},[21870],{"type":51,"value":20556},{"type":42,"tag":391,"props":21872,"children":21873},{"class":393,"line":20559},[21874,21878,21882,21886,21890,21894,21898,21902,21906,21910,21914,21918,21922,21926,21930,21934,21938,21942],{"type":42,"tag":391,"props":21875,"children":21876},{"style":415},[21877],{"type":51,"value":14899},{"type":42,"tag":391,"props":21879,"children":21880},{"style":409},[21881],{"type":51,"value":7143},{"type":42,"tag":391,"props":21883,"children":21884},{"style":415},[21885],{"type":51,"value":17134},{"type":42,"tag":391,"props":21887,"children":21888},{"style":409},[21889],{"type":51,"value":247},{"type":42,"tag":391,"props":21891,"children":21892},{"style":415},[21893],{"type":51,"value":20348},{"type":42,"tag":391,"props":21895,"children":21896},{"style":515},[21897],{"type":51,"value":7471},{"type":42,"tag":391,"props":21899,"children":21900},{"style":415},[21901],{"type":51,"value":15495},{"type":42,"tag":391,"props":21903,"children":21904},{"style":409},[21905],{"type":51,"value":7143},{"type":42,"tag":391,"props":21907,"children":21908},{"style":415},[21909],{"type":51,"value":17134},{"type":42,"tag":391,"props":21911,"children":21912},{"style":409},[21913],{"type":51,"value":247},{"type":42,"tag":391,"props":21915,"children":21916},{"style":415},[21917],{"type":51,"value":20411},{"type":42,"tag":391,"props":21919,"children":21920},{"style":409},[21921],{"type":51,"value":292},{"type":42,"tag":391,"props":21923,"children":21924},{"style":415},[21925],{"type":51,"value":7485},{"type":42,"tag":391,"props":21927,"children":21928},{"style":409},[21929],{"type":51,"value":14928},{"type":42,"tag":391,"props":21931,"children":21932},{"style":415},[21933],{"type":51,"value":7184},{"type":42,"tag":391,"props":21935,"children":21936},{"style":409},[21937],{"type":51,"value":7672},{"type":42,"tag":391,"props":21939,"children":21940},{"style":515},[21941],{"type":51,"value":7194},{"type":42,"tag":391,"props":21943,"children":21944},{"style":409},[21945],{"type":51,"value":20633},{"type":42,"tag":391,"props":21947,"children":21948},{"class":393,"line":20636},[21949,21953,21957,21961,21965,21969,21973,21977,21981,21985,21989,21993,21997,22001,22005,22009,22013,22017,22021,22025,22029],{"type":42,"tag":391,"props":21950,"children":21951},{"style":415},[21952],{"type":51,"value":14899},{"type":42,"tag":391,"props":21954,"children":21955},{"style":409},[21956],{"type":51,"value":7143},{"type":42,"tag":391,"props":21958,"children":21959},{"style":415},[21960],{"type":51,"value":17134},{"type":42,"tag":391,"props":21962,"children":21963},{"style":409},[21964],{"type":51,"value":247},{"type":42,"tag":391,"props":21966,"children":21967},{"style":415},[21968],{"type":51,"value":20390},{"type":42,"tag":391,"props":21970,"children":21971},{"style":515},[21972],{"type":51,"value":7471},{"type":42,"tag":391,"props":21974,"children":21975},{"style":415},[21976],{"type":51,"value":15495},{"type":42,"tag":391,"props":21978,"children":21979},{"style":409},[21980],{"type":51,"value":7143},{"type":42,"tag":391,"props":21982,"children":21983},{"style":415},[21984],{"type":51,"value":17134},{"type":42,"tag":391,"props":21986,"children":21987},{"style":409},[21988],{"type":51,"value":247},{"type":42,"tag":391,"props":21990,"children":21991},{"style":415},[21992],{"type":51,"value":20369},{"type":42,"tag":391,"props":21994,"children":21995},{"style":409},[21996],{"type":51,"value":292},{"type":42,"tag":391,"props":21998,"children":21999},{"style":415},[22000],{"type":51,"value":7485},{"type":42,"tag":391,"props":22002,"children":22003},{"style":409},[22004],{"type":51,"value":7672},{"type":42,"tag":391,"props":22006,"children":22007},{"style":515},[22008],{"type":51,"value":13108},{"type":42,"tag":391,"props":22010,"children":22011},{"style":415},[22012],{"type":51,"value":7476},{"type":42,"tag":391,"props":22014,"children":22015},{"style":409},[22016],{"type":51,"value":292},{"type":42,"tag":391,"props":22018,"children":22019},{"style":415},[22020],{"type":51,"value":7184},{"type":42,"tag":391,"props":22022,"children":22023},{"style":409},[22024],{"type":51,"value":7672},{"type":42,"tag":391,"props":22026,"children":22027},{"style":515},[22028],{"type":51,"value":7194},{"type":42,"tag":391,"props":22030,"children":22031},{"style":409},[22032],{"type":51,"value":20722},{"type":42,"tag":391,"props":22034,"children":22035},{"class":393,"line":20725},[22036,22040],{"type":42,"tag":391,"props":22037,"children":22038},{"style":515},[22039],{"type":51,"value":7555},{"type":42,"tag":391,"props":22041,"children":22042},{"style":409},[22043],{"type":51,"value":20735},{"type":42,"tag":391,"props":22045,"children":22046},{"class":393,"line":20738},[22047,22051],{"type":42,"tag":391,"props":22048,"children":22049},{"style":515},[22050],{"type":51,"value":6663},{"type":42,"tag":391,"props":22052,"children":22053},{"style":409},[22054],{"type":51,"value":20748},{"type":42,"tag":391,"props":22056,"children":22057},{"class":393,"line":20751},[22058,22062,22066,22070,22074,22078,22082,22086],{"type":42,"tag":391,"props":22059,"children":22060},{"style":515},[22061],{"type":51,"value":7609},{"type":42,"tag":391,"props":22063,"children":22064},{"style":415},[22065],{"type":51,"value":17338},{"type":42,"tag":391,"props":22067,"children":22068},{"style":409},[22069],{"type":51,"value":247},{"type":42,"tag":391,"props":22071,"children":22072},{"style":415},[22073],{"type":51,"value":20302},{"type":42,"tag":391,"props":22075,"children":22076},{"style":515},[22077],{"type":51,"value":7627},{"type":42,"tag":391,"props":22079,"children":22080},{"style":415},[22081],{"type":51,"value":20777},{"type":42,"tag":391,"props":22083,"children":22084},{"style":409},[22085],{"type":51,"value":247},{"type":42,"tag":391,"props":22087,"children":22088},{"style":415},[22089],{"type":51,"value":20216},{"type":42,"tag":391,"props":22091,"children":22092},{"class":393,"line":20788},[22093,22097,22101,22105,22109,22113,22117,22121],{"type":42,"tag":391,"props":22094,"children":22095},{"style":515},[22096],{"type":51,"value":7650},{"type":42,"tag":391,"props":22098,"children":22099},{"style":415},[22100],{"type":51,"value":17338},{"type":42,"tag":391,"props":22102,"children":22103},{"style":409},[22104],{"type":51,"value":247},{"type":42,"tag":391,"props":22106,"children":22107},{"style":415},[22108],{"type":51,"value":20083},{"type":42,"tag":391,"props":22110,"children":22111},{"style":515},[22112],{"type":51,"value":7627},{"type":42,"tag":391,"props":22114,"children":22115},{"style":415},[22116],{"type":51,"value":20777},{"type":42,"tag":391,"props":22118,"children":22119},{"style":409},[22120],{"type":51,"value":247},{"type":42,"tag":391,"props":22122,"children":22123},{"style":415},[22124],{"type":51,"value":20269},{"type":42,"tag":391,"props":22126,"children":22127},{"class":393,"line":20824},[22128,22132],{"type":42,"tag":391,"props":22129,"children":22130},{"style":515},[22131],{"type":51,"value":6663},{"type":42,"tag":391,"props":22133,"children":22134},{"style":409},[22135],{"type":51,"value":20834},{"type":42,"tag":391,"props":22137,"children":22138},{"class":393,"line":20837},[22139,22143,22147,22151,22155,22159,22163,22167],{"type":42,"tag":391,"props":22140,"children":22141},{"style":515},[22142],{"type":51,"value":7609},{"type":42,"tag":391,"props":22144,"children":22145},{"style":415},[22146],{"type":51,"value":17338},{"type":42,"tag":391,"props":22148,"children":22149},{"style":409},[22150],{"type":51,"value":247},{"type":42,"tag":391,"props":22152,"children":22153},{"style":415},[22154],{"type":51,"value":20302},{"type":42,"tag":391,"props":22156,"children":22157},{"style":515},[22158],{"type":51,"value":7627},{"type":42,"tag":391,"props":22160,"children":22161},{"style":415},[22162],{"type":51,"value":20863},{"type":42,"tag":391,"props":22164,"children":22165},{"style":409},[22166],{"type":51,"value":247},{"type":42,"tag":391,"props":22168,"children":22169},{"style":415},[22170],{"type":51,"value":20872},{"type":42,"tag":391,"props":22172,"children":22173},{"class":393,"line":20875},[22174,22178,22182,22186,22190,22194,22198,22202],{"type":42,"tag":391,"props":22175,"children":22176},{"style":515},[22177],{"type":51,"value":7650},{"type":42,"tag":391,"props":22179,"children":22180},{"style":415},[22181],{"type":51,"value":17338},{"type":42,"tag":391,"props":22183,"children":22184},{"style":409},[22185],{"type":51,"value":247},{"type":42,"tag":391,"props":22187,"children":22188},{"style":415},[22189],{"type":51,"value":20083},{"type":42,"tag":391,"props":22191,"children":22192},{"style":515},[22193],{"type":51,"value":7627},{"type":42,"tag":391,"props":22195,"children":22196},{"style":415},[22197],{"type":51,"value":20863},{"type":42,"tag":391,"props":22199,"children":22200},{"style":409},[22201],{"type":51,"value":247},{"type":42,"tag":391,"props":22203,"children":22204},{"style":415},[22205],{"type":51,"value":20269},{"type":42,"tag":391,"props":22207,"children":22208},{"class":393,"line":20911},[22209,22213,22217,22221,22225,22229,22233,22237,22241,22245],{"type":42,"tag":391,"props":22210,"children":22211},{"style":515},[22212],{"type":51,"value":15048},{"type":42,"tag":391,"props":22214,"children":22215},{"style":415},[22216],{"type":51,"value":17338},{"type":42,"tag":391,"props":22218,"children":22219},{"style":409},[22220],{"type":51,"value":247},{"type":42,"tag":391,"props":22222,"children":22223},{"style":415},[22224],{"type":51,"value":20302},{"type":42,"tag":391,"props":22226,"children":22227},{"style":515},[22228],{"type":51,"value":8652},{"type":42,"tag":391,"props":22230,"children":22231},{"style":409},[22232],{"type":51,"value":292},{"type":42,"tag":391,"props":22234,"children":22235},{"style":415},[22236],{"type":51,"value":17134},{"type":42,"tag":391,"props":22238,"children":22239},{"style":409},[22240],{"type":51,"value":247},{"type":42,"tag":391,"props":22242,"children":22243},{"style":415},[22244],{"type":51,"value":20348},{"type":42,"tag":391,"props":22246,"children":22247},{"style":515},[22248],{"type":51,"value":20953},{"type":42,"tag":569,"props":22250,"children":22251},{"v-slot:snowflake":7},[22252],{"type":42,"tag":381,"props":22253,"children":22255},{"className":6761,"code":22254,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_marketing_roi\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - staging.stg_marketing_spend\n  - staging.stg_web_sessions\n  - staging.stg_orders\ncolumns:\n  - name: channel\n    type: varchar\n    checks:\n      - name: not_null\n@bruin *\u002F\n\nWITH channel_spend AS (\n    SELECT\n        spend_date,\n        channel,\n        sum(spend) AS total_spend,\n        sum(impressions) AS total_impressions,\n        sum(clicks) AS total_clicks,\n        sum(conversions) AS total_conversions\n    FROM staging.stg_marketing_spend\n    GROUP BY spend_date, channel\n),\nchannel_sessions AS (\n    SELECT\n        session_date,\n        channel,\n        sum(total_sessions) AS sessions,\n        sum(new_users) AS new_users,\n        sum(purchase_events) AS purchases\n    FROM staging.stg_web_sessions\n    GROUP BY session_date, channel\n),\nchannel_revenue AS (\n    SELECT\n        order_date::DATE AS order_date,\n        ws.channel,\n        sum(o.order_total) AS attributed_revenue\n    FROM staging.stg_orders o\n    INNER JOIN staging.stg_web_sessions ws\n        ON order_date::DATE = ws.session_date\n    WHERE o.payment_status = 'paid'\n    GROUP BY order_date::DATE, ws.channel\n)\nSELECT\n    cs.spend_date AS report_date,\n    cs.channel,\n    cs.total_spend,\n    cs.total_impressions,\n    cs.total_clicks,\n    cs.total_conversions,\n    sess.sessions,\n    sess.new_users,\n    cr.attributed_revenue,\n    round(cr.attributed_revenue \u002F NULLIF(cs.total_spend, 0), 2) AS roas,\n    round(cs.total_spend \u002F NULLIF(cs.total_conversions, 0), 2) AS cost_per_acquisition,\n    round(cs.total_clicks \u002F NULLIF(cs.total_impressions, 0) * 100, 2) AS click_through_rate\nFROM channel_spend cs\nLEFT JOIN channel_sessions sess\n    ON cs.spend_date = sess.session_date\n    AND cs.channel = sess.channel\nLEFT JOIN channel_revenue cr\n    ON cs.spend_date = cr.order_date\n    AND cs.channel = cr.channel\nORDER BY cs.spend_date DESC, cs.total_spend DESC\n",[22256],{"type":42,"tag":240,"props":22257,"children":22258},{"__ignoreMap":7},[22259,22266,22273,22280,22287,22294,22301,22308,22315,22322,22329,22336,22343,22350,22357,22364,22371,22390,22397,22404,22411,22430,22449,22468,22487,22506,22517,22524,22539,22546,22553,22560,22583,22602,22621,22640,22651,22658,22673,22680,22700,22719,22754,22777,22800,22831,22858,22889,22896,22903,22926,22945,22964,22983,23002,23021,23040,23059,23078,23153,23228,23315,23326,23337,23372,23407,23418,23453,23488],{"type":42,"tag":391,"props":22260,"children":22261},{"class":393,"line":176},[22262],{"type":42,"tag":391,"props":22263,"children":22264},{"style":6773},[22265],{"type":51,"value":6776},{"type":42,"tag":391,"props":22267,"children":22268},{"class":393,"line":99},[22269],{"type":42,"tag":391,"props":22270,"children":22271},{"style":6773},[22272],{"type":51,"value":19616},{"type":42,"tag":391,"props":22274,"children":22275},{"class":393,"line":439},[22276],{"type":42,"tag":391,"props":22277,"children":22278},{"style":6773},[22279],{"type":51,"value":6792},{"type":42,"tag":391,"props":22281,"children":22282},{"class":393,"line":947},[22283],{"type":42,"tag":391,"props":22284,"children":22285},{"style":6773},[22286],{"type":51,"value":6800},{"type":42,"tag":391,"props":22288,"children":22289},{"class":393,"line":960},[22290],{"type":42,"tag":391,"props":22291,"children":22292},{"style":6773},[22293],{"type":51,"value":6808},{"type":42,"tag":391,"props":22295,"children":22296},{"class":393,"line":984},[22297],{"type":42,"tag":391,"props":22298,"children":22299},{"style":6773},[22300],{"type":51,"value":6816},{"type":42,"tag":391,"props":22302,"children":22303},{"class":393,"line":1002},[22304],{"type":42,"tag":391,"props":22305,"children":22306},{"style":6773},[22307],{"type":51,"value":19652},{"type":42,"tag":391,"props":22309,"children":22310},{"class":393,"line":165},[22311],{"type":42,"tag":391,"props":22312,"children":22313},{"style":6773},[22314],{"type":51,"value":19660},{"type":42,"tag":391,"props":22316,"children":22317},{"class":393,"line":2235},[22318],{"type":42,"tag":391,"props":22319,"children":22320},{"style":6773},[22321],{"type":51,"value":14566},{"type":42,"tag":391,"props":22323,"children":22324},{"class":393,"line":6843},[22325],{"type":42,"tag":391,"props":22326,"children":22327},{"style":6773},[22328],{"type":51,"value":6840},{"type":42,"tag":391,"props":22330,"children":22331},{"class":393,"line":6852},[22332],{"type":42,"tag":391,"props":22333,"children":22334},{"style":6773},[22335],{"type":51,"value":19682},{"type":42,"tag":391,"props":22337,"children":22338},{"class":393,"line":6861},[22339],{"type":42,"tag":391,"props":22340,"children":22341},{"style":6773},[22342],{"type":51,"value":6858},{"type":42,"tag":391,"props":22344,"children":22345},{"class":393,"line":6870},[22346],{"type":42,"tag":391,"props":22347,"children":22348},{"style":6773},[22349],{"type":51,"value":6867},{"type":42,"tag":391,"props":22351,"children":22352},{"class":393,"line":6879},[22353],{"type":42,"tag":391,"props":22354,"children":22355},{"style":6773},[22356],{"type":51,"value":6876},{"type":42,"tag":391,"props":22358,"children":22359},{"class":393,"line":1707},[22360],{"type":42,"tag":391,"props":22361,"children":22362},{"style":6773},[22363],{"type":51,"value":6963},{"type":42,"tag":391,"props":22365,"children":22366},{"class":393,"line":6896},[22367],{"type":42,"tag":391,"props":22368,"children":22369},{"emptyLinePlaceholder":13},[22370],{"type":51,"value":6972},{"type":42,"tag":391,"props":22372,"children":22373},{"class":393,"line":6905},[22374,22378,22382,22386],{"type":42,"tag":391,"props":22375,"children":22376},{"style":515},[22377],{"type":51,"value":16607},{"type":42,"tag":391,"props":22379,"children":22380},{"style":409},[22381],{"type":51,"value":19729},{"type":42,"tag":391,"props":22383,"children":22384},{"style":515},[22385],{"type":51,"value":7194},{"type":42,"tag":391,"props":22387,"children":22388},{"style":409},[22389],{"type":51,"value":16621},{"type":42,"tag":391,"props":22391,"children":22392},{"class":393,"line":6913},[22393],{"type":42,"tag":391,"props":22394,"children":22395},{"style":515},[22396],{"type":51,"value":16629},{"type":42,"tag":391,"props":22398,"children":22399},{"class":393,"line":6921},[22400],{"type":42,"tag":391,"props":22401,"children":22402},{"style":409},[22403],{"type":51,"value":19752},{"type":42,"tag":391,"props":22405,"children":22406},{"class":393,"line":6930},[22407],{"type":42,"tag":391,"props":22408,"children":22409},{"style":409},[22410],{"type":51,"value":19760},{"type":42,"tag":391,"props":22412,"children":22413},{"class":393,"line":6939},[22414,22418,22422,22426],{"type":42,"tag":391,"props":22415,"children":22416},{"style":415},[22417],{"type":51,"value":19768},{"type":42,"tag":391,"props":22419,"children":22420},{"style":409},[22421],{"type":51,"value":19773},{"type":42,"tag":391,"props":22423,"children":22424},{"style":515},[22425],{"type":51,"value":7194},{"type":42,"tag":391,"props":22427,"children":22428},{"style":409},[22429],{"type":51,"value":19782},{"type":42,"tag":391,"props":22431,"children":22432},{"class":393,"line":6948},[22433,22437,22441,22445],{"type":42,"tag":391,"props":22434,"children":22435},{"style":415},[22436],{"type":51,"value":19768},{"type":42,"tag":391,"props":22438,"children":22439},{"style":409},[22440],{"type":51,"value":19794},{"type":42,"tag":391,"props":22442,"children":22443},{"style":515},[22444],{"type":51,"value":7194},{"type":42,"tag":391,"props":22446,"children":22447},{"style":409},[22448],{"type":51,"value":19803},{"type":42,"tag":391,"props":22450,"children":22451},{"class":393,"line":6957},[22452,22456,22460,22464],{"type":42,"tag":391,"props":22453,"children":22454},{"style":415},[22455],{"type":51,"value":19768},{"type":42,"tag":391,"props":22457,"children":22458},{"style":409},[22459],{"type":51,"value":19815},{"type":42,"tag":391,"props":22461,"children":22462},{"style":515},[22463],{"type":51,"value":7194},{"type":42,"tag":391,"props":22465,"children":22466},{"style":409},[22467],{"type":51,"value":19824},{"type":42,"tag":391,"props":22469,"children":22470},{"class":393,"line":6966},[22471,22475,22479,22483],{"type":42,"tag":391,"props":22472,"children":22473},{"style":415},[22474],{"type":51,"value":19768},{"type":42,"tag":391,"props":22476,"children":22477},{"style":409},[22478],{"type":51,"value":19836},{"type":42,"tag":391,"props":22480,"children":22481},{"style":515},[22482],{"type":51,"value":7194},{"type":42,"tag":391,"props":22484,"children":22485},{"style":409},[22486],{"type":51,"value":19845},{"type":42,"tag":391,"props":22488,"children":22489},{"class":393,"line":6975},[22490,22494,22498,22502],{"type":42,"tag":391,"props":22491,"children":22492},{"style":515},[22493],{"type":51,"value":16741},{"type":42,"tag":391,"props":22495,"children":22496},{"style":415},[22497],{"type":51,"value":15019},{"type":42,"tag":391,"props":22499,"children":22500},{"style":409},[22501],{"type":51,"value":247},{"type":42,"tag":391,"props":22503,"children":22504},{"style":415},[22505],{"type":51,"value":19865},{"type":42,"tag":391,"props":22507,"children":22508},{"class":393,"line":6984},[22509,22513],{"type":42,"tag":391,"props":22510,"children":22511},{"style":515},[22512],{"type":51,"value":16939},{"type":42,"tag":391,"props":22514,"children":22515},{"style":409},[22516],{"type":51,"value":19877},{"type":42,"tag":391,"props":22518,"children":22519},{"class":393,"line":7012},[22520],{"type":42,"tag":391,"props":22521,"children":22522},{"style":409},[22523],{"type":51,"value":16857},{"type":42,"tag":391,"props":22525,"children":22526},{"class":393,"line":7034},[22527,22531,22535],{"type":42,"tag":391,"props":22528,"children":22529},{"style":409},[22530],{"type":51,"value":19892},{"type":42,"tag":391,"props":22532,"children":22533},{"style":515},[22534],{"type":51,"value":7194},{"type":42,"tag":391,"props":22536,"children":22537},{"style":409},[22538],{"type":51,"value":16621},{"type":42,"tag":391,"props":22540,"children":22541},{"class":393,"line":7060},[22542],{"type":42,"tag":391,"props":22543,"children":22544},{"style":515},[22545],{"type":51,"value":16629},{"type":42,"tag":391,"props":22547,"children":22548},{"class":393,"line":7086},[22549],{"type":42,"tag":391,"props":22550,"children":22551},{"style":409},[22552],{"type":51,"value":19915},{"type":42,"tag":391,"props":22554,"children":22555},{"class":393,"line":7111},[22556],{"type":42,"tag":391,"props":22557,"children":22558},{"style":409},[22559],{"type":51,"value":19760},{"type":42,"tag":391,"props":22561,"children":22562},{"class":393,"line":7132},[22563,22567,22571,22575,22579],{"type":42,"tag":391,"props":22564,"children":22565},{"style":415},[22566],{"type":51,"value":19768},{"type":42,"tag":391,"props":22568,"children":22569},{"style":409},[22570],{"type":51,"value":19934},{"type":42,"tag":391,"props":22572,"children":22573},{"style":515},[22574],{"type":51,"value":7194},{"type":42,"tag":391,"props":22576,"children":22577},{"style":515},[22578],{"type":51,"value":19943},{"type":42,"tag":391,"props":22580,"children":22581},{"style":409},[22582],{"type":51,"value":7031},{"type":42,"tag":391,"props":22584,"children":22585},{"class":393,"line":7202},[22586,22590,22594,22598],{"type":42,"tag":391,"props":22587,"children":22588},{"style":415},[22589],{"type":51,"value":19768},{"type":42,"tag":391,"props":22591,"children":22592},{"style":409},[22593],{"type":51,"value":19959},{"type":42,"tag":391,"props":22595,"children":22596},{"style":515},[22597],{"type":51,"value":7194},{"type":42,"tag":391,"props":22599,"children":22600},{"style":409},[22601],{"type":51,"value":13190},{"type":42,"tag":391,"props":22603,"children":22604},{"class":393,"line":7264},[22605,22609,22613,22617],{"type":42,"tag":391,"props":22606,"children":22607},{"style":415},[22608],{"type":51,"value":19768},{"type":42,"tag":391,"props":22610,"children":22611},{"style":409},[22612],{"type":51,"value":19979},{"type":42,"tag":391,"props":22614,"children":22615},{"style":515},[22616],{"type":51,"value":7194},{"type":42,"tag":391,"props":22618,"children":22619},{"style":409},[22620],{"type":51,"value":19988},{"type":42,"tag":391,"props":22622,"children":22623},{"class":393,"line":7326},[22624,22628,22632,22636],{"type":42,"tag":391,"props":22625,"children":22626},{"style":515},[22627],{"type":51,"value":16741},{"type":42,"tag":391,"props":22629,"children":22630},{"style":415},[22631],{"type":51,"value":15019},{"type":42,"tag":391,"props":22633,"children":22634},{"style":409},[22635],{"type":51,"value":247},{"type":42,"tag":391,"props":22637,"children":22638},{"style":415},[22639],{"type":51,"value":20008},{"type":42,"tag":391,"props":22641,"children":22642},{"class":393,"line":7388},[22643,22647],{"type":42,"tag":391,"props":22644,"children":22645},{"style":515},[22646],{"type":51,"value":16939},{"type":42,"tag":391,"props":22648,"children":22649},{"style":409},[22650],{"type":51,"value":20020},{"type":42,"tag":391,"props":22652,"children":22653},{"class":393,"line":7409},[22654],{"type":42,"tag":391,"props":22655,"children":22656},{"style":409},[22657],{"type":51,"value":16857},{"type":42,"tag":391,"props":22659,"children":22660},{"class":393,"line":7430},[22661,22665,22669],{"type":42,"tag":391,"props":22662,"children":22663},{"style":409},[22664],{"type":51,"value":20035},{"type":42,"tag":391,"props":22666,"children":22667},{"style":515},[22668],{"type":51,"value":7194},{"type":42,"tag":391,"props":22670,"children":22671},{"style":409},[22672],{"type":51,"value":16621},{"type":42,"tag":391,"props":22674,"children":22675},{"class":393,"line":7451},[22676],{"type":42,"tag":391,"props":22677,"children":22678},{"style":515},[22679],{"type":51,"value":16629},{"type":42,"tag":391,"props":22681,"children":22682},{"class":393,"line":7497},[22683,22688,22692,22696],{"type":42,"tag":391,"props":22684,"children":22685},{"style":409},[22686],{"type":51,"value":22687},"        order_date::",{"type":42,"tag":391,"props":22689,"children":22690},{"style":515},[22691],{"type":51,"value":9468},{"type":42,"tag":391,"props":22693,"children":22694},{"style":515},[22695],{"type":51,"value":7004},{"type":42,"tag":391,"props":22697,"children":22698},{"style":409},[22699],{"type":51,"value":7083},{"type":42,"tag":391,"props":22701,"children":22702},{"class":393,"line":7523},[22703,22707,22711,22715],{"type":42,"tag":391,"props":22704,"children":22705},{"style":415},[22706],{"type":51,"value":20074},{"type":42,"tag":391,"props":22708,"children":22709},{"style":409},[22710],{"type":51,"value":247},{"type":42,"tag":391,"props":22712,"children":22713},{"style":415},[22714],{"type":51,"value":20083},{"type":42,"tag":391,"props":22716,"children":22717},{"style":409},[22718],{"type":51,"value":7031},{"type":42,"tag":391,"props":22720,"children":22721},{"class":393,"line":7549},[22722,22726,22730,22734,22738,22742,22746,22750],{"type":42,"tag":391,"props":22723,"children":22724},{"style":415},[22725],{"type":51,"value":19768},{"type":42,"tag":391,"props":22727,"children":22728},{"style":409},[22729],{"type":51,"value":7143},{"type":42,"tag":391,"props":22731,"children":22732},{"style":415},[22733],{"type":51,"value":7148},{"type":42,"tag":391,"props":22735,"children":22736},{"style":409},[22737],{"type":51,"value":247},{"type":42,"tag":391,"props":22739,"children":22740},{"style":415},[22741],{"type":51,"value":17207},{"type":42,"tag":391,"props":22743,"children":22744},{"style":409},[22745],{"type":51,"value":7672},{"type":42,"tag":391,"props":22747,"children":22748},{"style":515},[22749],{"type":51,"value":7194},{"type":42,"tag":391,"props":22751,"children":22752},{"style":409},[22753],{"type":51,"value":20123},{"type":42,"tag":391,"props":22755,"children":22756},{"class":393,"line":7577},[22757,22761,22765,22769,22773],{"type":42,"tag":391,"props":22758,"children":22759},{"style":515},[22760],{"type":51,"value":16741},{"type":42,"tag":391,"props":22762,"children":22763},{"style":415},[22764],{"type":51,"value":15019},{"type":42,"tag":391,"props":22766,"children":22767},{"style":409},[22768],{"type":51,"value":247},{"type":42,"tag":391,"props":22770,"children":22771},{"style":415},[22772],{"type":51,"value":15641},{"type":42,"tag":391,"props":22774,"children":22775},{"style":409},[22776],{"type":51,"value":7574},{"type":42,"tag":391,"props":22778,"children":22779},{"class":393,"line":7603},[22780,22784,22788,22792,22796],{"type":42,"tag":391,"props":22781,"children":22782},{"style":515},[22783],{"type":51,"value":16765},{"type":42,"tag":391,"props":22785,"children":22786},{"style":415},[22787],{"type":51,"value":15019},{"type":42,"tag":391,"props":22789,"children":22790},{"style":409},[22791],{"type":51,"value":247},{"type":42,"tag":391,"props":22793,"children":22794},{"style":415},[22795],{"type":51,"value":20166},{"type":42,"tag":391,"props":22797,"children":22798},{"style":409},[22799],{"type":51,"value":20171},{"type":42,"tag":391,"props":22801,"children":22802},{"class":393,"line":7644},[22803,22807,22811,22815,22819,22823,22827],{"type":42,"tag":391,"props":22804,"children":22805},{"style":515},[22806],{"type":51,"value":16790},{"type":42,"tag":391,"props":22808,"children":22809},{"style":409},[22810],{"type":51,"value":16432},{"type":42,"tag":391,"props":22812,"children":22813},{"style":515},[22814],{"type":51,"value":9468},{"type":42,"tag":391,"props":22816,"children":22817},{"style":515},[22818],{"type":51,"value":7627},{"type":42,"tag":391,"props":22820,"children":22821},{"style":415},[22822],{"type":51,"value":20207},{"type":42,"tag":391,"props":22824,"children":22825},{"style":409},[22826],{"type":51,"value":247},{"type":42,"tag":391,"props":22828,"children":22829},{"style":415},[22830],{"type":51,"value":20216},{"type":42,"tag":391,"props":22832,"children":22833},{"class":393,"line":8522},[22834,22838,22842,22846,22850,22854],{"type":42,"tag":391,"props":22835,"children":22836},{"style":515},[22837],{"type":51,"value":16827},{"type":42,"tag":391,"props":22839,"children":22840},{"style":415},[22841],{"type":51,"value":7614},{"type":42,"tag":391,"props":22843,"children":22844},{"style":409},[22845],{"type":51,"value":247},{"type":42,"tag":391,"props":22847,"children":22848},{"style":415},[22849],{"type":51,"value":16840},{"type":42,"tag":391,"props":22851,"children":22852},{"style":515},[22853],{"type":51,"value":7627},{"type":42,"tag":391,"props":22855,"children":22856},{"style":403},[22857],{"type":51,"value":16849},{"type":42,"tag":391,"props":22859,"children":22860},{"class":393,"line":8581},[22861,22865,22869,22873,22877,22881,22885],{"type":42,"tag":391,"props":22862,"children":22863},{"style":515},[22864],{"type":51,"value":16939},{"type":42,"tag":391,"props":22866,"children":22867},{"style":409},[22868],{"type":51,"value":16432},{"type":42,"tag":391,"props":22870,"children":22871},{"style":515},[22872],{"type":51,"value":9468},{"type":42,"tag":391,"props":22874,"children":22875},{"style":409},[22876],{"type":51,"value":292},{"type":42,"tag":391,"props":22878,"children":22879},{"style":415},[22880],{"type":51,"value":20260},{"type":42,"tag":391,"props":22882,"children":22883},{"style":409},[22884],{"type":51,"value":247},{"type":42,"tag":391,"props":22886,"children":22887},{"style":415},[22888],{"type":51,"value":20269},{"type":42,"tag":391,"props":22890,"children":22891},{"class":393,"line":20272},[22892],{"type":42,"tag":391,"props":22893,"children":22894},{"style":409},[22895],{"type":51,"value":7700},{"type":42,"tag":391,"props":22897,"children":22898},{"class":393,"line":20280},[22899],{"type":42,"tag":391,"props":22900,"children":22901},{"style":515},[22902],{"type":51,"value":6981},{"type":42,"tag":391,"props":22904,"children":22905},{"class":393,"line":20288},[22906,22910,22914,22918,22922],{"type":42,"tag":391,"props":22907,"children":22908},{"style":415},[22909],{"type":51,"value":16987},{"type":42,"tag":391,"props":22911,"children":22912},{"style":409},[22913],{"type":51,"value":247},{"type":42,"tag":391,"props":22915,"children":22916},{"style":415},[22917],{"type":51,"value":20302},{"type":42,"tag":391,"props":22919,"children":22920},{"style":515},[22921],{"type":51,"value":7004},{"type":42,"tag":391,"props":22923,"children":22924},{"style":409},[22925],{"type":51,"value":20311},{"type":42,"tag":391,"props":22927,"children":22928},{"class":393,"line":20314},[22929,22933,22937,22941],{"type":42,"tag":391,"props":22930,"children":22931},{"style":415},[22932],{"type":51,"value":16987},{"type":42,"tag":391,"props":22934,"children":22935},{"style":409},[22936],{"type":51,"value":247},{"type":42,"tag":391,"props":22938,"children":22939},{"style":415},[22940],{"type":51,"value":20083},{"type":42,"tag":391,"props":22942,"children":22943},{"style":409},[22944],{"type":51,"value":7031},{"type":42,"tag":391,"props":22946,"children":22947},{"class":393,"line":20334},[22948,22952,22956,22960],{"type":42,"tag":391,"props":22949,"children":22950},{"style":415},[22951],{"type":51,"value":16987},{"type":42,"tag":391,"props":22953,"children":22954},{"style":409},[22955],{"type":51,"value":247},{"type":42,"tag":391,"props":22957,"children":22958},{"style":415},[22959],{"type":51,"value":20348},{"type":42,"tag":391,"props":22961,"children":22962},{"style":409},[22963],{"type":51,"value":7031},{"type":42,"tag":391,"props":22965,"children":22966},{"class":393,"line":20355},[22967,22971,22975,22979],{"type":42,"tag":391,"props":22968,"children":22969},{"style":415},[22970],{"type":51,"value":16987},{"type":42,"tag":391,"props":22972,"children":22973},{"style":409},[22974],{"type":51,"value":247},{"type":42,"tag":391,"props":22976,"children":22977},{"style":415},[22978],{"type":51,"value":20369},{"type":42,"tag":391,"props":22980,"children":22981},{"style":409},[22982],{"type":51,"value":7031},{"type":42,"tag":391,"props":22984,"children":22985},{"class":393,"line":20376},[22986,22990,22994,22998],{"type":42,"tag":391,"props":22987,"children":22988},{"style":415},[22989],{"type":51,"value":16987},{"type":42,"tag":391,"props":22991,"children":22992},{"style":409},[22993],{"type":51,"value":247},{"type":42,"tag":391,"props":22995,"children":22996},{"style":415},[22997],{"type":51,"value":20390},{"type":42,"tag":391,"props":22999,"children":23000},{"style":409},[23001],{"type":51,"value":7031},{"type":42,"tag":391,"props":23003,"children":23004},{"class":393,"line":20397},[23005,23009,23013,23017],{"type":42,"tag":391,"props":23006,"children":23007},{"style":415},[23008],{"type":51,"value":16987},{"type":42,"tag":391,"props":23010,"children":23011},{"style":409},[23012],{"type":51,"value":247},{"type":42,"tag":391,"props":23014,"children":23015},{"style":415},[23016],{"type":51,"value":20411},{"type":42,"tag":391,"props":23018,"children":23019},{"style":409},[23020],{"type":51,"value":7031},{"type":42,"tag":391,"props":23022,"children":23023},{"class":393,"line":20418},[23024,23028,23032,23036],{"type":42,"tag":391,"props":23025,"children":23026},{"style":415},[23027],{"type":51,"value":20424},{"type":42,"tag":391,"props":23029,"children":23030},{"style":409},[23031],{"type":51,"value":247},{"type":42,"tag":391,"props":23033,"children":23034},{"style":415},[23035],{"type":51,"value":12616},{"type":42,"tag":391,"props":23037,"children":23038},{"style":409},[23039],{"type":51,"value":7031},{"type":42,"tag":391,"props":23041,"children":23042},{"class":393,"line":20439},[23043,23047,23051,23055],{"type":42,"tag":391,"props":23044,"children":23045},{"style":415},[23046],{"type":51,"value":20424},{"type":42,"tag":391,"props":23048,"children":23049},{"style":409},[23050],{"type":51,"value":247},{"type":42,"tag":391,"props":23052,"children":23053},{"style":415},[23054],{"type":51,"value":12641},{"type":42,"tag":391,"props":23056,"children":23057},{"style":409},[23058],{"type":51,"value":7031},{"type":42,"tag":391,"props":23060,"children":23061},{"class":393,"line":20459},[23062,23066,23070,23074],{"type":42,"tag":391,"props":23063,"children":23064},{"style":415},[23065],{"type":51,"value":20465},{"type":42,"tag":391,"props":23067,"children":23068},{"style":409},[23069],{"type":51,"value":247},{"type":42,"tag":391,"props":23071,"children":23072},{"style":415},[23073],{"type":51,"value":20474},{"type":42,"tag":391,"props":23075,"children":23076},{"style":409},[23077],{"type":51,"value":7031},{"type":42,"tag":391,"props":23079,"children":23080},{"class":393,"line":20481},[23081,23085,23089,23093,23097,23101,23105,23109,23113,23117,23121,23125,23129,23133,23137,23141,23145,23149],{"type":42,"tag":391,"props":23082,"children":23083},{"style":415},[23084],{"type":51,"value":14899},{"type":42,"tag":391,"props":23086,"children":23087},{"style":409},[23088],{"type":51,"value":7143},{"type":42,"tag":391,"props":23090,"children":23091},{"style":415},[23092],{"type":51,"value":20495},{"type":42,"tag":391,"props":23094,"children":23095},{"style":409},[23096],{"type":51,"value":247},{"type":42,"tag":391,"props":23098,"children":23099},{"style":415},[23100],{"type":51,"value":20474},{"type":42,"tag":391,"props":23102,"children":23103},{"style":515},[23104],{"type":51,"value":7471},{"type":42,"tag":391,"props":23106,"children":23107},{"style":415},[23108],{"type":51,"value":15495},{"type":42,"tag":391,"props":23110,"children":23111},{"style":409},[23112],{"type":51,"value":7143},{"type":42,"tag":391,"props":23114,"children":23115},{"style":415},[23116],{"type":51,"value":17134},{"type":42,"tag":391,"props":23118,"children":23119},{"style":409},[23120],{"type":51,"value":247},{"type":42,"tag":391,"props":23122,"children":23123},{"style":415},[23124],{"type":51,"value":20348},{"type":42,"tag":391,"props":23126,"children":23127},{"style":409},[23128],{"type":51,"value":292},{"type":42,"tag":391,"props":23130,"children":23131},{"style":415},[23132],{"type":51,"value":7485},{"type":42,"tag":391,"props":23134,"children":23135},{"style":409},[23136],{"type":51,"value":14928},{"type":42,"tag":391,"props":23138,"children":23139},{"style":415},[23140],{"type":51,"value":7184},{"type":42,"tag":391,"props":23142,"children":23143},{"style":409},[23144],{"type":51,"value":7672},{"type":42,"tag":391,"props":23146,"children":23147},{"style":515},[23148],{"type":51,"value":7194},{"type":42,"tag":391,"props":23150,"children":23151},{"style":409},[23152],{"type":51,"value":20556},{"type":42,"tag":391,"props":23154,"children":23155},{"class":393,"line":20559},[23156,23160,23164,23168,23172,23176,23180,23184,23188,23192,23196,23200,23204,23208,23212,23216,23220,23224],{"type":42,"tag":391,"props":23157,"children":23158},{"style":415},[23159],{"type":51,"value":14899},{"type":42,"tag":391,"props":23161,"children":23162},{"style":409},[23163],{"type":51,"value":7143},{"type":42,"tag":391,"props":23165,"children":23166},{"style":415},[23167],{"type":51,"value":17134},{"type":42,"tag":391,"props":23169,"children":23170},{"style":409},[23171],{"type":51,"value":247},{"type":42,"tag":391,"props":23173,"children":23174},{"style":415},[23175],{"type":51,"value":20348},{"type":42,"tag":391,"props":23177,"children":23178},{"style":515},[23179],{"type":51,"value":7471},{"type":42,"tag":391,"props":23181,"children":23182},{"style":415},[23183],{"type":51,"value":15495},{"type":42,"tag":391,"props":23185,"children":23186},{"style":409},[23187],{"type":51,"value":7143},{"type":42,"tag":391,"props":23189,"children":23190},{"style":415},[23191],{"type":51,"value":17134},{"type":42,"tag":391,"props":23193,"children":23194},{"style":409},[23195],{"type":51,"value":247},{"type":42,"tag":391,"props":23197,"children":23198},{"style":415},[23199],{"type":51,"value":20411},{"type":42,"tag":391,"props":23201,"children":23202},{"style":409},[23203],{"type":51,"value":292},{"type":42,"tag":391,"props":23205,"children":23206},{"style":415},[23207],{"type":51,"value":7485},{"type":42,"tag":391,"props":23209,"children":23210},{"style":409},[23211],{"type":51,"value":14928},{"type":42,"tag":391,"props":23213,"children":23214},{"style":415},[23215],{"type":51,"value":7184},{"type":42,"tag":391,"props":23217,"children":23218},{"style":409},[23219],{"type":51,"value":7672},{"type":42,"tag":391,"props":23221,"children":23222},{"style":515},[23223],{"type":51,"value":7194},{"type":42,"tag":391,"props":23225,"children":23226},{"style":409},[23227],{"type":51,"value":20633},{"type":42,"tag":391,"props":23229,"children":23230},{"class":393,"line":20636},[23231,23235,23239,23243,23247,23251,23255,23259,23263,23267,23271,23275,23279,23283,23287,23291,23295,23299,23303,23307,23311],{"type":42,"tag":391,"props":23232,"children":23233},{"style":415},[23234],{"type":51,"value":14899},{"type":42,"tag":391,"props":23236,"children":23237},{"style":409},[23238],{"type":51,"value":7143},{"type":42,"tag":391,"props":23240,"children":23241},{"style":415},[23242],{"type":51,"value":17134},{"type":42,"tag":391,"props":23244,"children":23245},{"style":409},[23246],{"type":51,"value":247},{"type":42,"tag":391,"props":23248,"children":23249},{"style":415},[23250],{"type":51,"value":20390},{"type":42,"tag":391,"props":23252,"children":23253},{"style":515},[23254],{"type":51,"value":7471},{"type":42,"tag":391,"props":23256,"children":23257},{"style":415},[23258],{"type":51,"value":15495},{"type":42,"tag":391,"props":23260,"children":23261},{"style":409},[23262],{"type":51,"value":7143},{"type":42,"tag":391,"props":23264,"children":23265},{"style":415},[23266],{"type":51,"value":17134},{"type":42,"tag":391,"props":23268,"children":23269},{"style":409},[23270],{"type":51,"value":247},{"type":42,"tag":391,"props":23272,"children":23273},{"style":415},[23274],{"type":51,"value":20369},{"type":42,"tag":391,"props":23276,"children":23277},{"style":409},[23278],{"type":51,"value":292},{"type":42,"tag":391,"props":23280,"children":23281},{"style":415},[23282],{"type":51,"value":7485},{"type":42,"tag":391,"props":23284,"children":23285},{"style":409},[23286],{"type":51,"value":7672},{"type":42,"tag":391,"props":23288,"children":23289},{"style":515},[23290],{"type":51,"value":13108},{"type":42,"tag":391,"props":23292,"children":23293},{"style":415},[23294],{"type":51,"value":7476},{"type":42,"tag":391,"props":23296,"children":23297},{"style":409},[23298],{"type":51,"value":292},{"type":42,"tag":391,"props":23300,"children":23301},{"style":415},[23302],{"type":51,"value":7184},{"type":42,"tag":391,"props":23304,"children":23305},{"style":409},[23306],{"type":51,"value":7672},{"type":42,"tag":391,"props":23308,"children":23309},{"style":515},[23310],{"type":51,"value":7194},{"type":42,"tag":391,"props":23312,"children":23313},{"style":409},[23314],{"type":51,"value":20722},{"type":42,"tag":391,"props":23316,"children":23317},{"class":393,"line":20725},[23318,23322],{"type":42,"tag":391,"props":23319,"children":23320},{"style":515},[23321],{"type":51,"value":7555},{"type":42,"tag":391,"props":23323,"children":23324},{"style":409},[23325],{"type":51,"value":20735},{"type":42,"tag":391,"props":23327,"children":23328},{"class":393,"line":20738},[23329,23333],{"type":42,"tag":391,"props":23330,"children":23331},{"style":515},[23332],{"type":51,"value":6663},{"type":42,"tag":391,"props":23334,"children":23335},{"style":409},[23336],{"type":51,"value":20748},{"type":42,"tag":391,"props":23338,"children":23339},{"class":393,"line":20751},[23340,23344,23348,23352,23356,23360,23364,23368],{"type":42,"tag":391,"props":23341,"children":23342},{"style":515},[23343],{"type":51,"value":7609},{"type":42,"tag":391,"props":23345,"children":23346},{"style":415},[23347],{"type":51,"value":17338},{"type":42,"tag":391,"props":23349,"children":23350},{"style":409},[23351],{"type":51,"value":247},{"type":42,"tag":391,"props":23353,"children":23354},{"style":415},[23355],{"type":51,"value":20302},{"type":42,"tag":391,"props":23357,"children":23358},{"style":515},[23359],{"type":51,"value":7627},{"type":42,"tag":391,"props":23361,"children":23362},{"style":415},[23363],{"type":51,"value":20777},{"type":42,"tag":391,"props":23365,"children":23366},{"style":409},[23367],{"type":51,"value":247},{"type":42,"tag":391,"props":23369,"children":23370},{"style":415},[23371],{"type":51,"value":20216},{"type":42,"tag":391,"props":23373,"children":23374},{"class":393,"line":20788},[23375,23379,23383,23387,23391,23395,23399,23403],{"type":42,"tag":391,"props":23376,"children":23377},{"style":515},[23378],{"type":51,"value":7650},{"type":42,"tag":391,"props":23380,"children":23381},{"style":415},[23382],{"type":51,"value":17338},{"type":42,"tag":391,"props":23384,"children":23385},{"style":409},[23386],{"type":51,"value":247},{"type":42,"tag":391,"props":23388,"children":23389},{"style":415},[23390],{"type":51,"value":20083},{"type":42,"tag":391,"props":23392,"children":23393},{"style":515},[23394],{"type":51,"value":7627},{"type":42,"tag":391,"props":23396,"children":23397},{"style":415},[23398],{"type":51,"value":20777},{"type":42,"tag":391,"props":23400,"children":23401},{"style":409},[23402],{"type":51,"value":247},{"type":42,"tag":391,"props":23404,"children":23405},{"style":415},[23406],{"type":51,"value":20269},{"type":42,"tag":391,"props":23408,"children":23409},{"class":393,"line":20824},[23410,23414],{"type":42,"tag":391,"props":23411,"children":23412},{"style":515},[23413],{"type":51,"value":6663},{"type":42,"tag":391,"props":23415,"children":23416},{"style":409},[23417],{"type":51,"value":20834},{"type":42,"tag":391,"props":23419,"children":23420},{"class":393,"line":20837},[23421,23425,23429,23433,23437,23441,23445,23449],{"type":42,"tag":391,"props":23422,"children":23423},{"style":515},[23424],{"type":51,"value":7609},{"type":42,"tag":391,"props":23426,"children":23427},{"style":415},[23428],{"type":51,"value":17338},{"type":42,"tag":391,"props":23430,"children":23431},{"style":409},[23432],{"type":51,"value":247},{"type":42,"tag":391,"props":23434,"children":23435},{"style":415},[23436],{"type":51,"value":20302},{"type":42,"tag":391,"props":23438,"children":23439},{"style":515},[23440],{"type":51,"value":7627},{"type":42,"tag":391,"props":23442,"children":23443},{"style":415},[23444],{"type":51,"value":20863},{"type":42,"tag":391,"props":23446,"children":23447},{"style":409},[23448],{"type":51,"value":247},{"type":42,"tag":391,"props":23450,"children":23451},{"style":415},[23452],{"type":51,"value":20872},{"type":42,"tag":391,"props":23454,"children":23455},{"class":393,"line":20875},[23456,23460,23464,23468,23472,23476,23480,23484],{"type":42,"tag":391,"props":23457,"children":23458},{"style":515},[23459],{"type":51,"value":7650},{"type":42,"tag":391,"props":23461,"children":23462},{"style":415},[23463],{"type":51,"value":17338},{"type":42,"tag":391,"props":23465,"children":23466},{"style":409},[23467],{"type":51,"value":247},{"type":42,"tag":391,"props":23469,"children":23470},{"style":415},[23471],{"type":51,"value":20083},{"type":42,"tag":391,"props":23473,"children":23474},{"style":515},[23475],{"type":51,"value":7627},{"type":42,"tag":391,"props":23477,"children":23478},{"style":415},[23479],{"type":51,"value":20863},{"type":42,"tag":391,"props":23481,"children":23482},{"style":409},[23483],{"type":51,"value":247},{"type":42,"tag":391,"props":23485,"children":23486},{"style":415},[23487],{"type":51,"value":20269},{"type":42,"tag":391,"props":23489,"children":23490},{"class":393,"line":20911},[23491,23495,23499,23503,23507,23511,23515,23519,23523,23527],{"type":42,"tag":391,"props":23492,"children":23493},{"style":515},[23494],{"type":51,"value":15048},{"type":42,"tag":391,"props":23496,"children":23497},{"style":415},[23498],{"type":51,"value":17338},{"type":42,"tag":391,"props":23500,"children":23501},{"style":409},[23502],{"type":51,"value":247},{"type":42,"tag":391,"props":23504,"children":23505},{"style":415},[23506],{"type":51,"value":20302},{"type":42,"tag":391,"props":23508,"children":23509},{"style":515},[23510],{"type":51,"value":8652},{"type":42,"tag":391,"props":23512,"children":23513},{"style":409},[23514],{"type":51,"value":292},{"type":42,"tag":391,"props":23516,"children":23517},{"style":415},[23518],{"type":51,"value":17134},{"type":42,"tag":391,"props":23520,"children":23521},{"style":409},[23522],{"type":51,"value":247},{"type":42,"tag":391,"props":23524,"children":23525},{"style":415},[23526],{"type":51,"value":20348},{"type":42,"tag":391,"props":23528,"children":23529},{"style":515},[23530],{"type":51,"value":20953},{"type":42,"tag":361,"props":23532,"children":23534},{"id":23533},"_5-daily-kpis-rpt_daily_kpissql",[23535,23537],{"type":51,"value":23536},"5) Daily KPIs - ",{"type":42,"tag":240,"props":23538,"children":23540},{"className":23539},[],[23541],{"type":51,"value":23542},"rpt_daily_kpis.sql",{"type":42,"tag":43,"props":23544,"children":23545},{},[23546],{"type":51,"value":23547},"A single unified daily view of the whole business. One table, all the numbers that matter.",{"type":42,"tag":43,"props":23549,"children":23550},{},[23551,23552,23561],{"type":51,"value":6741},{"type":42,"tag":47,"props":23553,"children":23554},{},[23555],{"type":42,"tag":240,"props":23556,"children":23558},{"className":23557},[],[23559],{"type":51,"value":23560},"ecommerce\u002Fassets\u002Freports\u002Frpt_daily_kpis.sql",{"type":51,"value":6752},{"type":42,"tag":563,"props":23563,"children":23564},{":variants":565,"group":566},[23565,24828,26074],{"type":42,"tag":569,"props":23566,"children":23567},{"v-slot:clickhouse":7},[23568],{"type":42,"tag":381,"props":23569,"children":23571},{"className":6761,"code":23570,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_daily_kpis\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - reports.rpt_daily_revenue\n  - staging.stg_customers\n  - staging.stg_orders\n  - staging.stg_web_sessions\n  - staging.stg_marketing_spend\ncolumns:\n  - name: kpi_date\n    type: date\n    checks:\n      - name: not_null\n      - name: unique\n@bruin *\u002F\n\nWITH daily_customers AS (\n    SELECT\n        toDate(o.order_date) AS order_date,\n        countIf(toDate(c.first_seen_at) = toDate(o.order_date)) AS new_customers,\n        countIf(toDate(c.first_seen_at) \u003C toDate(o.order_date)) AS returning_customers\n    FROM staging.stg_orders o\n    LEFT JOIN staging.stg_customers c\n        ON o.customer_email = c.customer_email\n    WHERE o.payment_status = 'paid'\n    GROUP BY toDate(o.order_date)\n),\ndaily_sessions AS (\n    SELECT\n        session_date,\n        sum(total_sessions) AS sessions,\n        sum(new_users) AS new_visitors,\n        sum(purchase_events) AS purchases\n    FROM staging.stg_web_sessions\n    GROUP BY session_date\n),\ndaily_spend AS (\n    SELECT\n        spend_date,\n        sum(spend) AS total_ad_spend\n    FROM staging.stg_marketing_spend\n    GROUP BY spend_date\n)\nSELECT\n    r.order_date AS kpi_date,\n    r.net_revenue,\n    r.total_orders,\n    r.paid_orders,\n    r.avg_order_value,\n    r.cancellation_rate,\n    dc.new_customers,\n    dc.returning_customers,\n    ds.sessions,\n    ds.new_visitors,\n    round(ds.purchases \u002F nullIf(ds.sessions, 0) * 100, 2) AS conversion_rate,\n    sp.total_ad_spend,\n    round(r.net_revenue \u002F nullIf(sp.total_ad_spend, 0), 2) AS overall_roas\nFROM reports.rpt_daily_revenue r\nLEFT JOIN daily_customers dc ON r.order_date = dc.order_date\nLEFT JOIN daily_sessions ds ON r.order_date = ds.session_date\nLEFT JOIN daily_spend sp ON r.order_date = sp.spend_date\nORDER BY kpi_date DESC\n",[23572],{"type":42,"tag":240,"props":23573,"children":23574},{"__ignoreMap":7},[23575,23582,23590,23597,23604,23611,23618,23626,23633,23640,23647,23654,23661,23669,23676,23683,23690,23697,23704,23711,23731,23738,23770,23827,23884,23907,23931,23966,23993,24020,24027,24043,24050,24057,24080,24100,24119,24138,24150,24157,24173,24180,24187,24207,24226,24238,24245,24252,24277,24297,24317,24337,24357,24377,24398,24418,24438,24458,24548,24569,24647,24673,24720,24765,24811],{"type":42,"tag":391,"props":23576,"children":23577},{"class":393,"line":176},[23578],{"type":42,"tag":391,"props":23579,"children":23580},{"style":6773},[23581],{"type":51,"value":6776},{"type":42,"tag":391,"props":23583,"children":23584},{"class":393,"line":99},[23585],{"type":42,"tag":391,"props":23586,"children":23587},{"style":6773},[23588],{"type":51,"value":23589},"name: reports.rpt_daily_kpis\n",{"type":42,"tag":391,"props":23591,"children":23592},{"class":393,"line":439},[23593],{"type":42,"tag":391,"props":23594,"children":23595},{"style":6773},[23596],{"type":51,"value":6792},{"type":42,"tag":391,"props":23598,"children":23599},{"class":393,"line":947},[23600],{"type":42,"tag":391,"props":23601,"children":23602},{"style":6773},[23603],{"type":51,"value":6800},{"type":42,"tag":391,"props":23605,"children":23606},{"class":393,"line":960},[23607],{"type":42,"tag":391,"props":23608,"children":23609},{"style":6773},[23610],{"type":51,"value":6808},{"type":42,"tag":391,"props":23612,"children":23613},{"class":393,"line":984},[23614],{"type":42,"tag":391,"props":23615,"children":23616},{"style":6773},[23617],{"type":51,"value":6816},{"type":42,"tag":391,"props":23619,"children":23620},{"class":393,"line":1002},[23621],{"type":42,"tag":391,"props":23622,"children":23623},{"style":6773},[23624],{"type":51,"value":23625},"  - reports.rpt_daily_revenue\n",{"type":42,"tag":391,"props":23627,"children":23628},{"class":393,"line":165},[23629],{"type":42,"tag":391,"props":23630,"children":23631},{"style":6773},[23632],{"type":51,"value":16549},{"type":42,"tag":391,"props":23634,"children":23635},{"class":393,"line":2235},[23636],{"type":42,"tag":391,"props":23637,"children":23638},{"style":6773},[23639],{"type":51,"value":14566},{"type":42,"tag":391,"props":23641,"children":23642},{"class":393,"line":6843},[23643],{"type":42,"tag":391,"props":23644,"children":23645},{"style":6773},[23646],{"type":51,"value":19660},{"type":42,"tag":391,"props":23648,"children":23649},{"class":393,"line":6852},[23650],{"type":42,"tag":391,"props":23651,"children":23652},{"style":6773},[23653],{"type":51,"value":19652},{"type":42,"tag":391,"props":23655,"children":23656},{"class":393,"line":6861},[23657],{"type":42,"tag":391,"props":23658,"children":23659},{"style":6773},[23660],{"type":51,"value":6840},{"type":42,"tag":391,"props":23662,"children":23663},{"class":393,"line":6870},[23664],{"type":42,"tag":391,"props":23665,"children":23666},{"style":6773},[23667],{"type":51,"value":23668},"  - name: kpi_date\n",{"type":42,"tag":391,"props":23670,"children":23671},{"class":393,"line":6879},[23672],{"type":42,"tag":391,"props":23673,"children":23674},{"style":6773},[23675],{"type":51,"value":10874},{"type":42,"tag":391,"props":23677,"children":23678},{"class":393,"line":1707},[23679],{"type":42,"tag":391,"props":23680,"children":23681},{"style":6773},[23682],{"type":51,"value":6867},{"type":42,"tag":391,"props":23684,"children":23685},{"class":393,"line":6896},[23686],{"type":42,"tag":391,"props":23687,"children":23688},{"style":6773},[23689],{"type":51,"value":6876},{"type":42,"tag":391,"props":23691,"children":23692},{"class":393,"line":6905},[23693],{"type":42,"tag":391,"props":23694,"children":23695},{"style":6773},[23696],{"type":51,"value":6885},{"type":42,"tag":391,"props":23698,"children":23699},{"class":393,"line":6913},[23700],{"type":42,"tag":391,"props":23701,"children":23702},{"style":6773},[23703],{"type":51,"value":6963},{"type":42,"tag":391,"props":23705,"children":23706},{"class":393,"line":6921},[23707],{"type":42,"tag":391,"props":23708,"children":23709},{"emptyLinePlaceholder":13},[23710],{"type":51,"value":6972},{"type":42,"tag":391,"props":23712,"children":23713},{"class":393,"line":6930},[23714,23718,23723,23727],{"type":42,"tag":391,"props":23715,"children":23716},{"style":515},[23717],{"type":51,"value":16607},{"type":42,"tag":391,"props":23719,"children":23720},{"style":409},[23721],{"type":51,"value":23722}," daily_customers ",{"type":42,"tag":391,"props":23724,"children":23725},{"style":515},[23726],{"type":51,"value":7194},{"type":42,"tag":391,"props":23728,"children":23729},{"style":409},[23730],{"type":51,"value":16621},{"type":42,"tag":391,"props":23732,"children":23733},{"class":393,"line":6939},[23734],{"type":42,"tag":391,"props":23735,"children":23736},{"style":515},[23737],{"type":51,"value":16629},{"type":42,"tag":391,"props":23739,"children":23740},{"class":393,"line":6948},[23741,23746,23750,23754,23758,23762,23766],{"type":42,"tag":391,"props":23742,"children":23743},{"style":409},[23744],{"type":51,"value":23745},"        toDate(",{"type":42,"tag":391,"props":23747,"children":23748},{"style":415},[23749],{"type":51,"value":7148},{"type":42,"tag":391,"props":23751,"children":23752},{"style":409},[23753],{"type":51,"value":247},{"type":42,"tag":391,"props":23755,"children":23756},{"style":415},[23757],{"type":51,"value":16704},{"type":42,"tag":391,"props":23759,"children":23760},{"style":409},[23761],{"type":51,"value":7672},{"type":42,"tag":391,"props":23763,"children":23764},{"style":515},[23765],{"type":51,"value":7194},{"type":42,"tag":391,"props":23767,"children":23768},{"style":409},[23769],{"type":51,"value":7083},{"type":42,"tag":391,"props":23771,"children":23772},{"class":393,"line":6957},[23773,23778,23782,23786,23790,23794,23798,23802,23806,23810,23814,23818,23822],{"type":42,"tag":391,"props":23774,"children":23775},{"style":409},[23776],{"type":51,"value":23777},"        countIf(toDate(",{"type":42,"tag":391,"props":23779,"children":23780},{"style":415},[23781],{"type":51,"value":7686},{"type":42,"tag":391,"props":23783,"children":23784},{"style":409},[23785],{"type":51,"value":247},{"type":42,"tag":391,"props":23787,"children":23788},{"style":415},[23789],{"type":51,"value":16671},{"type":42,"tag":391,"props":23791,"children":23792},{"style":409},[23793],{"type":51,"value":7672},{"type":42,"tag":391,"props":23795,"children":23796},{"style":515},[23797],{"type":51,"value":7677},{"type":42,"tag":391,"props":23799,"children":23800},{"style":409},[23801],{"type":51,"value":7655},{"type":42,"tag":391,"props":23803,"children":23804},{"style":415},[23805],{"type":51,"value":7148},{"type":42,"tag":391,"props":23807,"children":23808},{"style":409},[23809],{"type":51,"value":247},{"type":42,"tag":391,"props":23811,"children":23812},{"style":415},[23813],{"type":51,"value":16704},{"type":42,"tag":391,"props":23815,"children":23816},{"style":409},[23817],{"type":51,"value":7189},{"type":42,"tag":391,"props":23819,"children":23820},{"style":515},[23821],{"type":51,"value":7194},{"type":42,"tag":391,"props":23823,"children":23824},{"style":409},[23825],{"type":51,"value":23826}," new_customers,\n",{"type":42,"tag":391,"props":23828,"children":23829},{"class":393,"line":6966},[23830,23834,23838,23842,23846,23850,23855,23859,23863,23867,23871,23875,23879],{"type":42,"tag":391,"props":23831,"children":23832},{"style":409},[23833],{"type":51,"value":23777},{"type":42,"tag":391,"props":23835,"children":23836},{"style":415},[23837],{"type":51,"value":7686},{"type":42,"tag":391,"props":23839,"children":23840},{"style":409},[23841],{"type":51,"value":247},{"type":42,"tag":391,"props":23843,"children":23844},{"style":415},[23845],{"type":51,"value":16671},{"type":42,"tag":391,"props":23847,"children":23848},{"style":409},[23849],{"type":51,"value":7672},{"type":42,"tag":391,"props":23851,"children":23852},{"style":515},[23853],{"type":51,"value":23854},"\u003C",{"type":42,"tag":391,"props":23856,"children":23857},{"style":409},[23858],{"type":51,"value":7655},{"type":42,"tag":391,"props":23860,"children":23861},{"style":415},[23862],{"type":51,"value":7148},{"type":42,"tag":391,"props":23864,"children":23865},{"style":409},[23866],{"type":51,"value":247},{"type":42,"tag":391,"props":23868,"children":23869},{"style":415},[23870],{"type":51,"value":16704},{"type":42,"tag":391,"props":23872,"children":23873},{"style":409},[23874],{"type":51,"value":7189},{"type":42,"tag":391,"props":23876,"children":23877},{"style":515},[23878],{"type":51,"value":7194},{"type":42,"tag":391,"props":23880,"children":23881},{"style":409},[23882],{"type":51,"value":23883}," returning_customers\n",{"type":42,"tag":391,"props":23885,"children":23886},{"class":393,"line":6975},[23887,23891,23895,23899,23903],{"type":42,"tag":391,"props":23888,"children":23889},{"style":515},[23890],{"type":51,"value":16741},{"type":42,"tag":391,"props":23892,"children":23893},{"style":415},[23894],{"type":51,"value":15019},{"type":42,"tag":391,"props":23896,"children":23897},{"style":409},[23898],{"type":51,"value":247},{"type":42,"tag":391,"props":23900,"children":23901},{"style":415},[23902],{"type":51,"value":15641},{"type":42,"tag":391,"props":23904,"children":23905},{"style":409},[23906],{"type":51,"value":7574},{"type":42,"tag":391,"props":23908,"children":23909},{"class":393,"line":6984},[23910,23915,23919,23923,23927],{"type":42,"tag":391,"props":23911,"children":23912},{"style":515},[23913],{"type":51,"value":23914},"    LEFT JOIN",{"type":42,"tag":391,"props":23916,"children":23917},{"style":415},[23918],{"type":51,"value":15019},{"type":42,"tag":391,"props":23920,"children":23921},{"style":409},[23922],{"type":51,"value":247},{"type":42,"tag":391,"props":23924,"children":23925},{"style":415},[23926],{"type":51,"value":16778},{"type":42,"tag":391,"props":23928,"children":23929},{"style":409},[23930],{"type":51,"value":7600},{"type":42,"tag":391,"props":23932,"children":23933},{"class":393,"line":7012},[23934,23938,23942,23946,23950,23954,23958,23962],{"type":42,"tag":391,"props":23935,"children":23936},{"style":515},[23937],{"type":51,"value":16790},{"type":42,"tag":391,"props":23939,"children":23940},{"style":415},[23941],{"type":51,"value":7614},{"type":42,"tag":391,"props":23943,"children":23944},{"style":409},[23945],{"type":51,"value":247},{"type":42,"tag":391,"props":23947,"children":23948},{"style":415},[23949],{"type":51,"value":16646},{"type":42,"tag":391,"props":23951,"children":23952},{"style":515},[23953],{"type":51,"value":7627},{"type":42,"tag":391,"props":23955,"children":23956},{"style":415},[23957],{"type":51,"value":7632},{"type":42,"tag":391,"props":23959,"children":23960},{"style":409},[23961],{"type":51,"value":247},{"type":42,"tag":391,"props":23963,"children":23964},{"style":415},[23965],{"type":51,"value":16819},{"type":42,"tag":391,"props":23967,"children":23968},{"class":393,"line":7034},[23969,23973,23977,23981,23985,23989],{"type":42,"tag":391,"props":23970,"children":23971},{"style":515},[23972],{"type":51,"value":16827},{"type":42,"tag":391,"props":23974,"children":23975},{"style":415},[23976],{"type":51,"value":7614},{"type":42,"tag":391,"props":23978,"children":23979},{"style":409},[23980],{"type":51,"value":247},{"type":42,"tag":391,"props":23982,"children":23983},{"style":415},[23984],{"type":51,"value":16840},{"type":42,"tag":391,"props":23986,"children":23987},{"style":515},[23988],{"type":51,"value":7627},{"type":42,"tag":391,"props":23990,"children":23991},{"style":403},[23992],{"type":51,"value":16849},{"type":42,"tag":391,"props":23994,"children":23995},{"class":393,"line":7060},[23996,24000,24004,24008,24012,24016],{"type":42,"tag":391,"props":23997,"children":23998},{"style":515},[23999],{"type":51,"value":16939},{"type":42,"tag":391,"props":24001,"children":24002},{"style":409},[24003],{"type":51,"value":7655},{"type":42,"tag":391,"props":24005,"children":24006},{"style":415},[24007],{"type":51,"value":7148},{"type":42,"tag":391,"props":24009,"children":24010},{"style":409},[24011],{"type":51,"value":247},{"type":42,"tag":391,"props":24013,"children":24014},{"style":415},[24015],{"type":51,"value":16704},{"type":42,"tag":391,"props":24017,"children":24018},{"style":409},[24019],{"type":51,"value":7700},{"type":42,"tag":391,"props":24021,"children":24022},{"class":393,"line":7086},[24023],{"type":42,"tag":391,"props":24024,"children":24025},{"style":409},[24026],{"type":51,"value":16857},{"type":42,"tag":391,"props":24028,"children":24029},{"class":393,"line":7111},[24030,24035,24039],{"type":42,"tag":391,"props":24031,"children":24032},{"style":409},[24033],{"type":51,"value":24034},"daily_sessions ",{"type":42,"tag":391,"props":24036,"children":24037},{"style":515},[24038],{"type":51,"value":7194},{"type":42,"tag":391,"props":24040,"children":24041},{"style":409},[24042],{"type":51,"value":16621},{"type":42,"tag":391,"props":24044,"children":24045},{"class":393,"line":7132},[24046],{"type":42,"tag":391,"props":24047,"children":24048},{"style":515},[24049],{"type":51,"value":16629},{"type":42,"tag":391,"props":24051,"children":24052},{"class":393,"line":7202},[24053],{"type":42,"tag":391,"props":24054,"children":24055},{"style":409},[24056],{"type":51,"value":19915},{"type":42,"tag":391,"props":24058,"children":24059},{"class":393,"line":7264},[24060,24064,24068,24072,24076],{"type":42,"tag":391,"props":24061,"children":24062},{"style":415},[24063],{"type":51,"value":19768},{"type":42,"tag":391,"props":24065,"children":24066},{"style":409},[24067],{"type":51,"value":19934},{"type":42,"tag":391,"props":24069,"children":24070},{"style":515},[24071],{"type":51,"value":7194},{"type":42,"tag":391,"props":24073,"children":24074},{"style":515},[24075],{"type":51,"value":19943},{"type":42,"tag":391,"props":24077,"children":24078},{"style":409},[24079],{"type":51,"value":7031},{"type":42,"tag":391,"props":24081,"children":24082},{"class":393,"line":7326},[24083,24087,24091,24095],{"type":42,"tag":391,"props":24084,"children":24085},{"style":415},[24086],{"type":51,"value":19768},{"type":42,"tag":391,"props":24088,"children":24089},{"style":409},[24090],{"type":51,"value":19959},{"type":42,"tag":391,"props":24092,"children":24093},{"style":515},[24094],{"type":51,"value":7194},{"type":42,"tag":391,"props":24096,"children":24097},{"style":409},[24098],{"type":51,"value":24099}," new_visitors,\n",{"type":42,"tag":391,"props":24101,"children":24102},{"class":393,"line":7388},[24103,24107,24111,24115],{"type":42,"tag":391,"props":24104,"children":24105},{"style":415},[24106],{"type":51,"value":19768},{"type":42,"tag":391,"props":24108,"children":24109},{"style":409},[24110],{"type":51,"value":19979},{"type":42,"tag":391,"props":24112,"children":24113},{"style":515},[24114],{"type":51,"value":7194},{"type":42,"tag":391,"props":24116,"children":24117},{"style":409},[24118],{"type":51,"value":19988},{"type":42,"tag":391,"props":24120,"children":24121},{"class":393,"line":7409},[24122,24126,24130,24134],{"type":42,"tag":391,"props":24123,"children":24124},{"style":515},[24125],{"type":51,"value":16741},{"type":42,"tag":391,"props":24127,"children":24128},{"style":415},[24129],{"type":51,"value":15019},{"type":42,"tag":391,"props":24131,"children":24132},{"style":409},[24133],{"type":51,"value":247},{"type":42,"tag":391,"props":24135,"children":24136},{"style":415},[24137],{"type":51,"value":20008},{"type":42,"tag":391,"props":24139,"children":24140},{"class":393,"line":7430},[24141,24145],{"type":42,"tag":391,"props":24142,"children":24143},{"style":515},[24144],{"type":51,"value":16939},{"type":42,"tag":391,"props":24146,"children":24147},{"style":409},[24148],{"type":51,"value":24149}," session_date\n",{"type":42,"tag":391,"props":24151,"children":24152},{"class":393,"line":7451},[24153],{"type":42,"tag":391,"props":24154,"children":24155},{"style":409},[24156],{"type":51,"value":16857},{"type":42,"tag":391,"props":24158,"children":24159},{"class":393,"line":7497},[24160,24165,24169],{"type":42,"tag":391,"props":24161,"children":24162},{"style":409},[24163],{"type":51,"value":24164},"daily_spend ",{"type":42,"tag":391,"props":24166,"children":24167},{"style":515},[24168],{"type":51,"value":7194},{"type":42,"tag":391,"props":24170,"children":24171},{"style":409},[24172],{"type":51,"value":16621},{"type":42,"tag":391,"props":24174,"children":24175},{"class":393,"line":7523},[24176],{"type":42,"tag":391,"props":24177,"children":24178},{"style":515},[24179],{"type":51,"value":16629},{"type":42,"tag":391,"props":24181,"children":24182},{"class":393,"line":7549},[24183],{"type":42,"tag":391,"props":24184,"children":24185},{"style":409},[24186],{"type":51,"value":19752},{"type":42,"tag":391,"props":24188,"children":24189},{"class":393,"line":7577},[24190,24194,24198,24202],{"type":42,"tag":391,"props":24191,"children":24192},{"style":415},[24193],{"type":51,"value":19768},{"type":42,"tag":391,"props":24195,"children":24196},{"style":409},[24197],{"type":51,"value":19773},{"type":42,"tag":391,"props":24199,"children":24200},{"style":515},[24201],{"type":51,"value":7194},{"type":42,"tag":391,"props":24203,"children":24204},{"style":409},[24205],{"type":51,"value":24206}," total_ad_spend\n",{"type":42,"tag":391,"props":24208,"children":24209},{"class":393,"line":7603},[24210,24214,24218,24222],{"type":42,"tag":391,"props":24211,"children":24212},{"style":515},[24213],{"type":51,"value":16741},{"type":42,"tag":391,"props":24215,"children":24216},{"style":415},[24217],{"type":51,"value":15019},{"type":42,"tag":391,"props":24219,"children":24220},{"style":409},[24221],{"type":51,"value":247},{"type":42,"tag":391,"props":24223,"children":24224},{"style":415},[24225],{"type":51,"value":19865},{"type":42,"tag":391,"props":24227,"children":24228},{"class":393,"line":7644},[24229,24233],{"type":42,"tag":391,"props":24230,"children":24231},{"style":515},[24232],{"type":51,"value":16939},{"type":42,"tag":391,"props":24234,"children":24235},{"style":409},[24236],{"type":51,"value":24237}," spend_date\n",{"type":42,"tag":391,"props":24239,"children":24240},{"class":393,"line":8522},[24241],{"type":42,"tag":391,"props":24242,"children":24243},{"style":409},[24244],{"type":51,"value":7700},{"type":42,"tag":391,"props":24246,"children":24247},{"class":393,"line":8581},[24248],{"type":42,"tag":391,"props":24249,"children":24250},{"style":515},[24251],{"type":51,"value":6981},{"type":42,"tag":391,"props":24253,"children":24254},{"class":393,"line":20272},[24255,24260,24264,24268,24272],{"type":42,"tag":391,"props":24256,"children":24257},{"style":415},[24258],{"type":51,"value":24259},"    r",{"type":42,"tag":391,"props":24261,"children":24262},{"style":409},[24263],{"type":51,"value":247},{"type":42,"tag":391,"props":24265,"children":24266},{"style":415},[24267],{"type":51,"value":16704},{"type":42,"tag":391,"props":24269,"children":24270},{"style":515},[24271],{"type":51,"value":7004},{"type":42,"tag":391,"props":24273,"children":24274},{"style":409},[24275],{"type":51,"value":24276}," kpi_date,\n",{"type":42,"tag":391,"props":24278,"children":24279},{"class":393,"line":20280},[24280,24284,24288,24293],{"type":42,"tag":391,"props":24281,"children":24282},{"style":415},[24283],{"type":51,"value":24259},{"type":42,"tag":391,"props":24285,"children":24286},{"style":409},[24287],{"type":51,"value":247},{"type":42,"tag":391,"props":24289,"children":24290},{"style":415},[24291],{"type":51,"value":24292},"net_revenue",{"type":42,"tag":391,"props":24294,"children":24295},{"style":409},[24296],{"type":51,"value":7031},{"type":42,"tag":391,"props":24298,"children":24299},{"class":393,"line":20288},[24300,24304,24308,24313],{"type":42,"tag":391,"props":24301,"children":24302},{"style":415},[24303],{"type":51,"value":24259},{"type":42,"tag":391,"props":24305,"children":24306},{"style":409},[24307],{"type":51,"value":247},{"type":42,"tag":391,"props":24309,"children":24310},{"style":415},[24311],{"type":51,"value":24312},"total_orders",{"type":42,"tag":391,"props":24314,"children":24315},{"style":409},[24316],{"type":51,"value":7031},{"type":42,"tag":391,"props":24318,"children":24319},{"class":393,"line":20314},[24320,24324,24328,24333],{"type":42,"tag":391,"props":24321,"children":24322},{"style":415},[24323],{"type":51,"value":24259},{"type":42,"tag":391,"props":24325,"children":24326},{"style":409},[24327],{"type":51,"value":247},{"type":42,"tag":391,"props":24329,"children":24330},{"style":415},[24331],{"type":51,"value":24332},"paid_orders",{"type":42,"tag":391,"props":24334,"children":24335},{"style":409},[24336],{"type":51,"value":7031},{"type":42,"tag":391,"props":24338,"children":24339},{"class":393,"line":20334},[24340,24344,24348,24353],{"type":42,"tag":391,"props":24341,"children":24342},{"style":415},[24343],{"type":51,"value":24259},{"type":42,"tag":391,"props":24345,"children":24346},{"style":409},[24347],{"type":51,"value":247},{"type":42,"tag":391,"props":24349,"children":24350},{"style":415},[24351],{"type":51,"value":24352},"avg_order_value",{"type":42,"tag":391,"props":24354,"children":24355},{"style":409},[24356],{"type":51,"value":7031},{"type":42,"tag":391,"props":24358,"children":24359},{"class":393,"line":20355},[24360,24364,24368,24373],{"type":42,"tag":391,"props":24361,"children":24362},{"style":415},[24363],{"type":51,"value":24259},{"type":42,"tag":391,"props":24365,"children":24366},{"style":409},[24367],{"type":51,"value":247},{"type":42,"tag":391,"props":24369,"children":24370},{"style":415},[24371],{"type":51,"value":24372},"cancellation_rate",{"type":42,"tag":391,"props":24374,"children":24375},{"style":409},[24376],{"type":51,"value":7031},{"type":42,"tag":391,"props":24378,"children":24379},{"class":393,"line":20376},[24380,24385,24389,24394],{"type":42,"tag":391,"props":24381,"children":24382},{"style":415},[24383],{"type":51,"value":24384},"    dc",{"type":42,"tag":391,"props":24386,"children":24387},{"style":409},[24388],{"type":51,"value":247},{"type":42,"tag":391,"props":24390,"children":24391},{"style":415},[24392],{"type":51,"value":24393},"new_customers",{"type":42,"tag":391,"props":24395,"children":24396},{"style":409},[24397],{"type":51,"value":7031},{"type":42,"tag":391,"props":24399,"children":24400},{"class":393,"line":20397},[24401,24405,24409,24414],{"type":42,"tag":391,"props":24402,"children":24403},{"style":415},[24404],{"type":51,"value":24384},{"type":42,"tag":391,"props":24406,"children":24407},{"style":409},[24408],{"type":51,"value":247},{"type":42,"tag":391,"props":24410,"children":24411},{"style":415},[24412],{"type":51,"value":24413},"returning_customers",{"type":42,"tag":391,"props":24415,"children":24416},{"style":409},[24417],{"type":51,"value":7031},{"type":42,"tag":391,"props":24419,"children":24420},{"class":393,"line":20418},[24421,24426,24430,24434],{"type":42,"tag":391,"props":24422,"children":24423},{"style":415},[24424],{"type":51,"value":24425},"    ds",{"type":42,"tag":391,"props":24427,"children":24428},{"style":409},[24429],{"type":51,"value":247},{"type":42,"tag":391,"props":24431,"children":24432},{"style":415},[24433],{"type":51,"value":12616},{"type":42,"tag":391,"props":24435,"children":24436},{"style":409},[24437],{"type":51,"value":7031},{"type":42,"tag":391,"props":24439,"children":24440},{"class":393,"line":20439},[24441,24445,24449,24454],{"type":42,"tag":391,"props":24442,"children":24443},{"style":415},[24444],{"type":51,"value":24425},{"type":42,"tag":391,"props":24446,"children":24447},{"style":409},[24448],{"type":51,"value":247},{"type":42,"tag":391,"props":24450,"children":24451},{"style":415},[24452],{"type":51,"value":24453},"new_visitors",{"type":42,"tag":391,"props":24455,"children":24456},{"style":409},[24457],{"type":51,"value":7031},{"type":42,"tag":391,"props":24459,"children":24460},{"class":393,"line":20459},[24461,24465,24469,24474,24478,24483,24487,24491,24495,24499,24503,24507,24511,24515,24519,24523,24527,24531,24535,24539,24543],{"type":42,"tag":391,"props":24462,"children":24463},{"style":415},[24464],{"type":51,"value":14899},{"type":42,"tag":391,"props":24466,"children":24467},{"style":409},[24468],{"type":51,"value":7143},{"type":42,"tag":391,"props":24470,"children":24471},{"style":415},[24472],{"type":51,"value":24473},"ds",{"type":42,"tag":391,"props":24475,"children":24476},{"style":409},[24477],{"type":51,"value":247},{"type":42,"tag":391,"props":24479,"children":24480},{"style":415},[24481],{"type":51,"value":24482},"purchases",{"type":42,"tag":391,"props":24484,"children":24485},{"style":515},[24486],{"type":51,"value":7471},{"type":42,"tag":391,"props":24488,"children":24489},{"style":415},[24490],{"type":51,"value":14914},{"type":42,"tag":391,"props":24492,"children":24493},{"style":409},[24494],{"type":51,"value":7143},{"type":42,"tag":391,"props":24496,"children":24497},{"style":415},[24498],{"type":51,"value":24473},{"type":42,"tag":391,"props":24500,"children":24501},{"style":409},[24502],{"type":51,"value":247},{"type":42,"tag":391,"props":24504,"children":24505},{"style":415},[24506],{"type":51,"value":12616},{"type":42,"tag":391,"props":24508,"children":24509},{"style":409},[24510],{"type":51,"value":292},{"type":42,"tag":391,"props":24512,"children":24513},{"style":415},[24514],{"type":51,"value":7485},{"type":42,"tag":391,"props":24516,"children":24517},{"style":409},[24518],{"type":51,"value":7672},{"type":42,"tag":391,"props":24520,"children":24521},{"style":515},[24522],{"type":51,"value":13108},{"type":42,"tag":391,"props":24524,"children":24525},{"style":415},[24526],{"type":51,"value":7476},{"type":42,"tag":391,"props":24528,"children":24529},{"style":409},[24530],{"type":51,"value":292},{"type":42,"tag":391,"props":24532,"children":24533},{"style":415},[24534],{"type":51,"value":7184},{"type":42,"tag":391,"props":24536,"children":24537},{"style":409},[24538],{"type":51,"value":7672},{"type":42,"tag":391,"props":24540,"children":24541},{"style":515},[24542],{"type":51,"value":7194},{"type":42,"tag":391,"props":24544,"children":24545},{"style":409},[24546],{"type":51,"value":24547}," conversion_rate,\n",{"type":42,"tag":391,"props":24549,"children":24550},{"class":393,"line":20481},[24551,24556,24560,24565],{"type":42,"tag":391,"props":24552,"children":24553},{"style":415},[24554],{"type":51,"value":24555},"    sp",{"type":42,"tag":391,"props":24557,"children":24558},{"style":409},[24559],{"type":51,"value":247},{"type":42,"tag":391,"props":24561,"children":24562},{"style":415},[24563],{"type":51,"value":24564},"total_ad_spend",{"type":42,"tag":391,"props":24566,"children":24567},{"style":409},[24568],{"type":51,"value":7031},{"type":42,"tag":391,"props":24570,"children":24571},{"class":393,"line":20559},[24572,24576,24580,24585,24589,24593,24597,24601,24605,24610,24614,24618,24622,24626,24630,24634,24638,24642],{"type":42,"tag":391,"props":24573,"children":24574},{"style":415},[24575],{"type":51,"value":14899},{"type":42,"tag":391,"props":24577,"children":24578},{"style":409},[24579],{"type":51,"value":7143},{"type":42,"tag":391,"props":24581,"children":24582},{"style":415},[24583],{"type":51,"value":24584},"r",{"type":42,"tag":391,"props":24586,"children":24587},{"style":409},[24588],{"type":51,"value":247},{"type":42,"tag":391,"props":24590,"children":24591},{"style":415},[24592],{"type":51,"value":24292},{"type":42,"tag":391,"props":24594,"children":24595},{"style":515},[24596],{"type":51,"value":7471},{"type":42,"tag":391,"props":24598,"children":24599},{"style":415},[24600],{"type":51,"value":14914},{"type":42,"tag":391,"props":24602,"children":24603},{"style":409},[24604],{"type":51,"value":7143},{"type":42,"tag":391,"props":24606,"children":24607},{"style":415},[24608],{"type":51,"value":24609},"sp",{"type":42,"tag":391,"props":24611,"children":24612},{"style":409},[24613],{"type":51,"value":247},{"type":42,"tag":391,"props":24615,"children":24616},{"style":415},[24617],{"type":51,"value":24564},{"type":42,"tag":391,"props":24619,"children":24620},{"style":409},[24621],{"type":51,"value":292},{"type":42,"tag":391,"props":24623,"children":24624},{"style":415},[24625],{"type":51,"value":7485},{"type":42,"tag":391,"props":24627,"children":24628},{"style":409},[24629],{"type":51,"value":14928},{"type":42,"tag":391,"props":24631,"children":24632},{"style":415},[24633],{"type":51,"value":7184},{"type":42,"tag":391,"props":24635,"children":24636},{"style":409},[24637],{"type":51,"value":7672},{"type":42,"tag":391,"props":24639,"children":24640},{"style":515},[24641],{"type":51,"value":7194},{"type":42,"tag":391,"props":24643,"children":24644},{"style":409},[24645],{"type":51,"value":24646}," overall_roas\n",{"type":42,"tag":391,"props":24648,"children":24649},{"class":393,"line":20636},[24650,24654,24659,24663,24668],{"type":42,"tag":391,"props":24651,"children":24652},{"style":515},[24653],{"type":51,"value":7555},{"type":42,"tag":391,"props":24655,"children":24656},{"style":415},[24657],{"type":51,"value":24658}," reports",{"type":42,"tag":391,"props":24660,"children":24661},{"style":409},[24662],{"type":51,"value":247},{"type":42,"tag":391,"props":24664,"children":24665},{"style":415},[24666],{"type":51,"value":24667},"rpt_daily_revenue",{"type":42,"tag":391,"props":24669,"children":24670},{"style":409},[24671],{"type":51,"value":24672}," r\n",{"type":42,"tag":391,"props":24674,"children":24675},{"class":393,"line":20725},[24676,24680,24685,24690,24695,24699,24703,24707,24712,24716],{"type":42,"tag":391,"props":24677,"children":24678},{"style":515},[24679],{"type":51,"value":6663},{"type":42,"tag":391,"props":24681,"children":24682},{"style":409},[24683],{"type":51,"value":24684}," daily_customers dc ",{"type":42,"tag":391,"props":24686,"children":24687},{"style":515},[24688],{"type":51,"value":24689},"ON",{"type":42,"tag":391,"props":24691,"children":24692},{"style":415},[24693],{"type":51,"value":24694}," r",{"type":42,"tag":391,"props":24696,"children":24697},{"style":409},[24698],{"type":51,"value":247},{"type":42,"tag":391,"props":24700,"children":24701},{"style":415},[24702],{"type":51,"value":16704},{"type":42,"tag":391,"props":24704,"children":24705},{"style":515},[24706],{"type":51,"value":7627},{"type":42,"tag":391,"props":24708,"children":24709},{"style":415},[24710],{"type":51,"value":24711}," dc",{"type":42,"tag":391,"props":24713,"children":24714},{"style":409},[24715],{"type":51,"value":247},{"type":42,"tag":391,"props":24717,"children":24718},{"style":415},[24719],{"type":51,"value":20872},{"type":42,"tag":391,"props":24721,"children":24722},{"class":393,"line":20738},[24723,24727,24732,24736,24740,24744,24748,24752,24757,24761],{"type":42,"tag":391,"props":24724,"children":24725},{"style":515},[24726],{"type":51,"value":6663},{"type":42,"tag":391,"props":24728,"children":24729},{"style":409},[24730],{"type":51,"value":24731}," daily_sessions ds ",{"type":42,"tag":391,"props":24733,"children":24734},{"style":515},[24735],{"type":51,"value":24689},{"type":42,"tag":391,"props":24737,"children":24738},{"style":415},[24739],{"type":51,"value":24694},{"type":42,"tag":391,"props":24741,"children":24742},{"style":409},[24743],{"type":51,"value":247},{"type":42,"tag":391,"props":24745,"children":24746},{"style":415},[24747],{"type":51,"value":16704},{"type":42,"tag":391,"props":24749,"children":24750},{"style":515},[24751],{"type":51,"value":7627},{"type":42,"tag":391,"props":24753,"children":24754},{"style":415},[24755],{"type":51,"value":24756}," ds",{"type":42,"tag":391,"props":24758,"children":24759},{"style":409},[24760],{"type":51,"value":247},{"type":42,"tag":391,"props":24762,"children":24763},{"style":415},[24764],{"type":51,"value":20216},{"type":42,"tag":391,"props":24766,"children":24767},{"class":393,"line":20751},[24768,24772,24777,24781,24785,24789,24793,24797,24802,24806],{"type":42,"tag":391,"props":24769,"children":24770},{"style":515},[24771],{"type":51,"value":6663},{"type":42,"tag":391,"props":24773,"children":24774},{"style":409},[24775],{"type":51,"value":24776}," daily_spend sp ",{"type":42,"tag":391,"props":24778,"children":24779},{"style":515},[24780],{"type":51,"value":24689},{"type":42,"tag":391,"props":24782,"children":24783},{"style":415},[24784],{"type":51,"value":24694},{"type":42,"tag":391,"props":24786,"children":24787},{"style":409},[24788],{"type":51,"value":247},{"type":42,"tag":391,"props":24790,"children":24791},{"style":415},[24792],{"type":51,"value":16704},{"type":42,"tag":391,"props":24794,"children":24795},{"style":515},[24796],{"type":51,"value":7627},{"type":42,"tag":391,"props":24798,"children":24799},{"style":415},[24800],{"type":51,"value":24801}," sp",{"type":42,"tag":391,"props":24803,"children":24804},{"style":409},[24805],{"type":51,"value":247},{"type":42,"tag":391,"props":24807,"children":24808},{"style":415},[24809],{"type":51,"value":24810},"spend_date\n",{"type":42,"tag":391,"props":24812,"children":24813},{"class":393,"line":20788},[24814,24818,24823],{"type":42,"tag":391,"props":24815,"children":24816},{"style":515},[24817],{"type":51,"value":15048},{"type":42,"tag":391,"props":24819,"children":24820},{"style":409},[24821],{"type":51,"value":24822}," kpi_date ",{"type":42,"tag":391,"props":24824,"children":24825},{"style":515},[24826],{"type":51,"value":24827},"DESC\n",{"type":42,"tag":569,"props":24829,"children":24830},{"v-slot:bigquery":7},[24831],{"type":42,"tag":381,"props":24832,"children":24834},{"className":6761,"code":24833,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_daily_kpis\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - reports.rpt_daily_revenue\n  - staging.stg_customers\n  - staging.stg_orders\n  - staging.stg_web_sessions\n  - staging.stg_marketing_spend\ncolumns:\n  - name: kpi_date\n    type: date\n    checks:\n      - name: not_null\n      - name: unique\n@bruin *\u002F\n\nWITH daily_customers AS (\n    SELECT\n        DATE(o.order_date) AS order_date,\n        COUNTIF(DATE(c.first_seen_at) = DATE(o.order_date)) AS new_customers,\n        COUNTIF(DATE(c.first_seen_at) \u003C DATE(o.order_date)) AS returning_customers\n    FROM staging.stg_orders o\n    LEFT JOIN staging.stg_customers c\n        ON o.customer_email = c.customer_email\n    WHERE o.payment_status = 'paid'\n    GROUP BY DATE(o.order_date)\n),\ndaily_sessions AS (\n    SELECT\n        session_date,\n        sum(total_sessions) AS sessions,\n        sum(new_users) AS new_visitors,\n        sum(purchase_events) AS purchases\n    FROM staging.stg_web_sessions\n    GROUP BY session_date\n),\ndaily_spend AS (\n    SELECT\n        spend_date,\n        sum(spend) AS total_ad_spend\n    FROM staging.stg_marketing_spend\n    GROUP BY spend_date\n)\nSELECT\n    r.order_date AS kpi_date,\n    r.net_revenue,\n    r.total_orders,\n    r.paid_orders,\n    r.avg_order_value,\n    r.cancellation_rate,\n    dc.new_customers,\n    dc.returning_customers,\n    ds.sessions,\n    ds.new_visitors,\n    round(ds.purchases \u002F NULLIF(ds.sessions, 0) * 100, 2) AS conversion_rate,\n    sp.total_ad_spend,\n    round(r.net_revenue \u002F NULLIF(sp.total_ad_spend, 0), 2) AS overall_roas\nFROM reports.rpt_daily_revenue r\nLEFT JOIN daily_customers dc ON r.order_date = dc.order_date\nLEFT JOIN daily_sessions ds ON r.order_date = ds.session_date\nLEFT JOIN daily_spend sp ON r.order_date = sp.spend_date\nORDER BY kpi_date DESC\n",[24835],{"type":42,"tag":240,"props":24836,"children":24837},{"__ignoreMap":7},[24838,24845,24852,24859,24866,24873,24880,24887,24894,24901,24908,24915,24922,24929,24936,24943,24950,24957,24964,24971,24990,24997,25032,25100,25167,25190,25213,25248,25275,25306,25313,25328,25335,25342,25365,25384,25403,25422,25433,25440,25455,25462,25469,25488,25507,25518,25525,25532,25555,25574,25593,25612,25631,25650,25669,25688,25707,25726,25813,25832,25907,25930,25973,26016,26059],{"type":42,"tag":391,"props":24839,"children":24840},{"class":393,"line":176},[24841],{"type":42,"tag":391,"props":24842,"children":24843},{"style":6773},[24844],{"type":51,"value":6776},{"type":42,"tag":391,"props":24846,"children":24847},{"class":393,"line":99},[24848],{"type":42,"tag":391,"props":24849,"children":24850},{"style":6773},[24851],{"type":51,"value":23589},{"type":42,"tag":391,"props":24853,"children":24854},{"class":393,"line":439},[24855],{"type":42,"tag":391,"props":24856,"children":24857},{"style":6773},[24858],{"type":51,"value":6792},{"type":42,"tag":391,"props":24860,"children":24861},{"class":393,"line":947},[24862],{"type":42,"tag":391,"props":24863,"children":24864},{"style":6773},[24865],{"type":51,"value":6800},{"type":42,"tag":391,"props":24867,"children":24868},{"class":393,"line":960},[24869],{"type":42,"tag":391,"props":24870,"children":24871},{"style":6773},[24872],{"type":51,"value":6808},{"type":42,"tag":391,"props":24874,"children":24875},{"class":393,"line":984},[24876],{"type":42,"tag":391,"props":24877,"children":24878},{"style":6773},[24879],{"type":51,"value":6816},{"type":42,"tag":391,"props":24881,"children":24882},{"class":393,"line":1002},[24883],{"type":42,"tag":391,"props":24884,"children":24885},{"style":6773},[24886],{"type":51,"value":23625},{"type":42,"tag":391,"props":24888,"children":24889},{"class":393,"line":165},[24890],{"type":42,"tag":391,"props":24891,"children":24892},{"style":6773},[24893],{"type":51,"value":16549},{"type":42,"tag":391,"props":24895,"children":24896},{"class":393,"line":2235},[24897],{"type":42,"tag":391,"props":24898,"children":24899},{"style":6773},[24900],{"type":51,"value":14566},{"type":42,"tag":391,"props":24902,"children":24903},{"class":393,"line":6843},[24904],{"type":42,"tag":391,"props":24905,"children":24906},{"style":6773},[24907],{"type":51,"value":19660},{"type":42,"tag":391,"props":24909,"children":24910},{"class":393,"line":6852},[24911],{"type":42,"tag":391,"props":24912,"children":24913},{"style":6773},[24914],{"type":51,"value":19652},{"type":42,"tag":391,"props":24916,"children":24917},{"class":393,"line":6861},[24918],{"type":42,"tag":391,"props":24919,"children":24920},{"style":6773},[24921],{"type":51,"value":6840},{"type":42,"tag":391,"props":24923,"children":24924},{"class":393,"line":6870},[24925],{"type":42,"tag":391,"props":24926,"children":24927},{"style":6773},[24928],{"type":51,"value":23668},{"type":42,"tag":391,"props":24930,"children":24931},{"class":393,"line":6879},[24932],{"type":42,"tag":391,"props":24933,"children":24934},{"style":6773},[24935],{"type":51,"value":10874},{"type":42,"tag":391,"props":24937,"children":24938},{"class":393,"line":1707},[24939],{"type":42,"tag":391,"props":24940,"children":24941},{"style":6773},[24942],{"type":51,"value":6867},{"type":42,"tag":391,"props":24944,"children":24945},{"class":393,"line":6896},[24946],{"type":42,"tag":391,"props":24947,"children":24948},{"style":6773},[24949],{"type":51,"value":6876},{"type":42,"tag":391,"props":24951,"children":24952},{"class":393,"line":6905},[24953],{"type":42,"tag":391,"props":24954,"children":24955},{"style":6773},[24956],{"type":51,"value":6885},{"type":42,"tag":391,"props":24958,"children":24959},{"class":393,"line":6913},[24960],{"type":42,"tag":391,"props":24961,"children":24962},{"style":6773},[24963],{"type":51,"value":6963},{"type":42,"tag":391,"props":24965,"children":24966},{"class":393,"line":6921},[24967],{"type":42,"tag":391,"props":24968,"children":24969},{"emptyLinePlaceholder":13},[24970],{"type":51,"value":6972},{"type":42,"tag":391,"props":24972,"children":24973},{"class":393,"line":6930},[24974,24978,24982,24986],{"type":42,"tag":391,"props":24975,"children":24976},{"style":515},[24977],{"type":51,"value":16607},{"type":42,"tag":391,"props":24979,"children":24980},{"style":409},[24981],{"type":51,"value":23722},{"type":42,"tag":391,"props":24983,"children":24984},{"style":515},[24985],{"type":51,"value":7194},{"type":42,"tag":391,"props":24987,"children":24988},{"style":409},[24989],{"type":51,"value":16621},{"type":42,"tag":391,"props":24991,"children":24992},{"class":393,"line":6939},[24993],{"type":42,"tag":391,"props":24994,"children":24995},{"style":515},[24996],{"type":51,"value":16629},{"type":42,"tag":391,"props":24998,"children":24999},{"class":393,"line":6948},[25000,25004,25008,25012,25016,25020,25024,25028],{"type":42,"tag":391,"props":25001,"children":25002},{"style":515},[25003],{"type":51,"value":21392},{"type":42,"tag":391,"props":25005,"children":25006},{"style":409},[25007],{"type":51,"value":7143},{"type":42,"tag":391,"props":25009,"children":25010},{"style":415},[25011],{"type":51,"value":7148},{"type":42,"tag":391,"props":25013,"children":25014},{"style":409},[25015],{"type":51,"value":247},{"type":42,"tag":391,"props":25017,"children":25018},{"style":415},[25019],{"type":51,"value":16704},{"type":42,"tag":391,"props":25021,"children":25022},{"style":409},[25023],{"type":51,"value":7672},{"type":42,"tag":391,"props":25025,"children":25026},{"style":515},[25027],{"type":51,"value":7194},{"type":42,"tag":391,"props":25029,"children":25030},{"style":409},[25031],{"type":51,"value":7083},{"type":42,"tag":391,"props":25033,"children":25034},{"class":393,"line":6957},[25035,25040,25044,25048,25052,25056,25060,25064,25068,25072,25076,25080,25084,25088,25092,25096],{"type":42,"tag":391,"props":25036,"children":25037},{"style":409},[25038],{"type":51,"value":25039},"        COUNTIF(",{"type":42,"tag":391,"props":25041,"children":25042},{"style":515},[25043],{"type":51,"value":9468},{"type":42,"tag":391,"props":25045,"children":25046},{"style":409},[25047],{"type":51,"value":7143},{"type":42,"tag":391,"props":25049,"children":25050},{"style":415},[25051],{"type":51,"value":7686},{"type":42,"tag":391,"props":25053,"children":25054},{"style":409},[25055],{"type":51,"value":247},{"type":42,"tag":391,"props":25057,"children":25058},{"style":415},[25059],{"type":51,"value":16671},{"type":42,"tag":391,"props":25061,"children":25062},{"style":409},[25063],{"type":51,"value":7672},{"type":42,"tag":391,"props":25065,"children":25066},{"style":515},[25067],{"type":51,"value":7677},{"type":42,"tag":391,"props":25069,"children":25070},{"style":515},[25071],{"type":51,"value":8471},{"type":42,"tag":391,"props":25073,"children":25074},{"style":409},[25075],{"type":51,"value":7143},{"type":42,"tag":391,"props":25077,"children":25078},{"style":415},[25079],{"type":51,"value":7148},{"type":42,"tag":391,"props":25081,"children":25082},{"style":409},[25083],{"type":51,"value":247},{"type":42,"tag":391,"props":25085,"children":25086},{"style":415},[25087],{"type":51,"value":16704},{"type":42,"tag":391,"props":25089,"children":25090},{"style":409},[25091],{"type":51,"value":7189},{"type":42,"tag":391,"props":25093,"children":25094},{"style":515},[25095],{"type":51,"value":7194},{"type":42,"tag":391,"props":25097,"children":25098},{"style":409},[25099],{"type":51,"value":23826},{"type":42,"tag":391,"props":25101,"children":25102},{"class":393,"line":6966},[25103,25107,25111,25115,25119,25123,25127,25131,25135,25139,25143,25147,25151,25155,25159,25163],{"type":42,"tag":391,"props":25104,"children":25105},{"style":409},[25106],{"type":51,"value":25039},{"type":42,"tag":391,"props":25108,"children":25109},{"style":515},[25110],{"type":51,"value":9468},{"type":42,"tag":391,"props":25112,"children":25113},{"style":409},[25114],{"type":51,"value":7143},{"type":42,"tag":391,"props":25116,"children":25117},{"style":415},[25118],{"type":51,"value":7686},{"type":42,"tag":391,"props":25120,"children":25121},{"style":409},[25122],{"type":51,"value":247},{"type":42,"tag":391,"props":25124,"children":25125},{"style":415},[25126],{"type":51,"value":16671},{"type":42,"tag":391,"props":25128,"children":25129},{"style":409},[25130],{"type":51,"value":7672},{"type":42,"tag":391,"props":25132,"children":25133},{"style":515},[25134],{"type":51,"value":23854},{"type":42,"tag":391,"props":25136,"children":25137},{"style":515},[25138],{"type":51,"value":8471},{"type":42,"tag":391,"props":25140,"children":25141},{"style":409},[25142],{"type":51,"value":7143},{"type":42,"tag":391,"props":25144,"children":25145},{"style":415},[25146],{"type":51,"value":7148},{"type":42,"tag":391,"props":25148,"children":25149},{"style":409},[25150],{"type":51,"value":247},{"type":42,"tag":391,"props":25152,"children":25153},{"style":415},[25154],{"type":51,"value":16704},{"type":42,"tag":391,"props":25156,"children":25157},{"style":409},[25158],{"type":51,"value":7189},{"type":42,"tag":391,"props":25160,"children":25161},{"style":515},[25162],{"type":51,"value":7194},{"type":42,"tag":391,"props":25164,"children":25165},{"style":409},[25166],{"type":51,"value":23883},{"type":42,"tag":391,"props":25168,"children":25169},{"class":393,"line":6975},[25170,25174,25178,25182,25186],{"type":42,"tag":391,"props":25171,"children":25172},{"style":515},[25173],{"type":51,"value":16741},{"type":42,"tag":391,"props":25175,"children":25176},{"style":415},[25177],{"type":51,"value":15019},{"type":42,"tag":391,"props":25179,"children":25180},{"style":409},[25181],{"type":51,"value":247},{"type":42,"tag":391,"props":25183,"children":25184},{"style":415},[25185],{"type":51,"value":15641},{"type":42,"tag":391,"props":25187,"children":25188},{"style":409},[25189],{"type":51,"value":7574},{"type":42,"tag":391,"props":25191,"children":25192},{"class":393,"line":6984},[25193,25197,25201,25205,25209],{"type":42,"tag":391,"props":25194,"children":25195},{"style":515},[25196],{"type":51,"value":23914},{"type":42,"tag":391,"props":25198,"children":25199},{"style":415},[25200],{"type":51,"value":15019},{"type":42,"tag":391,"props":25202,"children":25203},{"style":409},[25204],{"type":51,"value":247},{"type":42,"tag":391,"props":25206,"children":25207},{"style":415},[25208],{"type":51,"value":16778},{"type":42,"tag":391,"props":25210,"children":25211},{"style":409},[25212],{"type":51,"value":7600},{"type":42,"tag":391,"props":25214,"children":25215},{"class":393,"line":7012},[25216,25220,25224,25228,25232,25236,25240,25244],{"type":42,"tag":391,"props":25217,"children":25218},{"style":515},[25219],{"type":51,"value":16790},{"type":42,"tag":391,"props":25221,"children":25222},{"style":415},[25223],{"type":51,"value":7614},{"type":42,"tag":391,"props":25225,"children":25226},{"style":409},[25227],{"type":51,"value":247},{"type":42,"tag":391,"props":25229,"children":25230},{"style":415},[25231],{"type":51,"value":16646},{"type":42,"tag":391,"props":25233,"children":25234},{"style":515},[25235],{"type":51,"value":7627},{"type":42,"tag":391,"props":25237,"children":25238},{"style":415},[25239],{"type":51,"value":7632},{"type":42,"tag":391,"props":25241,"children":25242},{"style":409},[25243],{"type":51,"value":247},{"type":42,"tag":391,"props":25245,"children":25246},{"style":415},[25247],{"type":51,"value":16819},{"type":42,"tag":391,"props":25249,"children":25250},{"class":393,"line":7034},[25251,25255,25259,25263,25267,25271],{"type":42,"tag":391,"props":25252,"children":25253},{"style":515},[25254],{"type":51,"value":16827},{"type":42,"tag":391,"props":25256,"children":25257},{"style":415},[25258],{"type":51,"value":7614},{"type":42,"tag":391,"props":25260,"children":25261},{"style":409},[25262],{"type":51,"value":247},{"type":42,"tag":391,"props":25264,"children":25265},{"style":415},[25266],{"type":51,"value":16840},{"type":42,"tag":391,"props":25268,"children":25269},{"style":515},[25270],{"type":51,"value":7627},{"type":42,"tag":391,"props":25272,"children":25273},{"style":403},[25274],{"type":51,"value":16849},{"type":42,"tag":391,"props":25276,"children":25277},{"class":393,"line":7060},[25278,25282,25286,25290,25294,25298,25302],{"type":42,"tag":391,"props":25279,"children":25280},{"style":515},[25281],{"type":51,"value":16939},{"type":42,"tag":391,"props":25283,"children":25284},{"style":515},[25285],{"type":51,"value":8471},{"type":42,"tag":391,"props":25287,"children":25288},{"style":409},[25289],{"type":51,"value":7143},{"type":42,"tag":391,"props":25291,"children":25292},{"style":415},[25293],{"type":51,"value":7148},{"type":42,"tag":391,"props":25295,"children":25296},{"style":409},[25297],{"type":51,"value":247},{"type":42,"tag":391,"props":25299,"children":25300},{"style":415},[25301],{"type":51,"value":16704},{"type":42,"tag":391,"props":25303,"children":25304},{"style":409},[25305],{"type":51,"value":7700},{"type":42,"tag":391,"props":25307,"children":25308},{"class":393,"line":7086},[25309],{"type":42,"tag":391,"props":25310,"children":25311},{"style":409},[25312],{"type":51,"value":16857},{"type":42,"tag":391,"props":25314,"children":25315},{"class":393,"line":7111},[25316,25320,25324],{"type":42,"tag":391,"props":25317,"children":25318},{"style":409},[25319],{"type":51,"value":24034},{"type":42,"tag":391,"props":25321,"children":25322},{"style":515},[25323],{"type":51,"value":7194},{"type":42,"tag":391,"props":25325,"children":25326},{"style":409},[25327],{"type":51,"value":16621},{"type":42,"tag":391,"props":25329,"children":25330},{"class":393,"line":7132},[25331],{"type":42,"tag":391,"props":25332,"children":25333},{"style":515},[25334],{"type":51,"value":16629},{"type":42,"tag":391,"props":25336,"children":25337},{"class":393,"line":7202},[25338],{"type":42,"tag":391,"props":25339,"children":25340},{"style":409},[25341],{"type":51,"value":19915},{"type":42,"tag":391,"props":25343,"children":25344},{"class":393,"line":7264},[25345,25349,25353,25357,25361],{"type":42,"tag":391,"props":25346,"children":25347},{"style":415},[25348],{"type":51,"value":19768},{"type":42,"tag":391,"props":25350,"children":25351},{"style":409},[25352],{"type":51,"value":19934},{"type":42,"tag":391,"props":25354,"children":25355},{"style":515},[25356],{"type":51,"value":7194},{"type":42,"tag":391,"props":25358,"children":25359},{"style":515},[25360],{"type":51,"value":19943},{"type":42,"tag":391,"props":25362,"children":25363},{"style":409},[25364],{"type":51,"value":7031},{"type":42,"tag":391,"props":25366,"children":25367},{"class":393,"line":7326},[25368,25372,25376,25380],{"type":42,"tag":391,"props":25369,"children":25370},{"style":415},[25371],{"type":51,"value":19768},{"type":42,"tag":391,"props":25373,"children":25374},{"style":409},[25375],{"type":51,"value":19959},{"type":42,"tag":391,"props":25377,"children":25378},{"style":515},[25379],{"type":51,"value":7194},{"type":42,"tag":391,"props":25381,"children":25382},{"style":409},[25383],{"type":51,"value":24099},{"type":42,"tag":391,"props":25385,"children":25386},{"class":393,"line":7388},[25387,25391,25395,25399],{"type":42,"tag":391,"props":25388,"children":25389},{"style":415},[25390],{"type":51,"value":19768},{"type":42,"tag":391,"props":25392,"children":25393},{"style":409},[25394],{"type":51,"value":19979},{"type":42,"tag":391,"props":25396,"children":25397},{"style":515},[25398],{"type":51,"value":7194},{"type":42,"tag":391,"props":25400,"children":25401},{"style":409},[25402],{"type":51,"value":19988},{"type":42,"tag":391,"props":25404,"children":25405},{"class":393,"line":7409},[25406,25410,25414,25418],{"type":42,"tag":391,"props":25407,"children":25408},{"style":515},[25409],{"type":51,"value":16741},{"type":42,"tag":391,"props":25411,"children":25412},{"style":415},[25413],{"type":51,"value":15019},{"type":42,"tag":391,"props":25415,"children":25416},{"style":409},[25417],{"type":51,"value":247},{"type":42,"tag":391,"props":25419,"children":25420},{"style":415},[25421],{"type":51,"value":20008},{"type":42,"tag":391,"props":25423,"children":25424},{"class":393,"line":7430},[25425,25429],{"type":42,"tag":391,"props":25426,"children":25427},{"style":515},[25428],{"type":51,"value":16939},{"type":42,"tag":391,"props":25430,"children":25431},{"style":409},[25432],{"type":51,"value":24149},{"type":42,"tag":391,"props":25434,"children":25435},{"class":393,"line":7451},[25436],{"type":42,"tag":391,"props":25437,"children":25438},{"style":409},[25439],{"type":51,"value":16857},{"type":42,"tag":391,"props":25441,"children":25442},{"class":393,"line":7497},[25443,25447,25451],{"type":42,"tag":391,"props":25444,"children":25445},{"style":409},[25446],{"type":51,"value":24164},{"type":42,"tag":391,"props":25448,"children":25449},{"style":515},[25450],{"type":51,"value":7194},{"type":42,"tag":391,"props":25452,"children":25453},{"style":409},[25454],{"type":51,"value":16621},{"type":42,"tag":391,"props":25456,"children":25457},{"class":393,"line":7523},[25458],{"type":42,"tag":391,"props":25459,"children":25460},{"style":515},[25461],{"type":51,"value":16629},{"type":42,"tag":391,"props":25463,"children":25464},{"class":393,"line":7549},[25465],{"type":42,"tag":391,"props":25466,"children":25467},{"style":409},[25468],{"type":51,"value":19752},{"type":42,"tag":391,"props":25470,"children":25471},{"class":393,"line":7577},[25472,25476,25480,25484],{"type":42,"tag":391,"props":25473,"children":25474},{"style":415},[25475],{"type":51,"value":19768},{"type":42,"tag":391,"props":25477,"children":25478},{"style":409},[25479],{"type":51,"value":19773},{"type":42,"tag":391,"props":25481,"children":25482},{"style":515},[25483],{"type":51,"value":7194},{"type":42,"tag":391,"props":25485,"children":25486},{"style":409},[25487],{"type":51,"value":24206},{"type":42,"tag":391,"props":25489,"children":25490},{"class":393,"line":7603},[25491,25495,25499,25503],{"type":42,"tag":391,"props":25492,"children":25493},{"style":515},[25494],{"type":51,"value":16741},{"type":42,"tag":391,"props":25496,"children":25497},{"style":415},[25498],{"type":51,"value":15019},{"type":42,"tag":391,"props":25500,"children":25501},{"style":409},[25502],{"type":51,"value":247},{"type":42,"tag":391,"props":25504,"children":25505},{"style":415},[25506],{"type":51,"value":19865},{"type":42,"tag":391,"props":25508,"children":25509},{"class":393,"line":7644},[25510,25514],{"type":42,"tag":391,"props":25511,"children":25512},{"style":515},[25513],{"type":51,"value":16939},{"type":42,"tag":391,"props":25515,"children":25516},{"style":409},[25517],{"type":51,"value":24237},{"type":42,"tag":391,"props":25519,"children":25520},{"class":393,"line":8522},[25521],{"type":42,"tag":391,"props":25522,"children":25523},{"style":409},[25524],{"type":51,"value":7700},{"type":42,"tag":391,"props":25526,"children":25527},{"class":393,"line":8581},[25528],{"type":42,"tag":391,"props":25529,"children":25530},{"style":515},[25531],{"type":51,"value":6981},{"type":42,"tag":391,"props":25533,"children":25534},{"class":393,"line":20272},[25535,25539,25543,25547,25551],{"type":42,"tag":391,"props":25536,"children":25537},{"style":415},[25538],{"type":51,"value":24259},{"type":42,"tag":391,"props":25540,"children":25541},{"style":409},[25542],{"type":51,"value":247},{"type":42,"tag":391,"props":25544,"children":25545},{"style":415},[25546],{"type":51,"value":16704},{"type":42,"tag":391,"props":25548,"children":25549},{"style":515},[25550],{"type":51,"value":7004},{"type":42,"tag":391,"props":25552,"children":25553},{"style":409},[25554],{"type":51,"value":24276},{"type":42,"tag":391,"props":25556,"children":25557},{"class":393,"line":20280},[25558,25562,25566,25570],{"type":42,"tag":391,"props":25559,"children":25560},{"style":415},[25561],{"type":51,"value":24259},{"type":42,"tag":391,"props":25563,"children":25564},{"style":409},[25565],{"type":51,"value":247},{"type":42,"tag":391,"props":25567,"children":25568},{"style":415},[25569],{"type":51,"value":24292},{"type":42,"tag":391,"props":25571,"children":25572},{"style":409},[25573],{"type":51,"value":7031},{"type":42,"tag":391,"props":25575,"children":25576},{"class":393,"line":20288},[25577,25581,25585,25589],{"type":42,"tag":391,"props":25578,"children":25579},{"style":415},[25580],{"type":51,"value":24259},{"type":42,"tag":391,"props":25582,"children":25583},{"style":409},[25584],{"type":51,"value":247},{"type":42,"tag":391,"props":25586,"children":25587},{"style":415},[25588],{"type":51,"value":24312},{"type":42,"tag":391,"props":25590,"children":25591},{"style":409},[25592],{"type":51,"value":7031},{"type":42,"tag":391,"props":25594,"children":25595},{"class":393,"line":20314},[25596,25600,25604,25608],{"type":42,"tag":391,"props":25597,"children":25598},{"style":415},[25599],{"type":51,"value":24259},{"type":42,"tag":391,"props":25601,"children":25602},{"style":409},[25603],{"type":51,"value":247},{"type":42,"tag":391,"props":25605,"children":25606},{"style":415},[25607],{"type":51,"value":24332},{"type":42,"tag":391,"props":25609,"children":25610},{"style":409},[25611],{"type":51,"value":7031},{"type":42,"tag":391,"props":25613,"children":25614},{"class":393,"line":20334},[25615,25619,25623,25627],{"type":42,"tag":391,"props":25616,"children":25617},{"style":415},[25618],{"type":51,"value":24259},{"type":42,"tag":391,"props":25620,"children":25621},{"style":409},[25622],{"type":51,"value":247},{"type":42,"tag":391,"props":25624,"children":25625},{"style":415},[25626],{"type":51,"value":24352},{"type":42,"tag":391,"props":25628,"children":25629},{"style":409},[25630],{"type":51,"value":7031},{"type":42,"tag":391,"props":25632,"children":25633},{"class":393,"line":20355},[25634,25638,25642,25646],{"type":42,"tag":391,"props":25635,"children":25636},{"style":415},[25637],{"type":51,"value":24259},{"type":42,"tag":391,"props":25639,"children":25640},{"style":409},[25641],{"type":51,"value":247},{"type":42,"tag":391,"props":25643,"children":25644},{"style":415},[25645],{"type":51,"value":24372},{"type":42,"tag":391,"props":25647,"children":25648},{"style":409},[25649],{"type":51,"value":7031},{"type":42,"tag":391,"props":25651,"children":25652},{"class":393,"line":20376},[25653,25657,25661,25665],{"type":42,"tag":391,"props":25654,"children":25655},{"style":415},[25656],{"type":51,"value":24384},{"type":42,"tag":391,"props":25658,"children":25659},{"style":409},[25660],{"type":51,"value":247},{"type":42,"tag":391,"props":25662,"children":25663},{"style":415},[25664],{"type":51,"value":24393},{"type":42,"tag":391,"props":25666,"children":25667},{"style":409},[25668],{"type":51,"value":7031},{"type":42,"tag":391,"props":25670,"children":25671},{"class":393,"line":20397},[25672,25676,25680,25684],{"type":42,"tag":391,"props":25673,"children":25674},{"style":415},[25675],{"type":51,"value":24384},{"type":42,"tag":391,"props":25677,"children":25678},{"style":409},[25679],{"type":51,"value":247},{"type":42,"tag":391,"props":25681,"children":25682},{"style":415},[25683],{"type":51,"value":24413},{"type":42,"tag":391,"props":25685,"children":25686},{"style":409},[25687],{"type":51,"value":7031},{"type":42,"tag":391,"props":25689,"children":25690},{"class":393,"line":20418},[25691,25695,25699,25703],{"type":42,"tag":391,"props":25692,"children":25693},{"style":415},[25694],{"type":51,"value":24425},{"type":42,"tag":391,"props":25696,"children":25697},{"style":409},[25698],{"type":51,"value":247},{"type":42,"tag":391,"props":25700,"children":25701},{"style":415},[25702],{"type":51,"value":12616},{"type":42,"tag":391,"props":25704,"children":25705},{"style":409},[25706],{"type":51,"value":7031},{"type":42,"tag":391,"props":25708,"children":25709},{"class":393,"line":20439},[25710,25714,25718,25722],{"type":42,"tag":391,"props":25711,"children":25712},{"style":415},[25713],{"type":51,"value":24425},{"type":42,"tag":391,"props":25715,"children":25716},{"style":409},[25717],{"type":51,"value":247},{"type":42,"tag":391,"props":25719,"children":25720},{"style":415},[25721],{"type":51,"value":24453},{"type":42,"tag":391,"props":25723,"children":25724},{"style":409},[25725],{"type":51,"value":7031},{"type":42,"tag":391,"props":25727,"children":25728},{"class":393,"line":20459},[25729,25733,25737,25741,25745,25749,25753,25757,25761,25765,25769,25773,25777,25781,25785,25789,25793,25797,25801,25805,25809],{"type":42,"tag":391,"props":25730,"children":25731},{"style":415},[25732],{"type":51,"value":14899},{"type":42,"tag":391,"props":25734,"children":25735},{"style":409},[25736],{"type":51,"value":7143},{"type":42,"tag":391,"props":25738,"children":25739},{"style":415},[25740],{"type":51,"value":24473},{"type":42,"tag":391,"props":25742,"children":25743},{"style":409},[25744],{"type":51,"value":247},{"type":42,"tag":391,"props":25746,"children":25747},{"style":415},[25748],{"type":51,"value":24482},{"type":42,"tag":391,"props":25750,"children":25751},{"style":515},[25752],{"type":51,"value":7471},{"type":42,"tag":391,"props":25754,"children":25755},{"style":415},[25756],{"type":51,"value":15495},{"type":42,"tag":391,"props":25758,"children":25759},{"style":409},[25760],{"type":51,"value":7143},{"type":42,"tag":391,"props":25762,"children":25763},{"style":415},[25764],{"type":51,"value":24473},{"type":42,"tag":391,"props":25766,"children":25767},{"style":409},[25768],{"type":51,"value":247},{"type":42,"tag":391,"props":25770,"children":25771},{"style":415},[25772],{"type":51,"value":12616},{"type":42,"tag":391,"props":25774,"children":25775},{"style":409},[25776],{"type":51,"value":292},{"type":42,"tag":391,"props":25778,"children":25779},{"style":415},[25780],{"type":51,"value":7485},{"type":42,"tag":391,"props":25782,"children":25783},{"style":409},[25784],{"type":51,"value":7672},{"type":42,"tag":391,"props":25786,"children":25787},{"style":515},[25788],{"type":51,"value":13108},{"type":42,"tag":391,"props":25790,"children":25791},{"style":415},[25792],{"type":51,"value":7476},{"type":42,"tag":391,"props":25794,"children":25795},{"style":409},[25796],{"type":51,"value":292},{"type":42,"tag":391,"props":25798,"children":25799},{"style":415},[25800],{"type":51,"value":7184},{"type":42,"tag":391,"props":25802,"children":25803},{"style":409},[25804],{"type":51,"value":7672},{"type":42,"tag":391,"props":25806,"children":25807},{"style":515},[25808],{"type":51,"value":7194},{"type":42,"tag":391,"props":25810,"children":25811},{"style":409},[25812],{"type":51,"value":24547},{"type":42,"tag":391,"props":25814,"children":25815},{"class":393,"line":20481},[25816,25820,25824,25828],{"type":42,"tag":391,"props":25817,"children":25818},{"style":415},[25819],{"type":51,"value":24555},{"type":42,"tag":391,"props":25821,"children":25822},{"style":409},[25823],{"type":51,"value":247},{"type":42,"tag":391,"props":25825,"children":25826},{"style":415},[25827],{"type":51,"value":24564},{"type":42,"tag":391,"props":25829,"children":25830},{"style":409},[25831],{"type":51,"value":7031},{"type":42,"tag":391,"props":25833,"children":25834},{"class":393,"line":20559},[25835,25839,25843,25847,25851,25855,25859,25863,25867,25871,25875,25879,25883,25887,25891,25895,25899,25903],{"type":42,"tag":391,"props":25836,"children":25837},{"style":415},[25838],{"type":51,"value":14899},{"type":42,"tag":391,"props":25840,"children":25841},{"style":409},[25842],{"type":51,"value":7143},{"type":42,"tag":391,"props":25844,"children":25845},{"style":415},[25846],{"type":51,"value":24584},{"type":42,"tag":391,"props":25848,"children":25849},{"style":409},[25850],{"type":51,"value":247},{"type":42,"tag":391,"props":25852,"children":25853},{"style":415},[25854],{"type":51,"value":24292},{"type":42,"tag":391,"props":25856,"children":25857},{"style":515},[25858],{"type":51,"value":7471},{"type":42,"tag":391,"props":25860,"children":25861},{"style":415},[25862],{"type":51,"value":15495},{"type":42,"tag":391,"props":25864,"children":25865},{"style":409},[25866],{"type":51,"value":7143},{"type":42,"tag":391,"props":25868,"children":25869},{"style":415},[25870],{"type":51,"value":24609},{"type":42,"tag":391,"props":25872,"children":25873},{"style":409},[25874],{"type":51,"value":247},{"type":42,"tag":391,"props":25876,"children":25877},{"style":415},[25878],{"type":51,"value":24564},{"type":42,"tag":391,"props":25880,"children":25881},{"style":409},[25882],{"type":51,"value":292},{"type":42,"tag":391,"props":25884,"children":25885},{"style":415},[25886],{"type":51,"value":7485},{"type":42,"tag":391,"props":25888,"children":25889},{"style":409},[25890],{"type":51,"value":14928},{"type":42,"tag":391,"props":25892,"children":25893},{"style":415},[25894],{"type":51,"value":7184},{"type":42,"tag":391,"props":25896,"children":25897},{"style":409},[25898],{"type":51,"value":7672},{"type":42,"tag":391,"props":25900,"children":25901},{"style":515},[25902],{"type":51,"value":7194},{"type":42,"tag":391,"props":25904,"children":25905},{"style":409},[25906],{"type":51,"value":24646},{"type":42,"tag":391,"props":25908,"children":25909},{"class":393,"line":20636},[25910,25914,25918,25922,25926],{"type":42,"tag":391,"props":25911,"children":25912},{"style":515},[25913],{"type":51,"value":7555},{"type":42,"tag":391,"props":25915,"children":25916},{"style":415},[25917],{"type":51,"value":24658},{"type":42,"tag":391,"props":25919,"children":25920},{"style":409},[25921],{"type":51,"value":247},{"type":42,"tag":391,"props":25923,"children":25924},{"style":415},[25925],{"type":51,"value":24667},{"type":42,"tag":391,"props":25927,"children":25928},{"style":409},[25929],{"type":51,"value":24672},{"type":42,"tag":391,"props":25931,"children":25932},{"class":393,"line":20725},[25933,25937,25941,25945,25949,25953,25957,25961,25965,25969],{"type":42,"tag":391,"props":25934,"children":25935},{"style":515},[25936],{"type":51,"value":6663},{"type":42,"tag":391,"props":25938,"children":25939},{"style":409},[25940],{"type":51,"value":24684},{"type":42,"tag":391,"props":25942,"children":25943},{"style":515},[25944],{"type":51,"value":24689},{"type":42,"tag":391,"props":25946,"children":25947},{"style":415},[25948],{"type":51,"value":24694},{"type":42,"tag":391,"props":25950,"children":25951},{"style":409},[25952],{"type":51,"value":247},{"type":42,"tag":391,"props":25954,"children":25955},{"style":415},[25956],{"type":51,"value":16704},{"type":42,"tag":391,"props":25958,"children":25959},{"style":515},[25960],{"type":51,"value":7627},{"type":42,"tag":391,"props":25962,"children":25963},{"style":415},[25964],{"type":51,"value":24711},{"type":42,"tag":391,"props":25966,"children":25967},{"style":409},[25968],{"type":51,"value":247},{"type":42,"tag":391,"props":25970,"children":25971},{"style":415},[25972],{"type":51,"value":20872},{"type":42,"tag":391,"props":25974,"children":25975},{"class":393,"line":20738},[25976,25980,25984,25988,25992,25996,26000,26004,26008,26012],{"type":42,"tag":391,"props":25977,"children":25978},{"style":515},[25979],{"type":51,"value":6663},{"type":42,"tag":391,"props":25981,"children":25982},{"style":409},[25983],{"type":51,"value":24731},{"type":42,"tag":391,"props":25985,"children":25986},{"style":515},[25987],{"type":51,"value":24689},{"type":42,"tag":391,"props":25989,"children":25990},{"style":415},[25991],{"type":51,"value":24694},{"type":42,"tag":391,"props":25993,"children":25994},{"style":409},[25995],{"type":51,"value":247},{"type":42,"tag":391,"props":25997,"children":25998},{"style":415},[25999],{"type":51,"value":16704},{"type":42,"tag":391,"props":26001,"children":26002},{"style":515},[26003],{"type":51,"value":7627},{"type":42,"tag":391,"props":26005,"children":26006},{"style":415},[26007],{"type":51,"value":24756},{"type":42,"tag":391,"props":26009,"children":26010},{"style":409},[26011],{"type":51,"value":247},{"type":42,"tag":391,"props":26013,"children":26014},{"style":415},[26015],{"type":51,"value":20216},{"type":42,"tag":391,"props":26017,"children":26018},{"class":393,"line":20751},[26019,26023,26027,26031,26035,26039,26043,26047,26051,26055],{"type":42,"tag":391,"props":26020,"children":26021},{"style":515},[26022],{"type":51,"value":6663},{"type":42,"tag":391,"props":26024,"children":26025},{"style":409},[26026],{"type":51,"value":24776},{"type":42,"tag":391,"props":26028,"children":26029},{"style":515},[26030],{"type":51,"value":24689},{"type":42,"tag":391,"props":26032,"children":26033},{"style":415},[26034],{"type":51,"value":24694},{"type":42,"tag":391,"props":26036,"children":26037},{"style":409},[26038],{"type":51,"value":247},{"type":42,"tag":391,"props":26040,"children":26041},{"style":415},[26042],{"type":51,"value":16704},{"type":42,"tag":391,"props":26044,"children":26045},{"style":515},[26046],{"type":51,"value":7627},{"type":42,"tag":391,"props":26048,"children":26049},{"style":415},[26050],{"type":51,"value":24801},{"type":42,"tag":391,"props":26052,"children":26053},{"style":409},[26054],{"type":51,"value":247},{"type":42,"tag":391,"props":26056,"children":26057},{"style":415},[26058],{"type":51,"value":24810},{"type":42,"tag":391,"props":26060,"children":26061},{"class":393,"line":20788},[26062,26066,26070],{"type":42,"tag":391,"props":26063,"children":26064},{"style":515},[26065],{"type":51,"value":15048},{"type":42,"tag":391,"props":26067,"children":26068},{"style":409},[26069],{"type":51,"value":24822},{"type":42,"tag":391,"props":26071,"children":26072},{"style":515},[26073],{"type":51,"value":24827},{"type":42,"tag":569,"props":26075,"children":26076},{"v-slot:snowflake":7},[26077],{"type":42,"tag":381,"props":26078,"children":26080},{"className":6761,"code":26079,"language":6763,"meta":7,"style":7},"\u002F* @bruin\nname: reports.rpt_daily_kpis\ntype: sql\nmaterialization:\n  type: table\ndepends:\n  - reports.rpt_daily_revenue\n  - staging.stg_customers\n  - staging.stg_orders\n  - staging.stg_web_sessions\n  - staging.stg_marketing_spend\ncolumns:\n  - name: kpi_date\n    type: date\n    checks:\n      - name: not_null\n      - name: unique\n@bruin *\u002F\n\nWITH daily_customers AS (\n    SELECT\n        o.order_date::DATE AS order_date,\n        COUNT(CASE WHEN c.first_seen_at::DATE = o.order_date::DATE THEN 1 END) AS new_customers,\n        COUNT(CASE WHEN c.first_seen_at::DATE \u003C o.order_date::DATE THEN 1 END) AS returning_customers\n    FROM staging.stg_orders o\n    LEFT JOIN staging.stg_customers c\n        ON o.customer_email = c.customer_email\n    WHERE o.payment_status = 'paid'\n    GROUP BY o.order_date::DATE\n),\ndaily_sessions AS (\n    SELECT\n        session_date,\n        sum(total_sessions) AS sessions,\n        sum(new_users) AS new_visitors,\n        sum(purchase_events) AS purchases\n    FROM staging.stg_web_sessions\n    GROUP BY session_date\n),\ndaily_spend AS (\n    SELECT\n        spend_date,\n        sum(spend) AS total_ad_spend\n    FROM staging.stg_marketing_spend\n    GROUP BY spend_date\n)\nSELECT\n    r.order_date AS kpi_date,\n    r.net_revenue,\n    r.total_orders,\n    r.paid_orders,\n    r.avg_order_value,\n    r.cancellation_rate,\n    dc.new_customers,\n    dc.returning_customers,\n    ds.sessions,\n    ds.new_visitors,\n    round(ds.purchases \u002F NULLIF(ds.sessions, 0) * 100, 2) AS conversion_rate,\n    sp.total_ad_spend,\n    round(r.net_revenue \u002F NULLIF(sp.total_ad_spend, 0), 2) AS overall_roas\nFROM reports.rpt_daily_revenue r\nLEFT JOIN daily_customers dc ON r.order_date = dc.order_date\nLEFT JOIN daily_sessions ds ON r.order_date = ds.session_date\nLEFT JOIN daily_spend sp ON r.order_date = sp.spend_date\nORDER BY kpi_date DESC\n",[26081],{"type":42,"tag":240,"props":26082,"children":26083},{"__ignoreMap":7},[26084,26091,26098,26105,26112,26119,26126,26133,26140,26147,26154,26161,26168,26175,26182,26189,26196,26203,26210,26217,26236,26243,26274,26362,26450,26473,26496,26531,26558,26585,26592,26607,26614,26621,26644,26663,26682,26701,26712,26719,26734,26741,26748,26767,26786,26797,26804,26811,26834,26853,26872,26891,26910,26929,26948,26967,26986,27005,27092,27111,27186,27209,27252,27295,27338],{"type":42,"tag":391,"props":26085,"children":26086},{"class":393,"line":176},[26087],{"type":42,"tag":391,"props":26088,"children":26089},{"style":6773},[26090],{"type":51,"value":6776},{"type":42,"tag":391,"props":26092,"children":26093},{"class":393,"line":99},[26094],{"type":42,"tag":391,"props":26095,"children":26096},{"style":6773},[26097],{"type":51,"value":23589},{"type":42,"tag":391,"props":26099,"children":26100},{"class":393,"line":439},[26101],{"type":42,"tag":391,"props":26102,"children":26103},{"style":6773},[26104],{"type":51,"value":6792},{"type":42,"tag":391,"props":26106,"children":26107},{"class":393,"line":947},[26108],{"type":42,"tag":391,"props":26109,"children":26110},{"style":6773},[26111],{"type":51,"value":6800},{"type":42,"tag":391,"props":26113,"children":26114},{"class":393,"line":960},[26115],{"type":42,"tag":391,"props":26116,"children":26117},{"style":6773},[26118],{"type":51,"value":6808},{"type":42,"tag":391,"props":26120,"children":26121},{"class":393,"line":984},[26122],{"type":42,"tag":391,"props":26123,"children":26124},{"style":6773},[26125],{"type":51,"value":6816},{"type":42,"tag":391,"props":26127,"children":26128},{"class":393,"line":1002},[26129],{"type":42,"tag":391,"props":26130,"children":26131},{"style":6773},[26132],{"type":51,"value":23625},{"type":42,"tag":391,"props":26134,"children":26135},{"class":393,"line":165},[26136],{"type":42,"tag":391,"props":26137,"children":26138},{"style":6773},[26139],{"type":51,"value":16549},{"type":42,"tag":391,"props":26141,"children":26142},{"class":393,"line":2235},[26143],{"type":42,"tag":391,"props":26144,"children":26145},{"style":6773},[26146],{"type":51,"value":14566},{"type":42,"tag":391,"props":26148,"children":26149},{"class":393,"line":6843},[26150],{"type":42,"tag":391,"props":26151,"children":26152},{"style":6773},[26153],{"type":51,"value":19660},{"type":42,"tag":391,"props":26155,"children":26156},{"class":393,"line":6852},[26157],{"type":42,"tag":391,"props":26158,"children":26159},{"style":6773},[26160],{"type":51,"value":19652},{"type":42,"tag":391,"props":26162,"children":26163},{"class":393,"line":6861},[26164],{"type":42,"tag":391,"props":26165,"children":26166},{"style":6773},[26167],{"type":51,"value":6840},{"type":42,"tag":391,"props":26169,"children":26170},{"class":393,"line":6870},[26171],{"type":42,"tag":391,"props":26172,"children":26173},{"style":6773},[26174],{"type":51,"value":23668},{"type":42,"tag":391,"props":26176,"children":26177},{"class":393,"line":6879},[26178],{"type":42,"tag":391,"props":26179,"children":26180},{"style":6773},[26181],{"type":51,"value":10874},{"type":42,"tag":391,"props":26183,"children":26184},{"class":393,"line":1707},[26185],{"type":42,"tag":391,"props":26186,"children":26187},{"style":6773},[26188],{"type":51,"value":6867},{"type":42,"tag":391,"props":26190,"children":26191},{"class":393,"line":6896},[26192],{"type":42,"tag":391,"props":26193,"children":26194},{"style":6773},[26195],{"type":51,"value":6876},{"type":42,"tag":391,"props":26197,"children":26198},{"class":393,"line":6905},[26199],{"type":42,"tag":391,"props":26200,"children":26201},{"style":6773},[26202],{"type":51,"value":6885},{"type":42,"tag":391,"props":26204,"children":26205},{"class":393,"line":6913},[26206],{"type":42,"tag":391,"props":26207,"children":26208},{"style":6773},[26209],{"type":51,"value":6963},{"type":42,"tag":391,"props":26211,"children":26212},{"class":393,"line":6921},[26213],{"type":42,"tag":391,"props":26214,"children":26215},{"emptyLinePlaceholder":13},[26216],{"type":51,"value":6972},{"type":42,"tag":391,"props":26218,"children":26219},{"class":393,"line":6930},[26220,26224,26228,26232],{"type":42,"tag":391,"props":26221,"children":26222},{"style":515},[26223],{"type":51,"value":16607},{"type":42,"tag":391,"props":26225,"children":26226},{"style":409},[26227],{"type":51,"value":23722},{"type":42,"tag":391,"props":26229,"children":26230},{"style":515},[26231],{"type":51,"value":7194},{"type":42,"tag":391,"props":26233,"children":26234},{"style":409},[26235],{"type":51,"value":16621},{"type":42,"tag":391,"props":26237,"children":26238},{"class":393,"line":6939},[26239],{"type":42,"tag":391,"props":26240,"children":26241},{"style":515},[26242],{"type":51,"value":16629},{"type":42,"tag":391,"props":26244,"children":26245},{"class":393,"line":6948},[26246,26250,26254,26258,26262,26266,26270],{"type":42,"tag":391,"props":26247,"children":26248},{"style":415},[26249],{"type":51,"value":16637},{"type":42,"tag":391,"props":26251,"children":26252},{"style":409},[26253],{"type":51,"value":247},{"type":42,"tag":391,"props":26255,"children":26256},{"style":415},[26257],{"type":51,"value":16704},{"type":42,"tag":391,"props":26259,"children":26260},{"style":409},[26261],{"type":51,"value":9463},{"type":42,"tag":391,"props":26263,"children":26264},{"style":515},[26265],{"type":51,"value":9468},{"type":42,"tag":391,"props":26267,"children":26268},{"style":515},[26269],{"type":51,"value":7004},{"type":42,"tag":391,"props":26271,"children":26272},{"style":409},[26273],{"type":51,"value":7083},{"type":42,"tag":391,"props":26275,"children":26276},{"class":393,"line":6957},[26277,26282,26286,26290,26294,26298,26302,26306,26310,26314,26318,26322,26326,26330,26334,26338,26342,26346,26350,26354,26358],{"type":42,"tag":391,"props":26278,"children":26279},{"style":415},[26280],{"type":51,"value":26281},"        COUNT",{"type":42,"tag":391,"props":26283,"children":26284},{"style":409},[26285],{"type":51,"value":7143},{"type":42,"tag":391,"props":26287,"children":26288},{"style":515},[26289],{"type":51,"value":12546},{"type":42,"tag":391,"props":26291,"children":26292},{"style":515},[26293],{"type":51,"value":13140},{"type":42,"tag":391,"props":26295,"children":26296},{"style":415},[26297],{"type":51,"value":7632},{"type":42,"tag":391,"props":26299,"children":26300},{"style":409},[26301],{"type":51,"value":247},{"type":42,"tag":391,"props":26303,"children":26304},{"style":415},[26305],{"type":51,"value":16671},{"type":42,"tag":391,"props":26307,"children":26308},{"style":409},[26309],{"type":51,"value":9463},{"type":42,"tag":391,"props":26311,"children":26312},{"style":515},[26313],{"type":51,"value":9468},{"type":42,"tag":391,"props":26315,"children":26316},{"style":515},[26317],{"type":51,"value":7627},{"type":42,"tag":391,"props":26319,"children":26320},{"style":415},[26321],{"type":51,"value":7614},{"type":42,"tag":391,"props":26323,"children":26324},{"style":409},[26325],{"type":51,"value":247},{"type":42,"tag":391,"props":26327,"children":26328},{"style":415},[26329],{"type":51,"value":16704},{"type":42,"tag":391,"props":26331,"children":26332},{"style":409},[26333],{"type":51,"value":9463},{"type":42,"tag":391,"props":26335,"children":26336},{"style":515},[26337],{"type":51,"value":9468},{"type":42,"tag":391,"props":26339,"children":26340},{"style":515},[26341],{"type":51,"value":12735},{"type":42,"tag":391,"props":26343,"children":26344},{"style":415},[26345],{"type":51,"value":13172},{"type":42,"tag":391,"props":26347,"children":26348},{"style":515},[26349],{"type":51,"value":13177},{"type":42,"tag":391,"props":26351,"children":26352},{"style":409},[26353],{"type":51,"value":7672},{"type":42,"tag":391,"props":26355,"children":26356},{"style":515},[26357],{"type":51,"value":7194},{"type":42,"tag":391,"props":26359,"children":26360},{"style":409},[26361],{"type":51,"value":23826},{"type":42,"tag":391,"props":26363,"children":26364},{"class":393,"line":6966},[26365,26369,26373,26377,26381,26385,26389,26393,26397,26401,26406,26410,26414,26418,26422,26426,26430,26434,26438,26442,26446],{"type":42,"tag":391,"props":26366,"children":26367},{"style":415},[26368],{"type":51,"value":26281},{"type":42,"tag":391,"props":26370,"children":26371},{"style":409},[26372],{"type":51,"value":7143},{"type":42,"tag":391,"props":26374,"children":26375},{"style":515},[26376],{"type":51,"value":12546},{"type":42,"tag":391,"props":26378,"children":26379},{"style":515},[26380],{"type":51,"value":13140},{"type":42,"tag":391,"props":26382,"children":26383},{"style":415},[26384],{"type":51,"value":7632},{"type":42,"tag":391,"props":26386,"children":26387},{"style":409},[26388],{"type":51,"value":247},{"type":42,"tag":391,"props":26390,"children":26391},{"style":415},[26392],{"type":51,"value":16671},{"type":42,"tag":391,"props":26394,"children":26395},{"style":409},[26396],{"type":51,"value":9463},{"type":42,"tag":391,"props":26398,"children":26399},{"style":515},[26400],{"type":51,"value":9468},{"type":42,"tag":391,"props":26402,"children":26403},{"style":515},[26404],{"type":51,"value":26405}," \u003C",{"type":42,"tag":391,"props":26407,"children":26408},{"style":415},[26409],{"type":51,"value":7614},{"type":42,"tag":391,"props":26411,"children":26412},{"style":409},[26413],{"type":51,"value":247},{"type":42,"tag":391,"props":26415,"children":26416},{"style":415},[26417],{"type":51,"value":16704},{"type":42,"tag":391,"props":26419,"children":26420},{"style":409},[26421],{"type":51,"value":9463},{"type":42,"tag":391,"props":26423,"children":26424},{"style":515},[26425],{"type":51,"value":9468},{"type":42,"tag":391,"props":26427,"children":26428},{"style":515},[26429],{"type":51,"value":12735},{"type":42,"tag":391,"props":26431,"children":26432},{"style":415},[26433],{"type":51,"value":13172},{"type":42,"tag":391,"props":26435,"children":26436},{"style":515},[26437],{"type":51,"value":13177},{"type":42,"tag":391,"props":26439,"children":26440},{"style":409},[26441],{"type":51,"value":7672},{"type":42,"tag":391,"props":26443,"children":26444},{"style":515},[26445],{"type":51,"value":7194},{"type":42,"tag":391,"props":26447,"children":26448},{"style":409},[26449],{"type":51,"value":23883},{"type":42,"tag":391,"props":26451,"children":26452},{"class":393,"line":6975},[26453,26457,26461,26465,26469],{"type":42,"tag":391,"props":26454,"children":26455},{"style":515},[26456],{"type":51,"value":16741},{"type":42,"tag":391,"props":26458,"children":26459},{"style":415},[26460],{"type":51,"value":15019},{"type":42,"tag":391,"props":26462,"children":26463},{"style":409},[26464],{"type":51,"value":247},{"type":42,"tag":391,"props":26466,"children":26467},{"style":415},[26468],{"type":51,"value":15641},{"type":42,"tag":391,"props":26470,"children":26471},{"style":409},[26472],{"type":51,"value":7574},{"type":42,"tag":391,"props":26474,"children":26475},{"class":393,"line":6984},[26476,26480,26484,26488,26492],{"type":42,"tag":391,"props":26477,"children":26478},{"style":515},[26479],{"type":51,"value":23914},{"type":42,"tag":391,"props":26481,"children":26482},{"style":415},[26483],{"type":51,"value":15019},{"type":42,"tag":391,"props":26485,"children":26486},{"style":409},[26487],{"type":51,"value":247},{"type":42,"tag":391,"props":26489,"children":26490},{"style":415},[26491],{"type":51,"value":16778},{"type":42,"tag":391,"props":26493,"children":26494},{"style":409},[26495],{"type":51,"value":7600},{"type":42,"tag":391,"props":26497,"children":26498},{"class":393,"line":7012},[26499,26503,26507,26511,26515,26519,26523,26527],{"type":42,"tag":391,"props":26500,"children":26501},{"style":515},[26502],{"type":51,"value":16790},{"type":42,"tag":391,"props":26504,"children":26505},{"style":415},[26506],{"type":51,"value":7614},{"type":42,"tag":391,"props":26508,"children":26509},{"style":409},[26510],{"type":51,"value":247},{"type":42,"tag":391,"props":26512,"children":26513},{"style":415},[26514],{"type":51,"value":16646},{"type":42,"tag":391,"props":26516,"children":26517},{"style":515},[26518],{"type":51,"value":7627},{"type":42,"tag":391,"props":26520,"children":26521},{"style":415},[26522],{"type":51,"value":7632},{"type":42,"tag":391,"props":26524,"children":26525},{"style":409},[26526],{"type":51,"value":247},{"type":42,"tag":391,"props":26528,"children":26529},{"style":415},[26530],{"type":51,"value":16819},{"type":42,"tag":391,"props":26532,"children":26533},{"class":393,"line":7034},[26534,26538,26542,26546,26550,26554],{"type":42,"tag":391,"props":26535,"children":26536},{"style":515},[26537],{"type":51,"value":16827},{"type":42,"tag":391,"props":26539,"children":26540},{"style":415},[26541],{"type":51,"value":7614},{"type":42,"tag":391,"props":26543,"children":26544},{"style":409},[26545],{"type":51,"value":247},{"type":42,"tag":391,"props":26547,"children":26548},{"style":415},[26549],{"type":51,"value":16840},{"type":42,"tag":391,"props":26551,"children":26552},{"style":515},[26553],{"type":51,"value":7627},{"type":42,"tag":391,"props":26555,"children":26556},{"style":403},[26557],{"type":51,"value":16849},{"type":42,"tag":391,"props":26559,"children":26560},{"class":393,"line":7060},[26561,26565,26569,26573,26577,26581],{"type":42,"tag":391,"props":26562,"children":26563},{"style":515},[26564],{"type":51,"value":16939},{"type":42,"tag":391,"props":26566,"children":26567},{"style":415},[26568],{"type":51,"value":7614},{"type":42,"tag":391,"props":26570,"children":26571},{"style":409},[26572],{"type":51,"value":247},{"type":42,"tag":391,"props":26574,"children":26575},{"style":415},[26576],{"type":51,"value":16704},{"type":42,"tag":391,"props":26578,"children":26579},{"style":409},[26580],{"type":51,"value":9463},{"type":42,"tag":391,"props":26582,"children":26583},{"style":515},[26584],{"type":51,"value":9493},{"type":42,"tag":391,"props":26586,"children":26587},{"class":393,"line":7086},[26588],{"type":42,"tag":391,"props":26589,"children":26590},{"style":409},[26591],{"type":51,"value":16857},{"type":42,"tag":391,"props":26593,"children":26594},{"class":393,"line":7111},[26595,26599,26603],{"type":42,"tag":391,"props":26596,"children":26597},{"style":409},[26598],{"type":51,"value":24034},{"type":42,"tag":391,"props":26600,"children":26601},{"style":515},[26602],{"type":51,"value":7194},{"type":42,"tag":391,"props":26604,"children":26605},{"style":409},[26606],{"type":51,"value":16621},{"type":42,"tag":391,"props":26608,"children":26609},{"class":393,"line":7132},[26610],{"type":42,"tag":391,"props":26611,"children":26612},{"style":515},[26613],{"type":51,"value":16629},{"type":42,"tag":391,"props":26615,"children":26616},{"class":393,"line":7202},[26617],{"type":42,"tag":391,"props":26618,"children":26619},{"style":409},[26620],{"type":51,"value":19915},{"type":42,"tag":391,"props":26622,"children":26623},{"class":393,"line":7264},[26624,26628,26632,26636,26640],{"type":42,"tag":391,"props":26625,"children":26626},{"style":415},[26627],{"type":51,"value":19768},{"type":42,"tag":391,"props":26629,"children":26630},{"style":409},[26631],{"type":51,"value":19934},{"type":42,"tag":391,"props":26633,"children":26634},{"style":515},[26635],{"type":51,"value":7194},{"type":42,"tag":391,"props":26637,"children":26638},{"style":515},[26639],{"type":51,"value":19943},{"type":42,"tag":391,"props":26641,"children":26642},{"style":409},[26643],{"type":51,"value":7031},{"type":42,"tag":391,"props":26645,"children":26646},{"class":393,"line":7326},[26647,26651,26655,26659],{"type":42,"tag":391,"props":26648,"children":26649},{"style":415},[26650],{"type":51,"value":19768},{"type":42,"tag":391,"props":26652,"children":26653},{"style":409},[26654],{"type":51,"value":19959},{"type":42,"tag":391,"props":26656,"children":26657},{"style":515},[26658],{"type":51,"value":7194},{"type":42,"tag":391,"props":26660,"children":26661},{"style":409},[26662],{"type":51,"value":24099},{"type":42,"tag":391,"props":26664,"children":26665},{"class":393,"line":7388},[26666,26670,26674,26678],{"type":42,"tag":391,"props":26667,"children":26668},{"style":415},[26669],{"type":51,"value":19768},{"type":42,"tag":391,"props":26671,"children":26672},{"style":409},[26673],{"type":51,"value":19979},{"type":42,"tag":391,"props":26675,"children":26676},{"style":515},[26677],{"type":51,"value":7194},{"type":42,"tag":391,"props":26679,"children":26680},{"style":409},[26681],{"type":51,"value":19988},{"type":42,"tag":391,"props":26683,"children":26684},{"class":393,"line":7409},[26685,26689,26693,26697],{"type":42,"tag":391,"props":26686,"children":26687},{"style":515},[26688],{"type":51,"value":16741},{"type":42,"tag":391,"props":26690,"children":26691},{"style":415},[26692],{"type":51,"value":15019},{"type":42,"tag":391,"props":26694,"children":26695},{"style":409},[26696],{"type":51,"value":247},{"type":42,"tag":391,"props":26698,"children":26699},{"style":415},[26700],{"type":51,"value":20008},{"type":42,"tag":391,"props":26702,"children":26703},{"class":393,"line":7430},[26704,26708],{"type":42,"tag":391,"props":26705,"children":26706},{"style":515},[26707],{"type":51,"value":16939},{"type":42,"tag":391,"props":26709,"children":26710},{"style":409},[26711],{"type":51,"value":24149},{"type":42,"tag":391,"props":26713,"children":26714},{"class":393,"line":7451},[26715],{"type":42,"tag":391,"props":26716,"children":26717},{"style":409},[26718],{"type":51,"value":16857},{"type":42,"tag":391,"props":26720,"children":26721},{"class":393,"line":7497},[26722,26726,26730],{"type":42,"tag":391,"props":26723,"children":26724},{"style":409},[26725],{"type":51,"value":24164},{"type":42,"tag":391,"props":26727,"children":26728},{"style":515},[26729],{"type":51,"value":7194},{"type":42,"tag":391,"props":26731,"children":26732},{"style":409},[26733],{"type":51,"value":16621},{"type":42,"tag":391,"props":26735,"children":26736},{"class":393,"line":7523},[26737],{"type":42,"tag":391,"props":26738,"children":26739},{"style":515},[26740],{"type":51,"value":16629},{"type":42,"tag":391,"props":26742,"children":26743},{"class":393,"line":7549},[26744],{"type":42,"tag":391,"props":26745,"children":26746},{"style":409},[26747],{"type":51,"value":19752},{"type":42,"tag":391,"props":26749,"children":26750},{"class":393,"line":7577},[26751,26755,26759,26763],{"type":42,"tag":391,"props":26752,"children":26753},{"style":415},[26754],{"type":51,"value":19768},{"type":42,"tag":391,"props":26756,"children":26757},{"style":409},[26758],{"type":51,"value":19773},{"type":42,"tag":391,"props":26760,"children":26761},{"style":515},[26762],{"type":51,"value":7194},{"type":42,"tag":391,"props":26764,"children":26765},{"style":409},[26766],{"type":51,"value":24206},{"type":42,"tag":391,"props":26768,"children":26769},{"class":393,"line":7603},[26770,26774,26778,26782],{"type":42,"tag":391,"props":26771,"children":26772},{"style":515},[26773],{"type":51,"value":16741},{"type":42,"tag":391,"props":26775,"children":26776},{"style":415},[26777],{"type":51,"value":15019},{"type":42,"tag":391,"props":26779,"children":26780},{"style":409},[26781],{"type":51,"value":247},{"type":42,"tag":391,"props":26783,"children":26784},{"style":415},[26785],{"type":51,"value":19865},{"type":42,"tag":391,"props":26787,"children":26788},{"class":393,"line":7644},[26789,26793],{"type":42,"tag":391,"props":26790,"children":26791},{"style":515},[26792],{"type":51,"value":16939},{"type":42,"tag":391,"props":26794,"children":26795},{"style":409},[26796],{"type":51,"value":24237},{"type":42,"tag":391,"props":26798,"children":26799},{"class":393,"line":8522},[26800],{"type":42,"tag":391,"props":26801,"children":26802},{"style":409},[26803],{"type":51,"value":7700},{"type":42,"tag":391,"props":26805,"children":26806},{"class":393,"line":8581},[26807],{"type":42,"tag":391,"props":26808,"children":26809},{"style":515},[26810],{"type":51,"value":6981},{"type":42,"tag":391,"props":26812,"children":26813},{"class":393,"line":20272},[26814,26818,26822,26826,26830],{"type":42,"tag":391,"props":26815,"children":26816},{"style":415},[26817],{"type":51,"value":24259},{"type":42,"tag":391,"props":26819,"children":26820},{"style":409},[26821],{"type":51,"value":247},{"type":42,"tag":391,"props":26823,"children":26824},{"style":415},[26825],{"type":51,"value":16704},{"type":42,"tag":391,"props":26827,"children":26828},{"style":515},[26829],{"type":51,"value":7004},{"type":42,"tag":391,"props":26831,"children":26832},{"style":409},[26833],{"type":51,"value":24276},{"type":42,"tag":391,"props":26835,"children":26836},{"class":393,"line":20280},[26837,26841,26845,26849],{"type":42,"tag":391,"props":26838,"children":26839},{"style":415},[26840],{"type":51,"value":24259},{"type":42,"tag":391,"props":26842,"children":26843},{"style":409},[26844],{"type":51,"value":247},{"type":42,"tag":391,"props":26846,"children":26847},{"style":415},[26848],{"type":51,"value":24292},{"type":42,"tag":391,"props":26850,"children":26851},{"style":409},[26852],{"type":51,"value":7031},{"type":42,"tag":391,"props":26854,"children":26855},{"class":393,"line":20288},[26856,26860,26864,26868],{"type":42,"tag":391,"props":26857,"children":26858},{"style":415},[26859],{"type":51,"value":24259},{"type":42,"tag":391,"props":26861,"children":26862},{"style":409},[26863],{"type":51,"value":247},{"type":42,"tag":391,"props":26865,"children":26866},{"style":415},[26867],{"type":51,"value":24312},{"type":42,"tag":391,"props":26869,"children":26870},{"style":409},[26871],{"type":51,"value":7031},{"type":42,"tag":391,"props":26873,"children":26874},{"class":393,"line":20314},[26875,26879,26883,26887],{"type":42,"tag":391,"props":26876,"children":26877},{"style":415},[26878],{"type":51,"value":24259},{"type":42,"tag":391,"props":26880,"children":26881},{"style":409},[26882],{"type":51,"value":247},{"type":42,"tag":391,"props":26884,"children":26885},{"style":415},[26886],{"type":51,"value":24332},{"type":42,"tag":391,"props":26888,"children":26889},{"style":409},[26890],{"type":51,"value":7031},{"type":42,"tag":391,"props":26892,"children":26893},{"class":393,"line":20334},[26894,26898,26902,26906],{"type":42,"tag":391,"props":26895,"children":26896},{"style":415},[26897],{"type":51,"value":24259},{"type":42,"tag":391,"props":26899,"children":26900},{"style":409},[26901],{"type":51,"value":247},{"type":42,"tag":391,"props":26903,"children":26904},{"style":415},[26905],{"type":51,"value":24352},{"type":42,"tag":391,"props":26907,"children":26908},{"style":409},[26909],{"type":51,"value":7031},{"type":42,"tag":391,"props":26911,"children":26912},{"class":393,"line":20355},[26913,26917,26921,26925],{"type":42,"tag":391,"props":26914,"children":26915},{"style":415},[26916],{"type":51,"value":24259},{"type":42,"tag":391,"props":26918,"children":26919},{"style":409},[26920],{"type":51,"value":247},{"type":42,"tag":391,"props":26922,"children":26923},{"style":415},[26924],{"type":51,"value":24372},{"type":42,"tag":391,"props":26926,"children":26927},{"style":409},[26928],{"type":51,"value":7031},{"type":42,"tag":391,"props":26930,"children":26931},{"class":393,"line":20376},[26932,26936,26940,26944],{"type":42,"tag":391,"props":26933,"children":26934},{"style":415},[26935],{"type":51,"value":24384},{"type":42,"tag":391,"props":26937,"children":26938},{"style":409},[26939],{"type":51,"value":247},{"type":42,"tag":391,"props":26941,"children":26942},{"style":415},[26943],{"type":51,"value":24393},{"type":42,"tag":391,"props":26945,"children":26946},{"style":409},[26947],{"type":51,"value":7031},{"type":42,"tag":391,"props":26949,"children":26950},{"class":393,"line":20397},[26951,26955,26959,26963],{"type":42,"tag":391,"props":26952,"children":26953},{"style":415},[26954],{"type":51,"value":24384},{"type":42,"tag":391,"props":26956,"children":26957},{"style":409},[26958],{"type":51,"value":247},{"type":42,"tag":391,"props":26960,"children":26961},{"style":415},[26962],{"type":51,"value":24413},{"type":42,"tag":391,"props":26964,"children":26965},{"style":409},[26966],{"type":51,"value":7031},{"type":42,"tag":391,"props":26968,"children":26969},{"class":393,"line":20418},[26970,26974,26978,26982],{"type":42,"tag":391,"props":26971,"children":26972},{"style":415},[26973],{"type":51,"value":24425},{"type":42,"tag":391,"props":26975,"children":26976},{"style":409},[26977],{"type":51,"value":247},{"type":42,"tag":391,"props":26979,"children":26980},{"style":415},[26981],{"type":51,"value":12616},{"type":42,"tag":391,"props":26983,"children":26984},{"style":409},[26985],{"type":51,"value":7031},{"type":42,"tag":391,"props":26987,"children":26988},{"class":393,"line":20439},[26989,26993,26997,27001],{"type":42,"tag":391,"props":26990,"children":26991},{"style":415},[26992],{"type":51,"value":24425},{"type":42,"tag":391,"props":26994,"children":26995},{"style":409},[26996],{"type":51,"value":247},{"type":42,"tag":391,"props":26998,"children":26999},{"style":415},[27000],{"type":51,"value":24453},{"type":42,"tag":391,"props":27002,"children":27003},{"style":409},[27004],{"type":51,"value":7031},{"type":42,"tag":391,"props":27006,"children":27007},{"class":393,"line":20459},[27008,27012,27016,27020,27024,27028,27032,27036,27040,27044,27048,27052,27056,27060,27064,27068,27072,27076,27080,27084,27088],{"type":42,"tag":391,"props":27009,"children":27010},{"style":415},[27011],{"type":51,"value":14899},{"type":42,"tag":391,"props":27013,"children":27014},{"style":409},[27015],{"type":51,"value":7143},{"type":42,"tag":391,"props":27017,"children":27018},{"style":415},[27019],{"type":51,"value":24473},{"type":42,"tag":391,"props":27021,"children":27022},{"style":409},[27023],{"type":51,"value":247},{"type":42,"tag":391,"props":27025,"children":27026},{"style":415},[27027],{"type":51,"value":24482},{"type":42,"tag":391,"props":27029,"children":27030},{"style":515},[27031],{"type":51,"value":7471},{"type":42,"tag":391,"props":27033,"children":27034},{"style":415},[27035],{"type":51,"value":15495},{"type":42,"tag":391,"props":27037,"children":27038},{"style":409},[27039],{"type":51,"value":7143},{"type":42,"tag":391,"props":27041,"children":27042},{"style":415},[27043],{"type":51,"value":24473},{"type":42,"tag":391,"props":27045,"children":27046},{"style":409},[27047],{"type":51,"value":247},{"type":42,"tag":391,"props":27049,"children":27050},{"style":415},[27051],{"type":51,"value":12616},{"type":42,"tag":391,"props":27053,"children":27054},{"style":409},[27055],{"type":51,"value":292},{"type":42,"tag":391,"props":27057,"children":27058},{"style":415},[27059],{"type":51,"value":7485},{"type":42,"tag":391,"props":27061,"children":27062},{"style":409},[27063],{"type":51,"value":7672},{"type":42,"tag":391,"props":27065,"children":27066},{"style":515},[27067],{"type":51,"value":13108},{"type":42,"tag":391,"props":27069,"children":27070},{"style":415},[27071],{"type":51,"value":7476},{"type":42,"tag":391,"props":27073,"children":27074},{"style":409},[27075],{"type":51,"value":292},{"type":42,"tag":391,"props":27077,"children":27078},{"style":415},[27079],{"type":51,"value":7184},{"type":42,"tag":391,"props":27081,"children":27082},{"style":409},[27083],{"type":51,"value":7672},{"type":42,"tag":391,"props":27085,"children":27086},{"style":515},[27087],{"type":51,"value":7194},{"type":42,"tag":391,"props":27089,"children":27090},{"style":409},[27091],{"type":51,"value":24547},{"type":42,"tag":391,"props":27093,"children":27094},{"class":393,"line":20481},[27095,27099,27103,27107],{"type":42,"tag":391,"props":27096,"children":27097},{"style":415},[27098],{"type":51,"value":24555},{"type":42,"tag":391,"props":27100,"children":27101},{"style":409},[27102],{"type":51,"value":247},{"type":42,"tag":391,"props":27104,"children":27105},{"style":415},[27106],{"type":51,"value":24564},{"type":42,"tag":391,"props":27108,"children":27109},{"style":409},[27110],{"type":51,"value":7031},{"type":42,"tag":391,"props":27112,"children":27113},{"class":393,"line":20559},[27114,27118,27122,27126,27130,27134,27138,27142,27146,27150,27154,27158,27162,27166,27170,27174,27178,27182],{"type":42,"tag":391,"props":27115,"children":27116},{"style":415},[27117],{"type":51,"value":14899},{"type":42,"tag":391,"props":27119,"children":27120},{"style":409},[27121],{"type":51,"value":7143},{"type":42,"tag":391,"props":27123,"children":27124},{"style":415},[27125],{"type":51,"value":24584},{"type":42,"tag":391,"props":27127,"children":27128},{"style":409},[27129],{"type":51,"value":247},{"type":42,"tag":391,"props":27131,"children":27132},{"style":415},[27133],{"type":51,"value":24292},{"type":42,"tag":391,"props":27135,"children":27136},{"style":515},[27137],{"type":51,"value":7471},{"type":42,"tag":391,"props":27139,"children":27140},{"style":415},[27141],{"type":51,"value":15495},{"type":42,"tag":391,"props":27143,"children":27144},{"style":409},[27145],{"type":51,"value":7143},{"type":42,"tag":391,"props":27147,"children":27148},{"style":415},[27149],{"type":51,"value":24609},{"type":42,"tag":391,"props":27151,"children":27152},{"style":409},[27153],{"type":51,"value":247},{"type":42,"tag":391,"props":27155,"children":27156},{"style":415},[27157],{"type":51,"value":24564},{"type":42,"tag":391,"props":27159,"children":27160},{"style":409},[27161],{"type":51,"value":292},{"type":42,"tag":391,"props":27163,"children":27164},{"style":415},[27165],{"type":51,"value":7485},{"type":42,"tag":391,"props":27167,"children":27168},{"style":409},[27169],{"type":51,"value":14928},{"type":42,"tag":391,"props":27171,"children":27172},{"style":415},[27173],{"type":51,"value":7184},{"type":42,"tag":391,"props":27175,"children":27176},{"style":409},[27177],{"type":51,"value":7672},{"type":42,"tag":391,"props":27179,"children":27180},{"style":515},[27181],{"type":51,"value":7194},{"type":42,"tag":391,"props":27183,"children":27184},{"style":409},[27185],{"type":51,"value":24646},{"type":42,"tag":391,"props":27187,"children":27188},{"class":393,"line":20636},[27189,27193,27197,27201,27205],{"type":42,"tag":391,"props":27190,"children":27191},{"style":515},[27192],{"type":51,"value":7555},{"type":42,"tag":391,"props":27194,"children":27195},{"style":415},[27196],{"type":51,"value":24658},{"type":42,"tag":391,"props":27198,"children":27199},{"style":409},[27200],{"type":51,"value":247},{"type":42,"tag":391,"props":27202,"children":27203},{"style":415},[27204],{"type":51,"value":24667},{"type":42,"tag":391,"props":27206,"children":27207},{"style":409},[27208],{"type":51,"value":24672},{"type":42,"tag":391,"props":27210,"children":27211},{"class":393,"line":20725},[27212,27216,27220,27224,27228,27232,27236,27240,27244,27248],{"type":42,"tag":391,"props":27213,"children":27214},{"style":515},[27215],{"type":51,"value":6663},{"type":42,"tag":391,"props":27217,"children":27218},{"style":409},[27219],{"type":51,"value":24684},{"type":42,"tag":391,"props":27221,"children":27222},{"style":515},[27223],{"type":51,"value":24689},{"type":42,"tag":391,"props":27225,"children":27226},{"style":415},[27227],{"type":51,"value":24694},{"type":42,"tag":391,"props":27229,"children":27230},{"style":409},[27231],{"type":51,"value":247},{"type":42,"tag":391,"props":27233,"children":27234},{"style":415},[27235],{"type":51,"value":16704},{"type":42,"tag":391,"props":27237,"children":27238},{"style":515},[27239],{"type":51,"value":7627},{"type":42,"tag":391,"props":27241,"children":27242},{"style":415},[27243],{"type":51,"value":24711},{"type":42,"tag":391,"props":27245,"children":27246},{"style":409},[27247],{"type":51,"value":247},{"type":42,"tag":391,"props":27249,"children":27250},{"style":415},[27251],{"type":51,"value":20872},{"type":42,"tag":391,"props":27253,"children":27254},{"class":393,"line":20738},[27255,27259,27263,27267,27271,27275,27279,27283,27287,27291],{"type":42,"tag":391,"props":27256,"children":27257},{"style":515},[27258],{"type":51,"value":6663},{"type":42,"tag":391,"props":27260,"children":27261},{"style":409},[27262],{"type":51,"value":24731},{"type":42,"tag":391,"props":27264,"children":27265},{"style":515},[27266],{"type":51,"value":24689},{"type":42,"tag":391,"props":27268,"children":27269},{"style":415},[27270],{"type":51,"value":24694},{"type":42,"tag":391,"props":27272,"children":27273},{"style":409},[27274],{"type":51,"value":247},{"type":42,"tag":391,"props":27276,"children":27277},{"style":415},[27278],{"type":51,"value":16704},{"type":42,"tag":391,"props":27280,"children":27281},{"style":515},[27282],{"type":51,"value":7627},{"type":42,"tag":391,"props":27284,"children":27285},{"style":415},[27286],{"type":51,"value":24756},{"type":42,"tag":391,"props":27288,"children":27289},{"style":409},[27290],{"type":51,"value":247},{"type":42,"tag":391,"props":27292,"children":27293},{"style":415},[27294],{"type":51,"value":20216},{"type":42,"tag":391,"props":27296,"children":27297},{"class":393,"line":20751},[27298,27302,27306,27310,27314,27318,27322,27326,27330,27334],{"type":42,"tag":391,"props":27299,"children":27300},{"style":515},[27301],{"type":51,"value":6663},{"type":42,"tag":391,"props":27303,"children":27304},{"style":409},[27305],{"type":51,"value":24776},{"type":42,"tag":391,"props":27307,"children":27308},{"style":515},[27309],{"type":51,"value":24689},{"type":42,"tag":391,"props":27311,"children":27312},{"style":415},[27313],{"type":51,"value":24694},{"type":42,"tag":391,"props":27315,"children":27316},{"style":409},[27317],{"type":51,"value":247},{"type":42,"tag":391,"props":27319,"children":27320},{"style":415},[27321],{"type":51,"value":16704},{"type":42,"tag":391,"props":27323,"children":27324},{"style":515},[27325],{"type":51,"value":7627},{"type":42,"tag":391,"props":27327,"children":27328},{"style":415},[27329],{"type":51,"value":24801},{"type":42,"tag":391,"props":27331,"children":27332},{"style":409},[27333],{"type":51,"value":247},{"type":42,"tag":391,"props":27335,"children":27336},{"style":415},[27337],{"type":51,"value":24810},{"type":42,"tag":391,"props":27339,"children":27340},{"class":393,"line":20788},[27341,27345,27349],{"type":42,"tag":391,"props":27342,"children":27343},{"style":515},[27344],{"type":51,"value":15048},{"type":42,"tag":391,"props":27346,"children":27347},{"style":409},[27348],{"type":51,"value":24822},{"type":42,"tag":391,"props":27350,"children":27351},{"style":515},[27352],{"type":51,"value":24827},{"type":42,"tag":361,"props":27354,"children":27356},{"id":27355},"run-the-full-pipeline-end-to-end",[27357],{"type":51,"value":27358},"Run the full pipeline end-to-end",{"type":42,"tag":43,"props":27360,"children":27361},{},[27362],{"type":51,"value":27363},"Run the entire pipeline - ingestion, staging, and reports - in one command:",{"type":42,"tag":381,"props":27365,"children":27366},{"className":383,"code":6105,"language":385,"meta":7,"style":7},[27367],{"type":42,"tag":240,"props":27368,"children":27369},{"__ignoreMap":7},[27370],{"type":42,"tag":391,"props":27371,"children":27372},{"class":393,"line":176},[27373,27377,27381,27385,27389,27393,27397],{"type":42,"tag":391,"props":27374,"children":27375},{"style":397},[27376],{"type":51,"value":445},{"type":42,"tag":391,"props":27378,"children":27379},{"style":403},[27380],{"type":51,"value":6121},{"type":42,"tag":391,"props":27382,"children":27383},{"style":415},[27384],{"type":51,"value":6126},{"type":42,"tag":391,"props":27386,"children":27387},{"style":403},[27388],{"type":51,"value":6131},{"type":42,"tag":391,"props":27390,"children":27391},{"style":415},[27392],{"type":51,"value":6136},{"type":42,"tag":391,"props":27394,"children":27395},{"style":403},[27396],{"type":51,"value":6141},{"type":42,"tag":391,"props":27398,"children":27399},{"style":403},[27400],{"type":51,"value":1650},{"type":42,"tag":43,"props":27402,"children":27403},{},[27404,27406,27411,27413,27417],{"type":51,"value":27405},"Bruin executes everything in dependency order: ",{"type":42,"tag":229,"props":27407,"children":27408},{"href":302},[27409],{"type":51,"value":27410},"ingestor assets",{"type":51,"value":27412}," first, then staging, then reports. ",{"type":42,"tag":229,"props":27414,"children":27415},{"href":302},[27416],{"type":51,"value":6382},{"type":51,"value":27418}," run after each asset.",{"type":42,"tag":43,"props":27420,"children":27421},{},[27422],{"type":51,"value":27423},"If your test month looks good, run a full backfill:",{"type":42,"tag":381,"props":27425,"children":27427},{"className":383,"code":27426,"language":385,"meta":7,"style":7},"bruin run --start-date 2024-01-01 --end-date 2025-04-01 .\n",[27428],{"type":42,"tag":240,"props":27429,"children":27430},{"__ignoreMap":7},[27431],{"type":42,"tag":391,"props":27432,"children":27433},{"class":393,"line":176},[27434,27438,27442,27446,27450,27454,27459],{"type":42,"tag":391,"props":27435,"children":27436},{"style":397},[27437],{"type":51,"value":445},{"type":42,"tag":391,"props":27439,"children":27440},{"style":403},[27441],{"type":51,"value":6121},{"type":42,"tag":391,"props":27443,"children":27444},{"style":415},[27445],{"type":51,"value":6126},{"type":42,"tag":391,"props":27447,"children":27448},{"style":403},[27449],{"type":51,"value":6278},{"type":42,"tag":391,"props":27451,"children":27452},{"style":415},[27453],{"type":51,"value":6136},{"type":42,"tag":391,"props":27455,"children":27456},{"style":403},[27457],{"type":51,"value":27458}," 2025-04-01",{"type":42,"tag":391,"props":27460,"children":27461},{"style":403},[27462],{"type":51,"value":1650},{"type":42,"tag":43,"props":27464,"children":27465},{},[27466,27468,27474],{"type":51,"value":27467},"You can also use ",{"type":42,"tag":240,"props":27469,"children":27471},{"className":27470},[],[27472],{"type":51,"value":27473},"--full-refresh",{"type":51,"value":27475}," to drop and recreate all tables from scratch if you need a clean slate:",{"type":42,"tag":381,"props":27477,"children":27479},{"className":383,"code":27478,"language":385,"meta":7,"style":7},"bruin run --full-refresh --start-date 2024-01-01 --end-date 2025-04-01 .\n",[27480],{"type":42,"tag":240,"props":27481,"children":27482},{"__ignoreMap":7},[27483],{"type":42,"tag":391,"props":27484,"children":27485},{"class":393,"line":176},[27486,27490,27494,27499,27503,27507,27511,27515],{"type":42,"tag":391,"props":27487,"children":27488},{"style":397},[27489],{"type":51,"value":445},{"type":42,"tag":391,"props":27491,"children":27492},{"style":403},[27493],{"type":51,"value":6121},{"type":42,"tag":391,"props":27495,"children":27496},{"style":415},[27497],{"type":51,"value":27498}," --full-refresh",{"type":42,"tag":391,"props":27500,"children":27501},{"style":415},[27502],{"type":51,"value":6126},{"type":42,"tag":391,"props":27504,"children":27505},{"style":403},[27506],{"type":51,"value":6278},{"type":42,"tag":391,"props":27508,"children":27509},{"style":415},[27510],{"type":51,"value":6136},{"type":42,"tag":391,"props":27512,"children":27513},{"style":403},[27514],{"type":51,"value":27458},{"type":42,"tag":391,"props":27516,"children":27517},{"style":403},[27518],{"type":51,"value":1650},{"type":42,"tag":43,"props":27520,"children":27521},{},[27522],{"type":51,"value":27523},"Validate the full pipeline:",{"type":42,"tag":381,"props":27525,"children":27526},{"className":383,"code":1629,"language":385,"meta":7,"style":7},[27527],{"type":42,"tag":240,"props":27528,"children":27529},{"__ignoreMap":7},[27530],{"type":42,"tag":391,"props":27531,"children":27532},{"class":393,"line":176},[27533,27537,27541],{"type":42,"tag":391,"props":27534,"children":27535},{"style":397},[27536],{"type":51,"value":445},{"type":42,"tag":391,"props":27538,"children":27539},{"style":403},[27540],{"type":51,"value":1645},{"type":42,"tag":391,"props":27542,"children":27543},{"style":403},[27544],{"type":51,"value":1650},{"type":42,"tag":361,"props":27546,"children":27548},{"id":27547},"verify-results-with-claude-code",[27549],{"type":51,"value":27550},"Verify results with Claude Code",{"type":42,"tag":43,"props":27552,"children":27553},{},[27554],{"type":51,"value":27555},"After the pipeline runs, ask Claude Code to spot-check the reports:",{"type":42,"tag":1574,"props":27557,"children":27558},{},[27559],{"type":42,"tag":43,"props":27560,"children":27561},{},[27562],{"type":51,"value":27563},"Query reports.rpt_daily_revenue for the last 7 days and show me the results. Does anything look off?",{"type":42,"tag":1574,"props":27565,"children":27566},{},[27567],{"type":42,"tag":43,"props":27568,"children":27569},{},[27570],{"type":51,"value":27571},"Check if rpt_customer_cohorts has data for the last 6 months. Show me the retention rate for the most recent cohort.",{"type":42,"tag":1574,"props":27573,"children":27574},{},[27575],{"type":42,"tag":43,"props":27576,"children":27577},{},[27578],{"type":51,"value":27579},"Run bruin validate on the project and summarize any quality check failures.",{"type":42,"tag":43,"props":27581,"children":27582},{},[27583],{"type":51,"value":27584},"If a report looks wrong, Claude Code can compare the report output against the staging tables to find the issue:",{"type":42,"tag":1574,"props":27586,"children":27587},{},[27588],{"type":42,"tag":43,"props":27589,"children":27590},{},[27591],{"type":51,"value":27592},"The rpt_marketing_roi table shows zero attributed_revenue for Facebook. Query the staging tables to trace where the data is dropping off.",{"type":42,"tag":86,"props":27594,"children":27595},{"id":1671},[27596],{"type":51,"value":1674},{"type":42,"tag":214,"props":27598,"children":27599},{},[27600,27610,27620,27629],{"type":42,"tag":218,"props":27601,"children":27602},{},[27603,27608],{"type":42,"tag":47,"props":27604,"children":27605},{},[27606],{"type":51,"value":27607},"5 report tables",{"type":51,"value":27609}," that turn clean staging data into business metrics",{"type":42,"tag":218,"props":27611,"children":27612},{},[27613,27618],{"type":42,"tag":47,"props":27614,"children":27615},{},[27616],{"type":51,"value":27617},"Three-layer pipeline:",{"type":51,"value":27619}," ingestion, staging, reports - all orchestrated by Bruin",{"type":42,"tag":218,"props":27621,"children":27622},{},[27623,27627],{"type":42,"tag":47,"props":27624,"children":27625},{},[27626],{"type":51,"value":14301},{"type":51,"value":27628}," make sure reports only run after their staging inputs are fresh",{"type":42,"tag":218,"props":27630,"children":27631},{},[27632,27636],{"type":42,"tag":47,"props":27633,"children":27634},{},[27635],{"type":51,"value":6382},{"type":51,"value":27637}," on every report table catch issues before anyone sees bad numbers",{"type":42,"tag":43,"props":27639,"children":27640},{},[27641],{"type":51,"value":27642},"Next, you'll add an AI layer so anyone on your team can query this data in plain language.",{"type":42,"tag":1681,"props":27644,"children":27645},{},[27646],{"type":51,"value":1685},{"title":7,"searchDepth":99,"depth":99,"links":27648},[27649,27650,27651,27666],{"id":193,"depth":99,"text":196},{"id":324,"depth":99,"text":327},{"id":356,"depth":99,"text":359,"children":27652},[27653,27654,27656,27658,27660,27662,27664,27665],{"id":14437,"depth":439,"text":14440},{"id":14474,"depth":439,"text":27655},"1) Daily revenue - rpt_daily_revenue.sql",{"id":16450,"depth":439,"text":27657},"2) Customer cohorts - rpt_customer_cohorts.sql",{"id":19293,"depth":439,"text":27659},"3) Product performance - rpt_product_performance.sql",{"id":19560,"depth":439,"text":27661},"4) Marketing ROI - rpt_marketing_roi.sql",{"id":23533,"depth":439,"text":27663},"5) Daily KPIs - rpt_daily_kpis.sql",{"id":27355,"depth":439,"text":27358},{"id":27547,"depth":439,"text":27550},{"id":1671,"depth":99,"text":1674},"content:tutorials:ecommerce-pipeline:build-reports.md","tutorials\u002Fecommerce-pipeline\u002Fbuild-reports.md","tutorials\u002Fecommerce-pipeline\u002Fbuild-reports",{"_path":27671,"_dir":12,"_draft":6,"_partial":6,"_locale":7,"title":27672,"description":27673,"date":10,"readingTime":6843,"category":166,"tags":27674,"variants":27677,"difficulty":6374,"module":12,"subSteps":13,"step":960,"journeys":27678,"learnMore":27679,"author":27692,"body":27693,"_type":102,"_id":29620,"_source":104,"_file":29621,"_stem":29622,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline\u002Fai-analyst","Set Up Your AI Data Analyst","Enhance your pipeline with AI-generated metadata, create an ecommerce-specific AGENTS.md, and deploy an AI analyst your team can use locally or in Slack.",[168,169,27675,548,170,171,172,173,27676,174],"Bruin AI","Slack",[171,172,173],[179,180],[27680,27683,27686,27689],{"label":27681,"url":27682},"Bruin MCP best practices","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fgetting-started\u002Fbruin-mcp.html#best-practices-for-ai-agents",{"label":27684,"url":27685},"AI enhance command reference","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fcommands\u002Fai-enhance.html",{"label":27687,"url":27688},"AI Data Analyst module","\u002Flearn\u002Fai-data-analyst",{"label":27690,"url":27691},"Cloud + Slack AI analyst tutorial","\u002Flearn\u002Fcloud-slack",{"name":35,"role":36,"image":37},{"type":39,"children":27694,"toc":29608},[27695,27699,27737,27741,27746,27758,27762,27768,27780,27809,27821,27827,27852,27857,27865,27870,29088,29094,29106,29114,29122,29130,29138,29173,29181,29193,29199,29211,29242,29254,29260,29265,29273,29305,29411,29419,29467,29475,29513,29521,29526,29534,29546,29550,29599,29604],{"type":42,"tag":86,"props":27696,"children":27697},{"id":193},[27698],{"type":51,"value":196},{"type":42,"tag":27700,"props":27701,"children":27702},"ol",{},[27703,27714,27727,27732],{"type":42,"tag":218,"props":27704,"children":27705},{},[27706,27708],{"type":51,"value":27707},"Auto-generate metadata for every asset using ",{"type":42,"tag":240,"props":27709,"children":27711},{"className":27710},[],[27712],{"type":51,"value":27713},"bruin ai enhance",{"type":42,"tag":218,"props":27715,"children":27716},{},[27717,27719,27725],{"type":51,"value":27718},"Create an ",{"type":42,"tag":240,"props":27720,"children":27722},{"className":27721},[],[27723],{"type":51,"value":27724},"AGENTS.md",{"type":51,"value":27726}," with ecommerce-specific context",{"type":42,"tag":218,"props":27728,"children":27729},{},[27730],{"type":51,"value":27731},"Ask your local AI analyst real business questions",{"type":42,"tag":218,"props":27733,"children":27734},{},[27735],{"type":51,"value":27736},"Deploy the analyst to Bruin Cloud so your team can use it in Slack or Teams",{"type":42,"tag":86,"props":27738,"children":27739},{"id":324},[27740],{"type":51,"value":327},{"type":42,"tag":43,"props":27742,"children":27743},{},[27744],{"type":51,"value":27745},"Your pipeline produces clean data and reports, but right now the only way to get answers is to write SQL. The AI analyst lets anyone on your team ask questions in plain language and get answers backed by real data.",{"type":42,"tag":43,"props":27747,"children":27748},{},[27749,27751,27756],{"type":51,"value":27750},"The missing piece is context. A general-purpose AI doesn't know that \"ROAS\" means return on ad spend, that Stripe amounts are in cents, or that guest checkouts have a NULL customer email. The ",{"type":42,"tag":240,"props":27752,"children":27754},{"className":27753},[],[27755],{"type":51,"value":27724},{"type":51,"value":27757}," file fills that gap.",{"type":42,"tag":86,"props":27759,"children":27760},{"id":356},[27761],{"type":51,"value":359},{"type":42,"tag":361,"props":27763,"children":27765},{"id":27764},"_1-enhance-all-assets-with-ai-metadata",[27766],{"type":51,"value":27767},"1) Enhance all assets with AI metadata",{"type":42,"tag":43,"props":27769,"children":27770},{},[27771,27773,27778],{"type":51,"value":27772},"Run ",{"type":42,"tag":240,"props":27774,"children":27776},{"className":27775},[],[27777],{"type":51,"value":27713},{"type":51,"value":27779}," to auto-generate descriptions, column metadata, and quality check suggestions for every asset:",{"type":42,"tag":381,"props":27781,"children":27783},{"className":383,"code":27782,"language":385,"meta":7,"style":7},"bruin ai enhance ecommerce\u002F\n",[27784],{"type":42,"tag":240,"props":27785,"children":27786},{"__ignoreMap":7},[27787],{"type":42,"tag":391,"props":27788,"children":27789},{"class":393,"line":176},[27790,27794,27799,27804],{"type":42,"tag":391,"props":27791,"children":27792},{"style":397},[27793],{"type":51,"value":445},{"type":42,"tag":391,"props":27795,"children":27796},{"style":403},[27797],{"type":51,"value":27798}," ai",{"type":42,"tag":391,"props":27800,"children":27801},{"style":403},[27802],{"type":51,"value":27803}," enhance",{"type":42,"tag":391,"props":27805,"children":27806},{"style":403},[27807],{"type":51,"value":27808}," ecommerce\u002F\n",{"type":42,"tag":43,"props":27810,"children":27811},{},[27812,27814,27819],{"type":51,"value":27813},"This reads your SQL, figures out what each asset does, and writes descriptions into the asset files. Review the output - it's usually accurate but sometimes suggests ",{"type":42,"tag":240,"props":27815,"children":27817},{"className":27816},[],[27818],{"type":51,"value":14284},{"type":51,"value":27820}," checks on columns that aren't actually unique.",{"type":42,"tag":361,"props":27822,"children":27824},{"id":27823},"_2-create-your-agentsmd",[27825],{"type":51,"value":27826},"2) Create your AGENTS.md",{"type":42,"tag":43,"props":27828,"children":27829},{},[27830,27831,27836,27838,27843,27845,27850],{"type":51,"value":27718},{"type":42,"tag":240,"props":27832,"children":27834},{"className":27833},[],[27835],{"type":51,"value":27724},{"type":51,"value":27837}," file at the ",{"type":42,"tag":47,"props":27839,"children":27840},{},[27841],{"type":51,"value":27842},"root of your Bruin project",{"type":51,"value":27844}," - the directory where ",{"type":42,"tag":240,"props":27846,"children":27848},{"className":27847},[],[27849],{"type":51,"value":490},{"type":51,"value":27851}," lives. Claude Code reads this file automatically when it starts a session in your project directory.",{"type":42,"tag":43,"props":27853,"children":27854},{},[27855],{"type":51,"value":27856},"You can ask Claude Code to help draft it:",{"type":42,"tag":1574,"props":27858,"children":27859},{},[27860],{"type":42,"tag":43,"props":27861,"children":27862},{},[27863],{"type":51,"value":27864},"Create an AGENTS.md file for this ecommerce analytics project. Include data access rules using bruin query with the warehouse connection name from our pipeline, a glossary of ecommerce terms (AOV, ROAS, LTV, etc.), and data caveats like Stripe amounts being in cents and guest checkouts having null customer_email.",{"type":42,"tag":43,"props":27866,"children":27867},{},[27868],{"type":51,"value":27869},"Here's what the file should look like. Replace the connection name with the one you set up in Step 1:",{"type":42,"tag":563,"props":27871,"children":27872},{":variants":565,"group":566},[27873,28310,28699],{"type":42,"tag":569,"props":27874,"children":27875},{"v-slot:clickhouse":7},[27876],{"type":42,"tag":381,"props":27877,"children":27880},{"className":27878,"code":27879,"language":102,"meta":7,"style":7},"language-markdown shiki shiki-themes github-dark","# AGENTS.md\n\n## Data access\n- Use `bruin query --connection clickhouse-default --query \"\u003CSQL>\"` for all data access\n- Always show the SQL query and explain your reasoning before executing it\n- Add `LIMIT 10` to your SQL when exploring unfamiliar tables or testing complex queries\n- Read the `assets\u002F` directory to understand available tables and their schemas before querying\n- This is a **read-only** environment - never run INSERT, UPDATE, DELETE, or DROP statements\n\n\u003C!-- Customize this list to match the sources you actually connected in Step 1.\n     The example below includes Shopify, Stripe, Klaviyo, Facebook Ads, and GA4.\n     Remove any you don't use and add any additional sources (e.g., TikTok Ads, Pinterest, Zendesk). -->\n## Project overview\nThis is an ecommerce analytics pipeline ingesting data from Shopify (orders,\ncustomers, products, inventory), Stripe (payments, refunds, payouts),\nKlaviyo (email campaigns, flows), Facebook Ads (campaigns, ad insights),\nand GA4 (sessions, events) into your data warehouse.\n\nThe pipeline has three layers:\n- **raw.*** - ingested data from SaaS sources (do not query directly for reporting)\n- **staging.*** - cleaned, deduplicated, joined tables\n- **reports.*** - aggregated business metrics and KPIs\n\n## Domain glossary\n- **AOV** - Average Order Value: net revenue divided by number of paid orders\n- **GMV** - Gross Merchandise Value: total order value before returns and discounts\n- **NMV** - Net Merchandise Value: GMV minus returns, cancellations, and discounts\n- **ROAS** - Return on Ad Spend: attributed revenue divided by ad spend\n- **CAC** - Customer Acquisition Cost: total marketing spend divided by new customers\n- **LTV** - Lifetime Value: total revenue from a customer across all orders\n- **Conversion Rate** - percentage of website sessions resulting in a completed purchase\n- **Cart Abandonment** - percentage of sessions with add-to-cart but no purchase\n- **Repeat Purchase Rate** - percentage of customers with more than one order\n- **Churn** - customers with no order in the past 90 days\n- **SKU** - Stock Keeping Unit: unique identifier for a product variant\n- **Basket Size** - number of items in a single order\n\n## Data caveats\n- All timestamps are in **UTC**\n- Stripe amounts are in **cents** - divide by 100 for dollar values\n- `customer_email` is `NULL` for guest checkouts (~15-20% of orders)\n- Refund window is **30 days** - recent revenue figures may be revised downward\n- Inventory data syncs every **4 hours** - not real-time\n- Shopify `order_total` includes tax and shipping; use `subtotal` for product revenue only\n- Facebook Ads data has a **24-48 hour attribution delay**\n- Klaviyo campaigns have no direct spend - they appear with $0 spend in marketing reports\n\n## Query guidelines\n- For revenue, always use **NMV** (net of returns) unless explicitly asked for GMV\n- Exclude test orders: `WHERE customer_email NOT LIKE '%@test.%'`\n- Use a **12-month lookback window** for LTV calculations by default\n- For marketing attribution, use `reports.rpt_marketing_roi` - do not attempt to join raw ad data with orders directly\n- For daily KPIs, use `reports.rpt_daily_kpis` as the single source of truth\n- Prefer `staging.*` tables over `raw.*` for any analysis\n",[27881],{"type":42,"tag":240,"props":27882,"children":27883},{"__ignoreMap":7},[27884,27892,27899,27907,27915,27923,27931,27939,27947,27954,27962,27970,27978,27986,27994,28002,28010,28018,28025,28033,28041,28049,28057,28064,28072,28080,28088,28096,28104,28112,28120,28128,28136,28144,28152,28160,28168,28175,28183,28191,28199,28207,28215,28223,28231,28239,28247,28254,28262,28270,28278,28286,28294,28302],{"type":42,"tag":391,"props":27885,"children":27886},{"class":393,"line":176},[27887],{"type":42,"tag":391,"props":27888,"children":27889},{},[27890],{"type":51,"value":27891},"# AGENTS.md\n",{"type":42,"tag":391,"props":27893,"children":27894},{"class":393,"line":99},[27895],{"type":42,"tag":391,"props":27896,"children":27897},{"emptyLinePlaceholder":13},[27898],{"type":51,"value":6972},{"type":42,"tag":391,"props":27900,"children":27901},{"class":393,"line":439},[27902],{"type":42,"tag":391,"props":27903,"children":27904},{},[27905],{"type":51,"value":27906},"## Data access\n",{"type":42,"tag":391,"props":27908,"children":27909},{"class":393,"line":947},[27910],{"type":42,"tag":391,"props":27911,"children":27912},{},[27913],{"type":51,"value":27914},"- Use `bruin query --connection clickhouse-default --query \"\u003CSQL>\"` for all data access\n",{"type":42,"tag":391,"props":27916,"children":27917},{"class":393,"line":960},[27918],{"type":42,"tag":391,"props":27919,"children":27920},{},[27921],{"type":51,"value":27922},"- Always show the SQL query and explain your reasoning before executing it\n",{"type":42,"tag":391,"props":27924,"children":27925},{"class":393,"line":984},[27926],{"type":42,"tag":391,"props":27927,"children":27928},{},[27929],{"type":51,"value":27930},"- Add `LIMIT 10` to your SQL when exploring unfamiliar tables or testing complex queries\n",{"type":42,"tag":391,"props":27932,"children":27933},{"class":393,"line":1002},[27934],{"type":42,"tag":391,"props":27935,"children":27936},{},[27937],{"type":51,"value":27938},"- Read the `assets\u002F` directory to understand available tables and their schemas before querying\n",{"type":42,"tag":391,"props":27940,"children":27941},{"class":393,"line":165},[27942],{"type":42,"tag":391,"props":27943,"children":27944},{},[27945],{"type":51,"value":27946},"- This is a **read-only** environment - never run INSERT, UPDATE, DELETE, or DROP statements\n",{"type":42,"tag":391,"props":27948,"children":27949},{"class":393,"line":2235},[27950],{"type":42,"tag":391,"props":27951,"children":27952},{"emptyLinePlaceholder":13},[27953],{"type":51,"value":6972},{"type":42,"tag":391,"props":27955,"children":27956},{"class":393,"line":6843},[27957],{"type":42,"tag":391,"props":27958,"children":27959},{},[27960],{"type":51,"value":27961},"\u003C!-- Customize this list to match the sources you actually connected in Step 1.\n",{"type":42,"tag":391,"props":27963,"children":27964},{"class":393,"line":6852},[27965],{"type":42,"tag":391,"props":27966,"children":27967},{},[27968],{"type":51,"value":27969},"     The example below includes Shopify, Stripe, Klaviyo, Facebook Ads, and GA4.\n",{"type":42,"tag":391,"props":27971,"children":27972},{"class":393,"line":6861},[27973],{"type":42,"tag":391,"props":27974,"children":27975},{},[27976],{"type":51,"value":27977},"     Remove any you don't use and add any additional sources (e.g., TikTok Ads, Pinterest, Zendesk). -->\n",{"type":42,"tag":391,"props":27979,"children":27980},{"class":393,"line":6870},[27981],{"type":42,"tag":391,"props":27982,"children":27983},{},[27984],{"type":51,"value":27985},"## Project overview\n",{"type":42,"tag":391,"props":27987,"children":27988},{"class":393,"line":6879},[27989],{"type":42,"tag":391,"props":27990,"children":27991},{},[27992],{"type":51,"value":27993},"This is an ecommerce analytics pipeline ingesting data from Shopify (orders,\n",{"type":42,"tag":391,"props":27995,"children":27996},{"class":393,"line":1707},[27997],{"type":42,"tag":391,"props":27998,"children":27999},{},[28000],{"type":51,"value":28001},"customers, products, inventory), Stripe (payments, refunds, payouts),\n",{"type":42,"tag":391,"props":28003,"children":28004},{"class":393,"line":6896},[28005],{"type":42,"tag":391,"props":28006,"children":28007},{},[28008],{"type":51,"value":28009},"Klaviyo (email campaigns, flows), Facebook Ads (campaigns, ad insights),\n",{"type":42,"tag":391,"props":28011,"children":28012},{"class":393,"line":6905},[28013],{"type":42,"tag":391,"props":28014,"children":28015},{},[28016],{"type":51,"value":28017},"and GA4 (sessions, events) into your data warehouse.\n",{"type":42,"tag":391,"props":28019,"children":28020},{"class":393,"line":6913},[28021],{"type":42,"tag":391,"props":28022,"children":28023},{"emptyLinePlaceholder":13},[28024],{"type":51,"value":6972},{"type":42,"tag":391,"props":28026,"children":28027},{"class":393,"line":6921},[28028],{"type":42,"tag":391,"props":28029,"children":28030},{},[28031],{"type":51,"value":28032},"The pipeline has three layers:\n",{"type":42,"tag":391,"props":28034,"children":28035},{"class":393,"line":6930},[28036],{"type":42,"tag":391,"props":28037,"children":28038},{},[28039],{"type":51,"value":28040},"- **raw.*** - ingested data from SaaS sources (do not query directly for reporting)\n",{"type":42,"tag":391,"props":28042,"children":28043},{"class":393,"line":6939},[28044],{"type":42,"tag":391,"props":28045,"children":28046},{},[28047],{"type":51,"value":28048},"- **staging.*** - cleaned, deduplicated, joined tables\n",{"type":42,"tag":391,"props":28050,"children":28051},{"class":393,"line":6948},[28052],{"type":42,"tag":391,"props":28053,"children":28054},{},[28055],{"type":51,"value":28056},"- **reports.*** - aggregated business metrics and KPIs\n",{"type":42,"tag":391,"props":28058,"children":28059},{"class":393,"line":6957},[28060],{"type":42,"tag":391,"props":28061,"children":28062},{"emptyLinePlaceholder":13},[28063],{"type":51,"value":6972},{"type":42,"tag":391,"props":28065,"children":28066},{"class":393,"line":6966},[28067],{"type":42,"tag":391,"props":28068,"children":28069},{},[28070],{"type":51,"value":28071},"## Domain glossary\n",{"type":42,"tag":391,"props":28073,"children":28074},{"class":393,"line":6975},[28075],{"type":42,"tag":391,"props":28076,"children":28077},{},[28078],{"type":51,"value":28079},"- **AOV** - Average Order Value: net revenue divided by number of paid orders\n",{"type":42,"tag":391,"props":28081,"children":28082},{"class":393,"line":6984},[28083],{"type":42,"tag":391,"props":28084,"children":28085},{},[28086],{"type":51,"value":28087},"- **GMV** - Gross Merchandise Value: total order value before returns and discounts\n",{"type":42,"tag":391,"props":28089,"children":28090},{"class":393,"line":7012},[28091],{"type":42,"tag":391,"props":28092,"children":28093},{},[28094],{"type":51,"value":28095},"- **NMV** - Net Merchandise Value: GMV minus returns, cancellations, and discounts\n",{"type":42,"tag":391,"props":28097,"children":28098},{"class":393,"line":7034},[28099],{"type":42,"tag":391,"props":28100,"children":28101},{},[28102],{"type":51,"value":28103},"- **ROAS** - Return on Ad Spend: attributed revenue divided by ad spend\n",{"type":42,"tag":391,"props":28105,"children":28106},{"class":393,"line":7060},[28107],{"type":42,"tag":391,"props":28108,"children":28109},{},[28110],{"type":51,"value":28111},"- **CAC** - Customer Acquisition Cost: total marketing spend divided by new customers\n",{"type":42,"tag":391,"props":28113,"children":28114},{"class":393,"line":7086},[28115],{"type":42,"tag":391,"props":28116,"children":28117},{},[28118],{"type":51,"value":28119},"- **LTV** - Lifetime Value: total revenue from a customer across all orders\n",{"type":42,"tag":391,"props":28121,"children":28122},{"class":393,"line":7111},[28123],{"type":42,"tag":391,"props":28124,"children":28125},{},[28126],{"type":51,"value":28127},"- **Conversion Rate** - percentage of website sessions resulting in a completed purchase\n",{"type":42,"tag":391,"props":28129,"children":28130},{"class":393,"line":7132},[28131],{"type":42,"tag":391,"props":28132,"children":28133},{},[28134],{"type":51,"value":28135},"- **Cart Abandonment** - percentage of sessions with add-to-cart but no purchase\n",{"type":42,"tag":391,"props":28137,"children":28138},{"class":393,"line":7202},[28139],{"type":42,"tag":391,"props":28140,"children":28141},{},[28142],{"type":51,"value":28143},"- **Repeat Purchase Rate** - percentage of customers with more than one order\n",{"type":42,"tag":391,"props":28145,"children":28146},{"class":393,"line":7264},[28147],{"type":42,"tag":391,"props":28148,"children":28149},{},[28150],{"type":51,"value":28151},"- **Churn** - customers with no order in the past 90 days\n",{"type":42,"tag":391,"props":28153,"children":28154},{"class":393,"line":7326},[28155],{"type":42,"tag":391,"props":28156,"children":28157},{},[28158],{"type":51,"value":28159},"- **SKU** - Stock Keeping Unit: unique identifier for a product variant\n",{"type":42,"tag":391,"props":28161,"children":28162},{"class":393,"line":7388},[28163],{"type":42,"tag":391,"props":28164,"children":28165},{},[28166],{"type":51,"value":28167},"- **Basket Size** - number of items in a single order\n",{"type":42,"tag":391,"props":28169,"children":28170},{"class":393,"line":7409},[28171],{"type":42,"tag":391,"props":28172,"children":28173},{"emptyLinePlaceholder":13},[28174],{"type":51,"value":6972},{"type":42,"tag":391,"props":28176,"children":28177},{"class":393,"line":7430},[28178],{"type":42,"tag":391,"props":28179,"children":28180},{},[28181],{"type":51,"value":28182},"## Data caveats\n",{"type":42,"tag":391,"props":28184,"children":28185},{"class":393,"line":7451},[28186],{"type":42,"tag":391,"props":28187,"children":28188},{},[28189],{"type":51,"value":28190},"- All timestamps are in **UTC**\n",{"type":42,"tag":391,"props":28192,"children":28193},{"class":393,"line":7497},[28194],{"type":42,"tag":391,"props":28195,"children":28196},{},[28197],{"type":51,"value":28198},"- Stripe amounts are in **cents** - divide by 100 for dollar values\n",{"type":42,"tag":391,"props":28200,"children":28201},{"class":393,"line":7523},[28202],{"type":42,"tag":391,"props":28203,"children":28204},{},[28205],{"type":51,"value":28206},"- `customer_email` is `NULL` for guest checkouts (~15-20% of orders)\n",{"type":42,"tag":391,"props":28208,"children":28209},{"class":393,"line":7549},[28210],{"type":42,"tag":391,"props":28211,"children":28212},{},[28213],{"type":51,"value":28214},"- Refund window is **30 days** - recent revenue figures may be revised downward\n",{"type":42,"tag":391,"props":28216,"children":28217},{"class":393,"line":7577},[28218],{"type":42,"tag":391,"props":28219,"children":28220},{},[28221],{"type":51,"value":28222},"- Inventory data syncs every **4 hours** - not real-time\n",{"type":42,"tag":391,"props":28224,"children":28225},{"class":393,"line":7603},[28226],{"type":42,"tag":391,"props":28227,"children":28228},{},[28229],{"type":51,"value":28230},"- Shopify `order_total` includes tax and shipping; use `subtotal` for product revenue only\n",{"type":42,"tag":391,"props":28232,"children":28233},{"class":393,"line":7644},[28234],{"type":42,"tag":391,"props":28235,"children":28236},{},[28237],{"type":51,"value":28238},"- Facebook Ads data has a **24-48 hour attribution delay**\n",{"type":42,"tag":391,"props":28240,"children":28241},{"class":393,"line":8522},[28242],{"type":42,"tag":391,"props":28243,"children":28244},{},[28245],{"type":51,"value":28246},"- Klaviyo campaigns have no direct spend - they appear with $0 spend in marketing reports\n",{"type":42,"tag":391,"props":28248,"children":28249},{"class":393,"line":8581},[28250],{"type":42,"tag":391,"props":28251,"children":28252},{"emptyLinePlaceholder":13},[28253],{"type":51,"value":6972},{"type":42,"tag":391,"props":28255,"children":28256},{"class":393,"line":20272},[28257],{"type":42,"tag":391,"props":28258,"children":28259},{},[28260],{"type":51,"value":28261},"## Query guidelines\n",{"type":42,"tag":391,"props":28263,"children":28264},{"class":393,"line":20280},[28265],{"type":42,"tag":391,"props":28266,"children":28267},{},[28268],{"type":51,"value":28269},"- For revenue, always use **NMV** (net of returns) unless explicitly asked for GMV\n",{"type":42,"tag":391,"props":28271,"children":28272},{"class":393,"line":20288},[28273],{"type":42,"tag":391,"props":28274,"children":28275},{},[28276],{"type":51,"value":28277},"- Exclude test orders: `WHERE customer_email NOT LIKE '%@test.%'`\n",{"type":42,"tag":391,"props":28279,"children":28280},{"class":393,"line":20314},[28281],{"type":42,"tag":391,"props":28282,"children":28283},{},[28284],{"type":51,"value":28285},"- Use a **12-month lookback window** for LTV calculations by default\n",{"type":42,"tag":391,"props":28287,"children":28288},{"class":393,"line":20334},[28289],{"type":42,"tag":391,"props":28290,"children":28291},{},[28292],{"type":51,"value":28293},"- For marketing attribution, use `reports.rpt_marketing_roi` - do not attempt to join raw ad data with orders directly\n",{"type":42,"tag":391,"props":28295,"children":28296},{"class":393,"line":20355},[28297],{"type":42,"tag":391,"props":28298,"children":28299},{},[28300],{"type":51,"value":28301},"- For daily KPIs, use `reports.rpt_daily_kpis` as the single source of truth\n",{"type":42,"tag":391,"props":28303,"children":28304},{"class":393,"line":20376},[28305],{"type":42,"tag":391,"props":28306,"children":28307},{},[28308],{"type":51,"value":28309},"- Prefer `staging.*` tables over `raw.*` for any analysis\n",{"type":42,"tag":569,"props":28311,"children":28312},{"v-slot:bigquery":7},[28313],{"type":42,"tag":381,"props":28314,"children":28316},{"className":27878,"code":28315,"language":102,"meta":7,"style":7},"# AGENTS.md\n\n## Data access\n- Use `bruin query --connection bigquery-default --query \"\u003CSQL>\"` for all data access\n- Always show the SQL query and explain your reasoning before executing it\n- Add `LIMIT 10` to your SQL when exploring unfamiliar tables or testing complex queries\n- Read the `assets\u002F` directory to understand available tables and their schemas before querying\n- This is a **read-only** environment - never run INSERT, UPDATE, DELETE, or DROP statements\n\n\u003C!-- Customize this list to match the sources you actually connected in Step 1.\n     The example below includes Shopify, Stripe, Klaviyo, Facebook Ads, and GA4.\n     Remove any you don't use and add any additional sources (e.g., TikTok Ads, Pinterest, Zendesk). -->\n## Project overview\nThis is an ecommerce analytics pipeline ingesting data from Shopify (orders,\ncustomers, products, inventory), Stripe (payments, refunds, payouts),\nKlaviyo (email campaigns, flows), Facebook Ads (campaigns, ad insights),\nand GA4 (sessions, events) into your data warehouse.\n\nThe pipeline has three layers:\n- **raw.*** - ingested data from SaaS sources (do not query directly for reporting)\n- **staging.*** - cleaned, deduplicated, joined tables\n- **reports.*** - aggregated business metrics and KPIs\n\n## Domain glossary\n- **AOV** - Average Order Value: net revenue divided by number of paid orders\n- **GMV** - Gross Merchandise Value: total order value before returns and discounts\n- **NMV** - Net Merchandise Value: GMV minus returns, cancellations, and discounts\n- **ROAS** - Return on Ad Spend: attributed revenue divided by ad spend\n- **CAC** - Customer Acquisition Cost: total marketing spend divided by new customers\n- **LTV** - Lifetime Value: total revenue from a customer across all orders\n- **Conversion Rate** - percentage of website sessions resulting in a completed purchase\n- **Cart Abandonment** - percentage of sessions with add-to-cart but no purchase\n- **Repeat Purchase Rate** - percentage of customers with more than one order\n- **Churn** - customers with no order in the past 90 days\n- **SKU** - Stock Keeping Unit: unique identifier for a product variant\n- **Basket Size** - number of items in a single order\n\n## Data caveats\n- All timestamps are in **UTC**\n- Stripe amounts are in **cents** - divide by 100 for dollar values\n- `customer_email` is `NULL` for guest checkouts (~15-20% of orders)\n- Refund window is **30 days** - recent revenue figures may be revised downward\n- Inventory data syncs every **4 hours** - not real-time\n- Shopify `order_total` includes tax and shipping; use `subtotal` for product revenue only\n- Facebook Ads data has a **24-48 hour attribution delay**\n- Klaviyo campaigns have no direct spend - they appear with $0 spend in marketing reports\n\n## Query guidelines\n- For revenue, always use **NMV** (net of returns) unless explicitly asked for GMV\n- Exclude test orders: `WHERE customer_email NOT LIKE '%@test.%'`\n- Use a **12-month lookback window** for LTV calculations by default\n- For marketing attribution, use `reports.rpt_marketing_roi` - do not attempt to join raw ad data with orders directly\n- For daily KPIs, use `reports.rpt_daily_kpis` as the single source of truth\n- Prefer `staging.*` tables over `raw.*` for any analysis\n",[28317],{"type":42,"tag":240,"props":28318,"children":28319},{"__ignoreMap":7},[28320,28327,28334,28341,28349,28356,28363,28370,28377,28384,28391,28398,28405,28412,28419,28426,28433,28440,28447,28454,28461,28468,28475,28482,28489,28496,28503,28510,28517,28524,28531,28538,28545,28552,28559,28566,28573,28580,28587,28594,28601,28608,28615,28622,28629,28636,28643,28650,28657,28664,28671,28678,28685,28692],{"type":42,"tag":391,"props":28321,"children":28322},{"class":393,"line":176},[28323],{"type":42,"tag":391,"props":28324,"children":28325},{},[28326],{"type":51,"value":27891},{"type":42,"tag":391,"props":28328,"children":28329},{"class":393,"line":99},[28330],{"type":42,"tag":391,"props":28331,"children":28332},{"emptyLinePlaceholder":13},[28333],{"type":51,"value":6972},{"type":42,"tag":391,"props":28335,"children":28336},{"class":393,"line":439},[28337],{"type":42,"tag":391,"props":28338,"children":28339},{},[28340],{"type":51,"value":27906},{"type":42,"tag":391,"props":28342,"children":28343},{"class":393,"line":947},[28344],{"type":42,"tag":391,"props":28345,"children":28346},{},[28347],{"type":51,"value":28348},"- Use `bruin query --connection bigquery-default --query \"\u003CSQL>\"` for all data access\n",{"type":42,"tag":391,"props":28350,"children":28351},{"class":393,"line":960},[28352],{"type":42,"tag":391,"props":28353,"children":28354},{},[28355],{"type":51,"value":27922},{"type":42,"tag":391,"props":28357,"children":28358},{"class":393,"line":984},[28359],{"type":42,"tag":391,"props":28360,"children":28361},{},[28362],{"type":51,"value":27930},{"type":42,"tag":391,"props":28364,"children":28365},{"class":393,"line":1002},[28366],{"type":42,"tag":391,"props":28367,"children":28368},{},[28369],{"type":51,"value":27938},{"type":42,"tag":391,"props":28371,"children":28372},{"class":393,"line":165},[28373],{"type":42,"tag":391,"props":28374,"children":28375},{},[28376],{"type":51,"value":27946},{"type":42,"tag":391,"props":28378,"children":28379},{"class":393,"line":2235},[28380],{"type":42,"tag":391,"props":28381,"children":28382},{"emptyLinePlaceholder":13},[28383],{"type":51,"value":6972},{"type":42,"tag":391,"props":28385,"children":28386},{"class":393,"line":6843},[28387],{"type":42,"tag":391,"props":28388,"children":28389},{},[28390],{"type":51,"value":27961},{"type":42,"tag":391,"props":28392,"children":28393},{"class":393,"line":6852},[28394],{"type":42,"tag":391,"props":28395,"children":28396},{},[28397],{"type":51,"value":27969},{"type":42,"tag":391,"props":28399,"children":28400},{"class":393,"line":6861},[28401],{"type":42,"tag":391,"props":28402,"children":28403},{},[28404],{"type":51,"value":27977},{"type":42,"tag":391,"props":28406,"children":28407},{"class":393,"line":6870},[28408],{"type":42,"tag":391,"props":28409,"children":28410},{},[28411],{"type":51,"value":27985},{"type":42,"tag":391,"props":28413,"children":28414},{"class":393,"line":6879},[28415],{"type":42,"tag":391,"props":28416,"children":28417},{},[28418],{"type":51,"value":27993},{"type":42,"tag":391,"props":28420,"children":28421},{"class":393,"line":1707},[28422],{"type":42,"tag":391,"props":28423,"children":28424},{},[28425],{"type":51,"value":28001},{"type":42,"tag":391,"props":28427,"children":28428},{"class":393,"line":6896},[28429],{"type":42,"tag":391,"props":28430,"children":28431},{},[28432],{"type":51,"value":28009},{"type":42,"tag":391,"props":28434,"children":28435},{"class":393,"line":6905},[28436],{"type":42,"tag":391,"props":28437,"children":28438},{},[28439],{"type":51,"value":28017},{"type":42,"tag":391,"props":28441,"children":28442},{"class":393,"line":6913},[28443],{"type":42,"tag":391,"props":28444,"children":28445},{"emptyLinePlaceholder":13},[28446],{"type":51,"value":6972},{"type":42,"tag":391,"props":28448,"children":28449},{"class":393,"line":6921},[28450],{"type":42,"tag":391,"props":28451,"children":28452},{},[28453],{"type":51,"value":28032},{"type":42,"tag":391,"props":28455,"children":28456},{"class":393,"line":6930},[28457],{"type":42,"tag":391,"props":28458,"children":28459},{},[28460],{"type":51,"value":28040},{"type":42,"tag":391,"props":28462,"children":28463},{"class":393,"line":6939},[28464],{"type":42,"tag":391,"props":28465,"children":28466},{},[28467],{"type":51,"value":28048},{"type":42,"tag":391,"props":28469,"children":28470},{"class":393,"line":6948},[28471],{"type":42,"tag":391,"props":28472,"children":28473},{},[28474],{"type":51,"value":28056},{"type":42,"tag":391,"props":28476,"children":28477},{"class":393,"line":6957},[28478],{"type":42,"tag":391,"props":28479,"children":28480},{"emptyLinePlaceholder":13},[28481],{"type":51,"value":6972},{"type":42,"tag":391,"props":28483,"children":28484},{"class":393,"line":6966},[28485],{"type":42,"tag":391,"props":28486,"children":28487},{},[28488],{"type":51,"value":28071},{"type":42,"tag":391,"props":28490,"children":28491},{"class":393,"line":6975},[28492],{"type":42,"tag":391,"props":28493,"children":28494},{},[28495],{"type":51,"value":28079},{"type":42,"tag":391,"props":28497,"children":28498},{"class":393,"line":6984},[28499],{"type":42,"tag":391,"props":28500,"children":28501},{},[28502],{"type":51,"value":28087},{"type":42,"tag":391,"props":28504,"children":28505},{"class":393,"line":7012},[28506],{"type":42,"tag":391,"props":28507,"children":28508},{},[28509],{"type":51,"value":28095},{"type":42,"tag":391,"props":28511,"children":28512},{"class":393,"line":7034},[28513],{"type":42,"tag":391,"props":28514,"children":28515},{},[28516],{"type":51,"value":28103},{"type":42,"tag":391,"props":28518,"children":28519},{"class":393,"line":7060},[28520],{"type":42,"tag":391,"props":28521,"children":28522},{},[28523],{"type":51,"value":28111},{"type":42,"tag":391,"props":28525,"children":28526},{"class":393,"line":7086},[28527],{"type":42,"tag":391,"props":28528,"children":28529},{},[28530],{"type":51,"value":28119},{"type":42,"tag":391,"props":28532,"children":28533},{"class":393,"line":7111},[28534],{"type":42,"tag":391,"props":28535,"children":28536},{},[28537],{"type":51,"value":28127},{"type":42,"tag":391,"props":28539,"children":28540},{"class":393,"line":7132},[28541],{"type":42,"tag":391,"props":28542,"children":28543},{},[28544],{"type":51,"value":28135},{"type":42,"tag":391,"props":28546,"children":28547},{"class":393,"line":7202},[28548],{"type":42,"tag":391,"props":28549,"children":28550},{},[28551],{"type":51,"value":28143},{"type":42,"tag":391,"props":28553,"children":28554},{"class":393,"line":7264},[28555],{"type":42,"tag":391,"props":28556,"children":28557},{},[28558],{"type":51,"value":28151},{"type":42,"tag":391,"props":28560,"children":28561},{"class":393,"line":7326},[28562],{"type":42,"tag":391,"props":28563,"children":28564},{},[28565],{"type":51,"value":28159},{"type":42,"tag":391,"props":28567,"children":28568},{"class":393,"line":7388},[28569],{"type":42,"tag":391,"props":28570,"children":28571},{},[28572],{"type":51,"value":28167},{"type":42,"tag":391,"props":28574,"children":28575},{"class":393,"line":7409},[28576],{"type":42,"tag":391,"props":28577,"children":28578},{"emptyLinePlaceholder":13},[28579],{"type":51,"value":6972},{"type":42,"tag":391,"props":28581,"children":28582},{"class":393,"line":7430},[28583],{"type":42,"tag":391,"props":28584,"children":28585},{},[28586],{"type":51,"value":28182},{"type":42,"tag":391,"props":28588,"children":28589},{"class":393,"line":7451},[28590],{"type":42,"tag":391,"props":28591,"children":28592},{},[28593],{"type":51,"value":28190},{"type":42,"tag":391,"props":28595,"children":28596},{"class":393,"line":7497},[28597],{"type":42,"tag":391,"props":28598,"children":28599},{},[28600],{"type":51,"value":28198},{"type":42,"tag":391,"props":28602,"children":28603},{"class":393,"line":7523},[28604],{"type":42,"tag":391,"props":28605,"children":28606},{},[28607],{"type":51,"value":28206},{"type":42,"tag":391,"props":28609,"children":28610},{"class":393,"line":7549},[28611],{"type":42,"tag":391,"props":28612,"children":28613},{},[28614],{"type":51,"value":28214},{"type":42,"tag":391,"props":28616,"children":28617},{"class":393,"line":7577},[28618],{"type":42,"tag":391,"props":28619,"children":28620},{},[28621],{"type":51,"value":28222},{"type":42,"tag":391,"props":28623,"children":28624},{"class":393,"line":7603},[28625],{"type":42,"tag":391,"props":28626,"children":28627},{},[28628],{"type":51,"value":28230},{"type":42,"tag":391,"props":28630,"children":28631},{"class":393,"line":7644},[28632],{"type":42,"tag":391,"props":28633,"children":28634},{},[28635],{"type":51,"value":28238},{"type":42,"tag":391,"props":28637,"children":28638},{"class":393,"line":8522},[28639],{"type":42,"tag":391,"props":28640,"children":28641},{},[28642],{"type":51,"value":28246},{"type":42,"tag":391,"props":28644,"children":28645},{"class":393,"line":8581},[28646],{"type":42,"tag":391,"props":28647,"children":28648},{"emptyLinePlaceholder":13},[28649],{"type":51,"value":6972},{"type":42,"tag":391,"props":28651,"children":28652},{"class":393,"line":20272},[28653],{"type":42,"tag":391,"props":28654,"children":28655},{},[28656],{"type":51,"value":28261},{"type":42,"tag":391,"props":28658,"children":28659},{"class":393,"line":20280},[28660],{"type":42,"tag":391,"props":28661,"children":28662},{},[28663],{"type":51,"value":28269},{"type":42,"tag":391,"props":28665,"children":28666},{"class":393,"line":20288},[28667],{"type":42,"tag":391,"props":28668,"children":28669},{},[28670],{"type":51,"value":28277},{"type":42,"tag":391,"props":28672,"children":28673},{"class":393,"line":20314},[28674],{"type":42,"tag":391,"props":28675,"children":28676},{},[28677],{"type":51,"value":28285},{"type":42,"tag":391,"props":28679,"children":28680},{"class":393,"line":20334},[28681],{"type":42,"tag":391,"props":28682,"children":28683},{},[28684],{"type":51,"value":28293},{"type":42,"tag":391,"props":28686,"children":28687},{"class":393,"line":20355},[28688],{"type":42,"tag":391,"props":28689,"children":28690},{},[28691],{"type":51,"value":28301},{"type":42,"tag":391,"props":28693,"children":28694},{"class":393,"line":20376},[28695],{"type":42,"tag":391,"props":28696,"children":28697},{},[28698],{"type":51,"value":28309},{"type":42,"tag":569,"props":28700,"children":28701},{"v-slot:snowflake":7},[28702],{"type":42,"tag":381,"props":28703,"children":28705},{"className":27878,"code":28704,"language":102,"meta":7,"style":7},"# AGENTS.md\n\n## Data access\n- Use `bruin query --connection snowflake-default --query \"\u003CSQL>\"` for all data access\n- Always show the SQL query and explain your reasoning before executing it\n- Add `LIMIT 10` to your SQL when exploring unfamiliar tables or testing complex queries\n- Read the `assets\u002F` directory to understand available tables and their schemas before querying\n- This is a **read-only** environment - never run INSERT, UPDATE, DELETE, or DROP statements\n\n\u003C!-- Customize this list to match the sources you actually connected in Step 1.\n     The example below includes Shopify, Stripe, Klaviyo, Facebook Ads, and GA4.\n     Remove any you don't use and add any additional sources (e.g., TikTok Ads, Pinterest, Zendesk). -->\n## Project overview\nThis is an ecommerce analytics pipeline ingesting data from Shopify (orders,\ncustomers, products, inventory), Stripe (payments, refunds, payouts),\nKlaviyo (email campaigns, flows), Facebook Ads (campaigns, ad insights),\nand GA4 (sessions, events) into your data warehouse.\n\nThe pipeline has three layers:\n- **raw.*** - ingested data from SaaS sources (do not query directly for reporting)\n- **staging.*** - cleaned, deduplicated, joined tables\n- **reports.*** - aggregated business metrics and KPIs\n\n## Domain glossary\n- **AOV** - Average Order Value: net revenue divided by number of paid orders\n- **GMV** - Gross Merchandise Value: total order value before returns and discounts\n- **NMV** - Net Merchandise Value: GMV minus returns, cancellations, and discounts\n- **ROAS** - Return on Ad Spend: attributed revenue divided by ad spend\n- **CAC** - Customer Acquisition Cost: total marketing spend divided by new customers\n- **LTV** - Lifetime Value: total revenue from a customer across all orders\n- **Conversion Rate** - percentage of website sessions resulting in a completed purchase\n- **Cart Abandonment** - percentage of sessions with add-to-cart but no purchase\n- **Repeat Purchase Rate** - percentage of customers with more than one order\n- **Churn** - customers with no order in the past 90 days\n- **SKU** - Stock Keeping Unit: unique identifier for a product variant\n- **Basket Size** - number of items in a single order\n\n## Data caveats\n- All timestamps are in **UTC**\n- Stripe amounts are in **cents** - divide by 100 for dollar values\n- `customer_email` is `NULL` for guest checkouts (~15-20% of orders)\n- Refund window is **30 days** - recent revenue figures may be revised downward\n- Inventory data syncs every **4 hours** - not real-time\n- Shopify `order_total` includes tax and shipping; use `subtotal` for product revenue only\n- Facebook Ads data has a **24-48 hour attribution delay**\n- Klaviyo campaigns have no direct spend - they appear with $0 spend in marketing reports\n\n## Query guidelines\n- For revenue, always use **NMV** (net of returns) unless explicitly asked for GMV\n- Exclude test orders: `WHERE customer_email NOT LIKE '%@test.%'`\n- Use a **12-month lookback window** for LTV calculations by default\n- For marketing attribution, use `reports.rpt_marketing_roi` - do not attempt to join raw ad data with orders directly\n- For daily KPIs, use `reports.rpt_daily_kpis` as the single source of truth\n- Prefer `staging.*` tables over `raw.*` for any analysis\n",[28706],{"type":42,"tag":240,"props":28707,"children":28708},{"__ignoreMap":7},[28709,28716,28723,28730,28738,28745,28752,28759,28766,28773,28780,28787,28794,28801,28808,28815,28822,28829,28836,28843,28850,28857,28864,28871,28878,28885,28892,28899,28906,28913,28920,28927,28934,28941,28948,28955,28962,28969,28976,28983,28990,28997,29004,29011,29018,29025,29032,29039,29046,29053,29060,29067,29074,29081],{"type":42,"tag":391,"props":28710,"children":28711},{"class":393,"line":176},[28712],{"type":42,"tag":391,"props":28713,"children":28714},{},[28715],{"type":51,"value":27891},{"type":42,"tag":391,"props":28717,"children":28718},{"class":393,"line":99},[28719],{"type":42,"tag":391,"props":28720,"children":28721},{"emptyLinePlaceholder":13},[28722],{"type":51,"value":6972},{"type":42,"tag":391,"props":28724,"children":28725},{"class":393,"line":439},[28726],{"type":42,"tag":391,"props":28727,"children":28728},{},[28729],{"type":51,"value":27906},{"type":42,"tag":391,"props":28731,"children":28732},{"class":393,"line":947},[28733],{"type":42,"tag":391,"props":28734,"children":28735},{},[28736],{"type":51,"value":28737},"- Use `bruin query --connection snowflake-default --query \"\u003CSQL>\"` for all data access\n",{"type":42,"tag":391,"props":28739,"children":28740},{"class":393,"line":960},[28741],{"type":42,"tag":391,"props":28742,"children":28743},{},[28744],{"type":51,"value":27922},{"type":42,"tag":391,"props":28746,"children":28747},{"class":393,"line":984},[28748],{"type":42,"tag":391,"props":28749,"children":28750},{},[28751],{"type":51,"value":27930},{"type":42,"tag":391,"props":28753,"children":28754},{"class":393,"line":1002},[28755],{"type":42,"tag":391,"props":28756,"children":28757},{},[28758],{"type":51,"value":27938},{"type":42,"tag":391,"props":28760,"children":28761},{"class":393,"line":165},[28762],{"type":42,"tag":391,"props":28763,"children":28764},{},[28765],{"type":51,"value":27946},{"type":42,"tag":391,"props":28767,"children":28768},{"class":393,"line":2235},[28769],{"type":42,"tag":391,"props":28770,"children":28771},{"emptyLinePlaceholder":13},[28772],{"type":51,"value":6972},{"type":42,"tag":391,"props":28774,"children":28775},{"class":393,"line":6843},[28776],{"type":42,"tag":391,"props":28777,"children":28778},{},[28779],{"type":51,"value":27961},{"type":42,"tag":391,"props":28781,"children":28782},{"class":393,"line":6852},[28783],{"type":42,"tag":391,"props":28784,"children":28785},{},[28786],{"type":51,"value":27969},{"type":42,"tag":391,"props":28788,"children":28789},{"class":393,"line":6861},[28790],{"type":42,"tag":391,"props":28791,"children":28792},{},[28793],{"type":51,"value":27977},{"type":42,"tag":391,"props":28795,"children":28796},{"class":393,"line":6870},[28797],{"type":42,"tag":391,"props":28798,"children":28799},{},[28800],{"type":51,"value":27985},{"type":42,"tag":391,"props":28802,"children":28803},{"class":393,"line":6879},[28804],{"type":42,"tag":391,"props":28805,"children":28806},{},[28807],{"type":51,"value":27993},{"type":42,"tag":391,"props":28809,"children":28810},{"class":393,"line":1707},[28811],{"type":42,"tag":391,"props":28812,"children":28813},{},[28814],{"type":51,"value":28001},{"type":42,"tag":391,"props":28816,"children":28817},{"class":393,"line":6896},[28818],{"type":42,"tag":391,"props":28819,"children":28820},{},[28821],{"type":51,"value":28009},{"type":42,"tag":391,"props":28823,"children":28824},{"class":393,"line":6905},[28825],{"type":42,"tag":391,"props":28826,"children":28827},{},[28828],{"type":51,"value":28017},{"type":42,"tag":391,"props":28830,"children":28831},{"class":393,"line":6913},[28832],{"type":42,"tag":391,"props":28833,"children":28834},{"emptyLinePlaceholder":13},[28835],{"type":51,"value":6972},{"type":42,"tag":391,"props":28837,"children":28838},{"class":393,"line":6921},[28839],{"type":42,"tag":391,"props":28840,"children":28841},{},[28842],{"type":51,"value":28032},{"type":42,"tag":391,"props":28844,"children":28845},{"class":393,"line":6930},[28846],{"type":42,"tag":391,"props":28847,"children":28848},{},[28849],{"type":51,"value":28040},{"type":42,"tag":391,"props":28851,"children":28852},{"class":393,"line":6939},[28853],{"type":42,"tag":391,"props":28854,"children":28855},{},[28856],{"type":51,"value":28048},{"type":42,"tag":391,"props":28858,"children":28859},{"class":393,"line":6948},[28860],{"type":42,"tag":391,"props":28861,"children":28862},{},[28863],{"type":51,"value":28056},{"type":42,"tag":391,"props":28865,"children":28866},{"class":393,"line":6957},[28867],{"type":42,"tag":391,"props":28868,"children":28869},{"emptyLinePlaceholder":13},[28870],{"type":51,"value":6972},{"type":42,"tag":391,"props":28872,"children":28873},{"class":393,"line":6966},[28874],{"type":42,"tag":391,"props":28875,"children":28876},{},[28877],{"type":51,"value":28071},{"type":42,"tag":391,"props":28879,"children":28880},{"class":393,"line":6975},[28881],{"type":42,"tag":391,"props":28882,"children":28883},{},[28884],{"type":51,"value":28079},{"type":42,"tag":391,"props":28886,"children":28887},{"class":393,"line":6984},[28888],{"type":42,"tag":391,"props":28889,"children":28890},{},[28891],{"type":51,"value":28087},{"type":42,"tag":391,"props":28893,"children":28894},{"class":393,"line":7012},[28895],{"type":42,"tag":391,"props":28896,"children":28897},{},[28898],{"type":51,"value":28095},{"type":42,"tag":391,"props":28900,"children":28901},{"class":393,"line":7034},[28902],{"type":42,"tag":391,"props":28903,"children":28904},{},[28905],{"type":51,"value":28103},{"type":42,"tag":391,"props":28907,"children":28908},{"class":393,"line":7060},[28909],{"type":42,"tag":391,"props":28910,"children":28911},{},[28912],{"type":51,"value":28111},{"type":42,"tag":391,"props":28914,"children":28915},{"class":393,"line":7086},[28916],{"type":42,"tag":391,"props":28917,"children":28918},{},[28919],{"type":51,"value":28119},{"type":42,"tag":391,"props":28921,"children":28922},{"class":393,"line":7111},[28923],{"type":42,"tag":391,"props":28924,"children":28925},{},[28926],{"type":51,"value":28127},{"type":42,"tag":391,"props":28928,"children":28929},{"class":393,"line":7132},[28930],{"type":42,"tag":391,"props":28931,"children":28932},{},[28933],{"type":51,"value":28135},{"type":42,"tag":391,"props":28935,"children":28936},{"class":393,"line":7202},[28937],{"type":42,"tag":391,"props":28938,"children":28939},{},[28940],{"type":51,"value":28143},{"type":42,"tag":391,"props":28942,"children":28943},{"class":393,"line":7264},[28944],{"type":42,"tag":391,"props":28945,"children":28946},{},[28947],{"type":51,"value":28151},{"type":42,"tag":391,"props":28949,"children":28950},{"class":393,"line":7326},[28951],{"type":42,"tag":391,"props":28952,"children":28953},{},[28954],{"type":51,"value":28159},{"type":42,"tag":391,"props":28956,"children":28957},{"class":393,"line":7388},[28958],{"type":42,"tag":391,"props":28959,"children":28960},{},[28961],{"type":51,"value":28167},{"type":42,"tag":391,"props":28963,"children":28964},{"class":393,"line":7409},[28965],{"type":42,"tag":391,"props":28966,"children":28967},{"emptyLinePlaceholder":13},[28968],{"type":51,"value":6972},{"type":42,"tag":391,"props":28970,"children":28971},{"class":393,"line":7430},[28972],{"type":42,"tag":391,"props":28973,"children":28974},{},[28975],{"type":51,"value":28182},{"type":42,"tag":391,"props":28977,"children":28978},{"class":393,"line":7451},[28979],{"type":42,"tag":391,"props":28980,"children":28981},{},[28982],{"type":51,"value":28190},{"type":42,"tag":391,"props":28984,"children":28985},{"class":393,"line":7497},[28986],{"type":42,"tag":391,"props":28987,"children":28988},{},[28989],{"type":51,"value":28198},{"type":42,"tag":391,"props":28991,"children":28992},{"class":393,"line":7523},[28993],{"type":42,"tag":391,"props":28994,"children":28995},{},[28996],{"type":51,"value":28206},{"type":42,"tag":391,"props":28998,"children":28999},{"class":393,"line":7549},[29000],{"type":42,"tag":391,"props":29001,"children":29002},{},[29003],{"type":51,"value":28214},{"type":42,"tag":391,"props":29005,"children":29006},{"class":393,"line":7577},[29007],{"type":42,"tag":391,"props":29008,"children":29009},{},[29010],{"type":51,"value":28222},{"type":42,"tag":391,"props":29012,"children":29013},{"class":393,"line":7603},[29014],{"type":42,"tag":391,"props":29015,"children":29016},{},[29017],{"type":51,"value":28230},{"type":42,"tag":391,"props":29019,"children":29020},{"class":393,"line":7644},[29021],{"type":42,"tag":391,"props":29022,"children":29023},{},[29024],{"type":51,"value":28238},{"type":42,"tag":391,"props":29026,"children":29027},{"class":393,"line":8522},[29028],{"type":42,"tag":391,"props":29029,"children":29030},{},[29031],{"type":51,"value":28246},{"type":42,"tag":391,"props":29033,"children":29034},{"class":393,"line":8581},[29035],{"type":42,"tag":391,"props":29036,"children":29037},{"emptyLinePlaceholder":13},[29038],{"type":51,"value":6972},{"type":42,"tag":391,"props":29040,"children":29041},{"class":393,"line":20272},[29042],{"type":42,"tag":391,"props":29043,"children":29044},{},[29045],{"type":51,"value":28261},{"type":42,"tag":391,"props":29047,"children":29048},{"class":393,"line":20280},[29049],{"type":42,"tag":391,"props":29050,"children":29051},{},[29052],{"type":51,"value":28269},{"type":42,"tag":391,"props":29054,"children":29055},{"class":393,"line":20288},[29056],{"type":42,"tag":391,"props":29057,"children":29058},{},[29059],{"type":51,"value":28277},{"type":42,"tag":391,"props":29061,"children":29062},{"class":393,"line":20314},[29063],{"type":42,"tag":391,"props":29064,"children":29065},{},[29066],{"type":51,"value":28285},{"type":42,"tag":391,"props":29068,"children":29069},{"class":393,"line":20334},[29070],{"type":42,"tag":391,"props":29071,"children":29072},{},[29073],{"type":51,"value":28293},{"type":42,"tag":391,"props":29075,"children":29076},{"class":393,"line":20355},[29077],{"type":42,"tag":391,"props":29078,"children":29079},{},[29080],{"type":51,"value":28301},{"type":42,"tag":391,"props":29082,"children":29083},{"class":393,"line":20376},[29084],{"type":42,"tag":391,"props":29085,"children":29086},{},[29087],{"type":51,"value":28309},{"type":42,"tag":361,"props":29089,"children":29091},{"id":29090},"_3-ask-claude-code-real-business-questions",[29092],{"type":51,"value":29093},"3) Ask Claude Code real business questions",{"type":42,"tag":43,"props":29095,"children":29096},{},[29097,29099,29104],{"type":51,"value":29098},"With the Bruin MCP connected and ",{"type":42,"tag":240,"props":29100,"children":29102},{"className":29101},[],[29103],{"type":51,"value":27724},{"type":51,"value":29105}," in place, Claude Code is now your ecommerce data analyst. Try these:",{"type":42,"tag":1574,"props":29107,"children":29108},{},[29109],{"type":42,"tag":43,"props":29110,"children":29111},{},[29112],{"type":51,"value":29113},"What was our revenue last week compared to the week before? Break it down by day.",{"type":42,"tag":1574,"props":29115,"children":29116},{},[29117],{"type":42,"tag":43,"props":29118,"children":29119},{},[29120],{"type":51,"value":29121},"Which marketing channel had the best ROAS in the past 30 days?",{"type":42,"tag":1574,"props":29123,"children":29124},{},[29125],{"type":42,"tag":43,"props":29126,"children":29127},{},[29128],{"type":51,"value":29129},"Show me the customer cohort retention curve for customers acquired in January.",{"type":42,"tag":1574,"props":29131,"children":29132},{},[29133],{"type":42,"tag":43,"props":29134,"children":29135},{},[29136],{"type":51,"value":29137},"What are our top 10 products by revenue this month, and what's their cancellation rate?",{"type":42,"tag":1574,"props":29139,"children":29140},{},[29141],{"type":42,"tag":43,"props":29142,"children":29143},{},[29144,29149,29151,29157,29159,29164,29166,29171],{"type":42,"tag":47,"props":29145,"children":29146},{},[29147],{"type":51,"value":29148},"Note:",{"type":51,"value":29150}," The ",{"type":42,"tag":240,"props":29152,"children":29154},{"className":29153},[],[29155],{"type":51,"value":29156},"rpt_product_performance",{"type":51,"value":29158}," report currently shows catalog data from ",{"type":42,"tag":240,"props":29160,"children":29162},{"className":29161},[],[29163],{"type":51,"value":19328},{"type":51,"value":29165}," only. To get revenue-per-product metrics, expand the pipeline with a ",{"type":42,"tag":240,"props":29167,"children":29169},{"className":29168},[],[29170],{"type":51,"value":6616},{"type":51,"value":29172}," asset that flattens Shopify's nested line item JSON, then ask Claude Code to rebuild this report with order-level data.",{"type":42,"tag":1574,"props":29174,"children":29175},{},[29176],{"type":42,"tag":43,"props":29177,"children":29178},{},[29179],{"type":51,"value":29180},"What's our conversion rate trend over the past 3 months?",{"type":42,"tag":43,"props":29182,"children":29183},{},[29184,29186,29191],{"type":51,"value":29185},"Claude Code uses the Bruin MCP to query your warehouse directly, reading the ",{"type":42,"tag":240,"props":29187,"children":29189},{"className":29188},[],[29190],{"type":51,"value":27724},{"type":51,"value":29192}," for context on your domain terms and data quirks before writing SQL.",{"type":42,"tag":361,"props":29194,"children":29196},{"id":29195},"_4-iterate-on-agentsmd",[29197],{"type":51,"value":29198},"4) Iterate on AGENTS.md",{"type":42,"tag":43,"props":29200,"children":29201},{},[29202,29204,29209],{"type":51,"value":29203},"When the agent gets something wrong - wrong column, wrong metric definition, expensive query - add a correction to ",{"type":42,"tag":240,"props":29205,"children":29207},{"className":29206},[],[29208],{"type":51,"value":27724},{"type":51,"value":29210},". For example:",{"type":42,"tag":381,"props":29212,"children":29214},{"className":27878,"code":29213,"language":102,"meta":7,"style":7},"## Known issues\n- The `stg_orders.order_total` includes tax. For product-only revenue, use `subtotal` instead.\n- When computing repeat purchase rate, count by `customer_email`, not by `order_id`.\n",[29215],{"type":42,"tag":240,"props":29216,"children":29217},{"__ignoreMap":7},[29218,29226,29234],{"type":42,"tag":391,"props":29219,"children":29220},{"class":393,"line":176},[29221],{"type":42,"tag":391,"props":29222,"children":29223},{},[29224],{"type":51,"value":29225},"## Known issues\n",{"type":42,"tag":391,"props":29227,"children":29228},{"class":393,"line":99},[29229],{"type":42,"tag":391,"props":29230,"children":29231},{},[29232],{"type":51,"value":29233},"- The `stg_orders.order_total` includes tax. For product-only revenue, use `subtotal` instead.\n",{"type":42,"tag":391,"props":29235,"children":29236},{"class":393,"line":439},[29237],{"type":42,"tag":391,"props":29238,"children":29239},{},[29240],{"type":51,"value":29241},"- When computing repeat purchase rate, count by `customer_email`, not by `order_id`.\n",{"type":42,"tag":43,"props":29243,"children":29244},{},[29245,29247,29252],{"type":51,"value":29246},"The more you use it, the better your ",{"type":42,"tag":240,"props":29248,"children":29250},{"className":29249},[],[29251],{"type":51,"value":27724},{"type":51,"value":29253}," gets. When the agent makes a mistake, that's a sign something is missing from the context file.",{"type":42,"tag":361,"props":29255,"children":29257},{"id":29256},"_5-deploy-to-bruin-cloud",[29258],{"type":51,"value":29259},"5) Deploy to Bruin Cloud",{"type":42,"tag":43,"props":29261,"children":29262},{},[29263],{"type":51,"value":29264},"Now let's make this available to the whole team - in Slack or Teams, not just locally.",{"type":42,"tag":43,"props":29266,"children":29267},{},[29268],{"type":42,"tag":47,"props":29269,"children":29270},{},[29271],{"type":51,"value":29272},"Push your project to GitHub:",{"type":42,"tag":1574,"props":29274,"children":29275},{},[29276],{"type":42,"tag":43,"props":29277,"children":29278},{},[29279,29283,29284,29289,29291,29296,29298,29303],{"type":42,"tag":47,"props":29280,"children":29281},{},[29282],{"type":51,"value":29148},{"type":51,"value":656},{"type":42,"tag":240,"props":29285,"children":29287},{"className":29286},[],[29288],{"type":51,"value":490},{"type":51,"value":29290}," contains your connection credentials. ",{"type":42,"tag":240,"props":29292,"children":29294},{"className":29293},[],[29295],{"type":51,"value":377},{"type":51,"value":29297}," adds it to ",{"type":42,"tag":240,"props":29299,"children":29301},{"className":29300},[],[29302],{"type":51,"value":539},{"type":51,"value":29304}," by default - verify it's there before pushing.",{"type":42,"tag":381,"props":29306,"children":29308},{"className":383,"code":29307,"language":385,"meta":7,"style":7},"git add -A -- ':!.bruin.yml'\ngit commit -m \"ecommerce analytics pipeline\"\ngit remote add origin https:\u002F\u002Fgithub.com\u002Fyour-org\u002Fecommerce-analytics.git\ngit push -u origin main\n",[29309],{"type":42,"tag":240,"props":29310,"children":29311},{"__ignoreMap":7},[29312,29337,29359,29385],{"type":42,"tag":391,"props":29313,"children":29314},{"class":393,"line":176},[29315,29319,29323,29328,29332],{"type":42,"tag":391,"props":29316,"children":29317},{"style":397},[29318],{"type":51,"value":431},{"type":42,"tag":391,"props":29320,"children":29321},{"style":403},[29322],{"type":51,"value":1548},{"type":42,"tag":391,"props":29324,"children":29325},{"style":415},[29326],{"type":51,"value":29327}," -A",{"type":42,"tag":391,"props":29329,"children":29330},{"style":415},[29331],{"type":51,"value":1558},{"type":42,"tag":391,"props":29333,"children":29334},{"style":403},[29335],{"type":51,"value":29336}," ':!.bruin.yml'\n",{"type":42,"tag":391,"props":29338,"children":29339},{"class":393,"line":99},[29340,29344,29349,29354],{"type":42,"tag":391,"props":29341,"children":29342},{"style":397},[29343],{"type":51,"value":431},{"type":42,"tag":391,"props":29345,"children":29346},{"style":403},[29347],{"type":51,"value":29348}," commit",{"type":42,"tag":391,"props":29350,"children":29351},{"style":415},[29352],{"type":51,"value":29353}," -m",{"type":42,"tag":391,"props":29355,"children":29356},{"style":403},[29357],{"type":51,"value":29358}," \"ecommerce analytics pipeline\"\n",{"type":42,"tag":391,"props":29360,"children":29361},{"class":393,"line":439},[29362,29366,29371,29375,29380],{"type":42,"tag":391,"props":29363,"children":29364},{"style":397},[29365],{"type":51,"value":431},{"type":42,"tag":391,"props":29367,"children":29368},{"style":403},[29369],{"type":51,"value":29370}," remote",{"type":42,"tag":391,"props":29372,"children":29373},{"style":403},[29374],{"type":51,"value":1548},{"type":42,"tag":391,"props":29376,"children":29377},{"style":403},[29378],{"type":51,"value":29379}," origin",{"type":42,"tag":391,"props":29381,"children":29382},{"style":403},[29383],{"type":51,"value":29384}," https:\u002F\u002Fgithub.com\u002Fyour-org\u002Fecommerce-analytics.git\n",{"type":42,"tag":391,"props":29386,"children":29387},{"class":393,"line":947},[29388,29392,29397,29402,29406],{"type":42,"tag":391,"props":29389,"children":29390},{"style":397},[29391],{"type":51,"value":431},{"type":42,"tag":391,"props":29393,"children":29394},{"style":403},[29395],{"type":51,"value":29396}," push",{"type":42,"tag":391,"props":29398,"children":29399},{"style":415},[29400],{"type":51,"value":29401}," -u",{"type":42,"tag":391,"props":29403,"children":29404},{"style":403},[29405],{"type":51,"value":29379},{"type":42,"tag":391,"props":29407,"children":29408},{"style":403},[29409],{"type":51,"value":29410}," main\n",{"type":42,"tag":43,"props":29412,"children":29413},{},[29414],{"type":42,"tag":47,"props":29415,"children":29416},{},[29417],{"type":51,"value":29418},"Add the repo to Bruin Cloud:",{"type":42,"tag":27700,"props":29420,"children":29421},{},[29422,29439,29444,29457,29462],{"type":42,"tag":218,"props":29423,"children":29424},{},[29425,29427,29432,29434],{"type":51,"value":29426},"Go to ",{"type":42,"tag":229,"props":29428,"children":29430},{"href":544,"rel":29429},[233],[29431],{"type":51,"value":548},{"type":51,"value":29433},", open ",{"type":42,"tag":47,"props":29435,"children":29436},{},[29437],{"type":51,"value":29438},"Team Settings > Projects",{"type":42,"tag":218,"props":29440,"children":29441},{},[29442],{"type":51,"value":29443},"Add your GitHub repository",{"type":42,"tag":218,"props":29445,"children":29446},{},[29447,29449,29455],{"type":51,"value":29448},"Enable the ",{"type":42,"tag":240,"props":29450,"children":29452},{"className":29451},[],[29453],{"type":51,"value":29454},"ecommerce",{"type":51,"value":29456}," pipeline",{"type":42,"tag":218,"props":29458,"children":29459},{},[29460],{"type":51,"value":29461},"Configure your connections (warehouse, Shopify, Stripe, etc.) in the Cloud environment",{"type":42,"tag":218,"props":29463,"children":29464},{},[29465],{"type":51,"value":29466},"Run the pipeline to confirm it works",{"type":42,"tag":43,"props":29468,"children":29469},{},[29470],{"type":42,"tag":47,"props":29471,"children":29472},{},[29473],{"type":51,"value":29474},"Create the Slack\u002FTeams AI agent:",{"type":42,"tag":27700,"props":29476,"children":29477},{},[29478,29487,29498,29503,29508],{"type":42,"tag":218,"props":29479,"children":29480},{},[29481,29482],{"type":51,"value":29426},{"type":42,"tag":47,"props":29483,"children":29484},{},[29485],{"type":51,"value":29486},"Agents > Create Agent",{"type":42,"tag":218,"props":29488,"children":29489},{},[29490,29492,29497],{"type":51,"value":29491},"Select your repo and the ",{"type":42,"tag":240,"props":29493,"children":29495},{"className":29494},[],[29496],{"type":51,"value":29454},{"type":51,"value":29456},{"type":42,"tag":218,"props":29499,"children":29500},{},[29501],{"type":51,"value":29502},"Add your Slack (or Teams) credentials",{"type":42,"tag":218,"props":29504,"children":29505},{},[29506],{"type":51,"value":29507},"Name the agent, e.g. \"Ecommerce Analyst\"",{"type":42,"tag":218,"props":29509,"children":29510},{},[29511],{"type":51,"value":29512},"Select the target channel where your team asks data questions",{"type":42,"tag":43,"props":29514,"children":29515},{},[29516],{"type":42,"tag":47,"props":29517,"children":29518},{},[29519],{"type":51,"value":29520},"Test in Slack:",{"type":42,"tag":43,"props":29522,"children":29523},{},[29524],{"type":51,"value":29525},"Mention the agent in your channel:",{"type":42,"tag":1574,"props":29527,"children":29528},{},[29529],{"type":42,"tag":43,"props":29530,"children":29531},{},[29532],{"type":51,"value":29533},"@Ecommerce Analyst What was our revenue yesterday?",{"type":42,"tag":43,"props":29535,"children":29536},{},[29537,29539,29544],{"type":51,"value":29538},"The agent queries your warehouse using the same ",{"type":42,"tag":240,"props":29540,"children":29542},{"className":29541},[],[29543],{"type":51,"value":27724},{"type":51,"value":29545}," context and responds with an answer. Anyone on the team can ask questions without writing SQL.",{"type":42,"tag":86,"props":29547,"children":29548},{"id":1671},[29549],{"type":51,"value":1674},{"type":42,"tag":214,"props":29551,"children":29552},{},[29553,29566,29579,29589],{"type":42,"tag":218,"props":29554,"children":29555},{},[29556,29564],{"type":42,"tag":47,"props":29557,"children":29558},{},[29559],{"type":42,"tag":240,"props":29560,"children":29562},{"className":29561},[],[29563],{"type":51,"value":27713},{"type":51,"value":29565}," auto-generated metadata for all your pipeline assets",{"type":42,"tag":218,"props":29567,"children":29568},{},[29569,29577],{"type":42,"tag":47,"props":29570,"children":29571},{},[29572],{"type":42,"tag":240,"props":29573,"children":29575},{"className":29574},[],[29576],{"type":51,"value":27724},{"type":51,"value":29578}," gives the AI analyst ecommerce-specific domain knowledge",{"type":42,"tag":218,"props":29580,"children":29581},{},[29582,29587],{"type":42,"tag":47,"props":29583,"children":29584},{},[29585],{"type":51,"value":29586},"Local AI analyst",{"type":51,"value":29588}," with Claude Code answering business questions through Bruin MCP",{"type":42,"tag":218,"props":29590,"children":29591},{},[29592,29597],{"type":42,"tag":47,"props":29593,"children":29594},{},[29595],{"type":51,"value":29596},"Cloud AI analyst",{"type":51,"value":29598}," runs on Bruin Cloud and responds to questions in Slack or Teams",{"type":42,"tag":43,"props":29600,"children":29601},{},[29602],{"type":51,"value":29603},"Next up, you'll build interactive dashboards using the same AI agent in Bruin Cloud.",{"type":42,"tag":1681,"props":29605,"children":29606},{},[29607],{"type":51,"value":1685},{"title":7,"searchDepth":99,"depth":99,"links":29609},[29610,29611,29612,29619],{"id":193,"depth":99,"text":196},{"id":324,"depth":99,"text":327},{"id":356,"depth":99,"text":359,"children":29613},[29614,29615,29616,29617,29618],{"id":27764,"depth":439,"text":27767},{"id":27823,"depth":439,"text":27826},{"id":29090,"depth":439,"text":29093},{"id":29195,"depth":439,"text":29198},{"id":29256,"depth":439,"text":29259},{"id":1671,"depth":99,"text":1674},"content:tutorials:ecommerce-pipeline:ai-analyst.md","tutorials\u002Fecommerce-pipeline\u002Fai-analyst.md","tutorials\u002Fecommerce-pipeline\u002Fai-analyst",{"_path":29624,"_dir":12,"_draft":6,"_partial":6,"_locale":7,"title":29625,"description":29626,"date":10,"readingTime":960,"category":166,"tags":29627,"difficulty":175,"module":12,"subSteps":13,"step":984,"journeys":29629,"learnMore":29630,"author":29637,"body":29638,"_type":102,"_id":30067,"_source":104,"_file":30068,"_stem":30069,"_extension":107},"\u002Ftutorials\u002Fecommerce-pipeline\u002Fdashboards","Build Ecommerce Dashboards","Use the Bruin Cloud AI agent to generate interactive ecommerce dashboards - revenue trends, customer cohorts, marketing ROI, and product performance - from natural language.",[548,27675,29628,174],"Dashboards",[179,180],[29631,29634],{"label":29632,"url":29633},"AI Dashboard Builder tutorial","\u002Flearn\u002Fbruin-dashboards",{"label":29635,"url":29636},"Bruin Cloud overview","https:\u002F\u002Fgetbruin.com\u002Fdocs\u002Fbruin\u002Fcloud\u002Foverview.html",{"name":35,"role":36,"image":37},{"type":39,"children":29639,"toc":30053},[29640,29644,29649,29653,29658,29670,29674,29680,29691,29697,29702,29710,29723,29729,29733,29741,29754,29760,29764,29772,29785,29791,29795,29803,29816,29822,29827,29862,29867,29871,29876,29919,29922,29928,29933,29996,30008,30016],{"type":42,"tag":86,"props":29641,"children":29642},{"id":193},[29643],{"type":51,"value":196},{"type":42,"tag":43,"props":29645,"children":29646},{},[29647],{"type":51,"value":29648},"Use the Bruin Cloud AI Dashboard Builder to create four ecommerce dashboards from natural language prompts. No SQL, no chart configuration - just describe what you want to see.",{"type":42,"tag":86,"props":29650,"children":29651},{"id":324},[29652],{"type":51,"value":327},{"type":42,"tag":43,"props":29654,"children":29655},{},[29656],{"type":51,"value":29657},"Reports in a database are useful for analysts, but most people want dashboards. A founder wants to check revenue trends. A marketing manager wants ROAS by channel. A product lead wants to know which SKUs are underperforming.",{"type":42,"tag":43,"props":29659,"children":29660},{},[29661,29663,29668],{"type":51,"value":29662},"The AI Dashboard Builder creates charts from your report tables based on what you ask for. It reads your ",{"type":42,"tag":240,"props":29664,"children":29666},{"className":29665},[],[29667],{"type":51,"value":27724},{"type":51,"value":29669}," context, so it uses the right metrics and definitions.",{"type":42,"tag":86,"props":29671,"children":29672},{"id":356},[29673],{"type":51,"value":359},{"type":42,"tag":361,"props":29675,"children":29677},{"id":29676},"_1-open-the-dashboards-page",[29678],{"type":51,"value":29679},"1) Open the Dashboards page",{"type":42,"tag":43,"props":29681,"children":29682},{},[29683,29685,29689],{"type":51,"value":29684},"Go to the ",{"type":42,"tag":47,"props":29686,"children":29687},{},[29688],{"type":51,"value":29628},{"type":51,"value":29690}," section in Bruin Cloud. Make sure your pipeline has run at least once so the report tables have data.",{"type":42,"tag":361,"props":29692,"children":29694},{"id":29693},"_2-executive-kpis-dashboard",[29695],{"type":51,"value":29696},"2) Executive KPIs dashboard",{"type":42,"tag":43,"props":29698,"children":29699},{},[29700],{"type":51,"value":29701},"Ask the AI agent:",{"type":42,"tag":1574,"props":29703,"children":29704},{},[29705],{"type":42,"tag":43,"props":29706,"children":29707},{},[29708],{"type":51,"value":29709},"Build an executive dashboard showing daily revenue, order count, AOV, and new vs returning customers for the last 30 days with week-over-week comparison.",{"type":42,"tag":43,"props":29711,"children":29712},{},[29713,29715,29721],{"type":51,"value":29714},"The agent generates SQL against your ",{"type":42,"tag":240,"props":29716,"children":29718},{"className":29717},[],[29719],{"type":51,"value":29720},"reports.rpt_daily_kpis",{"type":51,"value":29722}," table and creates line charts, KPI cards, and comparison metrics.",{"type":42,"tag":361,"props":29724,"children":29726},{"id":29725},"_3-marketing-performance-dashboard",[29727],{"type":51,"value":29728},"3) Marketing performance dashboard",{"type":42,"tag":43,"props":29730,"children":29731},{},[29732],{"type":51,"value":29701},{"type":42,"tag":1574,"props":29734,"children":29735},{},[29736],{"type":42,"tag":43,"props":29737,"children":29738},{},[29739],{"type":51,"value":29740},"Show me marketing performance by channel - ROAS, spend, and attributed revenue for Facebook Ads and email, with a trend chart for the last 90 days.",{"type":42,"tag":43,"props":29742,"children":29743},{},[29744,29746,29752],{"type":51,"value":29745},"This pulls from ",{"type":42,"tag":240,"props":29747,"children":29749},{"className":29748},[],[29750],{"type":51,"value":29751},"reports.rpt_marketing_roi",{"type":51,"value":29753}," and creates a multi-channel comparison with spend efficiency metrics.",{"type":42,"tag":361,"props":29755,"children":29757},{"id":29756},"_4-customer-cohorts-dashboard",[29758],{"type":51,"value":29759},"4) Customer cohorts dashboard",{"type":42,"tag":43,"props":29761,"children":29762},{},[29763],{"type":51,"value":29701},{"type":42,"tag":1574,"props":29765,"children":29766},{},[29767],{"type":42,"tag":43,"props":29768,"children":29769},{},[29770],{"type":51,"value":29771},"Create a cohort retention chart showing monthly customer retention rates for the last 6 cohorts, plus lifetime value by cohort.",{"type":42,"tag":43,"props":29773,"children":29774},{},[29775,29777,29783],{"type":51,"value":29776},"This uses ",{"type":42,"tag":240,"props":29778,"children":29780},{"className":29779},[],[29781],{"type":51,"value":29782},"reports.rpt_customer_cohorts",{"type":51,"value":29784}," to build a retention heatmap and LTV trend.",{"type":42,"tag":361,"props":29786,"children":29788},{"id":29787},"_5-product-performance-dashboard",[29789],{"type":51,"value":29790},"5) Product performance dashboard",{"type":42,"tag":43,"props":29792,"children":29793},{},[29794],{"type":51,"value":29701},{"type":42,"tag":1574,"props":29796,"children":29797},{},[29798],{"type":42,"tag":43,"props":29799,"children":29800},{},[29801],{"type":51,"value":29802},"Show top 20 products by revenue with their cancellation rate, and a category-level revenue breakdown.",{"type":42,"tag":43,"props":29804,"children":29805},{},[29806,29808,29814],{"type":51,"value":29807},"This queries ",{"type":42,"tag":240,"props":29809,"children":29811},{"className":29810},[],[29812],{"type":51,"value":29813},"reports.rpt_product_performance",{"type":51,"value":29815}," to create a ranked product table and a category breakdown chart.",{"type":42,"tag":361,"props":29817,"children":29819},{"id":29818},"_6-iterate-and-ask-questions",[29820],{"type":51,"value":29821},"6) Iterate and ask questions",{"type":42,"tag":43,"props":29823,"children":29824},{},[29825],{"type":51,"value":29826},"The AI agent is conversational. You can refine any dashboard:",{"type":42,"tag":214,"props":29828,"children":29829},{},[29830,29840,29852],{"type":42,"tag":218,"props":29831,"children":29832},{},[29833,29835],{"type":51,"value":29834},"Click on a chart to bring it into context, then ask: ",{"type":42,"tag":1176,"props":29836,"children":29837},{},[29838],{"type":51,"value":29839},"\"Change this to a bar chart instead\"",{"type":42,"tag":218,"props":29841,"children":29842},{},[29843,29845,29850],{"type":51,"value":29844},"Ask follow-up questions: ",{"type":42,"tag":1176,"props":29846,"children":29847},{},[29848],{"type":51,"value":29849},"\"Why did revenue dip last Tuesday?\"",{"type":51,"value":29851}," - the agent analyzes the data instead of building another chart",{"type":42,"tag":218,"props":29853,"children":29854},{},[29855,29857],{"type":51,"value":29856},"Add new charts: ",{"type":42,"tag":1176,"props":29858,"children":29859},{},[29860],{"type":51,"value":29861},"\"Add a chart showing refund rate by product category\"",{"type":42,"tag":43,"props":29863,"children":29864},{},[29865],{"type":51,"value":29866},"Every chart is backed by a visible SQL query you can inspect and verify.",{"type":42,"tag":86,"props":29868,"children":29869},{"id":1671},[29870],{"type":51,"value":1674},{"type":42,"tag":43,"props":29872,"children":29873},{},[29874],{"type":51,"value":29875},"You now have four interactive ecommerce dashboards that update as your pipeline runs daily:",{"type":42,"tag":27700,"props":29877,"children":29878},{},[29879,29889,29899,29909],{"type":42,"tag":218,"props":29880,"children":29881},{},[29882,29887],{"type":42,"tag":47,"props":29883,"children":29884},{},[29885],{"type":51,"value":29886},"Executive KPIs",{"type":51,"value":29888}," - daily revenue, orders, AOV, customer mix",{"type":42,"tag":218,"props":29890,"children":29891},{},[29892,29897],{"type":42,"tag":47,"props":29893,"children":29894},{},[29895],{"type":51,"value":29896},"Marketing Performance",{"type":51,"value":29898}," - spend, ROAS, and revenue by channel",{"type":42,"tag":218,"props":29900,"children":29901},{},[29902,29907],{"type":42,"tag":47,"props":29903,"children":29904},{},[29905],{"type":51,"value":29906},"Customer Cohorts",{"type":51,"value":29908}," - retention rates and LTV by cohort",{"type":42,"tag":218,"props":29910,"children":29911},{},[29912,29917],{"type":42,"tag":47,"props":29913,"children":29914},{},[29915],{"type":51,"value":29916},"Product Performance",{"type":51,"value":29918}," - top products and category breakdown",{"type":42,"tag":1959,"props":29920,"children":29921},{},[],{"type":42,"tag":86,"props":29923,"children":29925},{"id":29924},"thats-the-full-stack",[29926],{"type":51,"value":29927},"That's the full stack",{"type":42,"tag":43,"props":29929,"children":29930},{},[29931],{"type":51,"value":29932},"Over the course of this module, you built:",{"type":42,"tag":214,"props":29934,"children":29935},{},[29936,29946,29956,29966,29976,29986],{"type":42,"tag":218,"props":29937,"children":29938},{},[29939,29944],{"type":42,"tag":47,"props":29940,"children":29941},{},[29942],{"type":51,"value":29943},"Data ingestion",{"type":51,"value":29945}," from 5 SaaS sources (Shopify and your selected tools) into your data warehouse",{"type":42,"tag":218,"props":29947,"children":29948},{},[29949,29954],{"type":42,"tag":47,"props":29950,"children":29951},{},[29952],{"type":51,"value":29953},"A staging layer",{"type":51,"value":29955}," that cleans, deduplicates, and joins data across all sources",{"type":42,"tag":218,"props":29957,"children":29958},{},[29959,29964],{"type":42,"tag":47,"props":29960,"children":29961},{},[29962],{"type":51,"value":29963},"Business reports",{"type":51,"value":29965}," for revenue, cohorts, products, marketing ROI, and daily KPIs",{"type":42,"tag":218,"props":29967,"children":29968},{},[29969,29974],{"type":42,"tag":47,"props":29970,"children":29971},{},[29972],{"type":51,"value":29973},"A local AI analyst",{"type":51,"value":29975}," that answers questions through Bruin MCP",{"type":42,"tag":218,"props":29977,"children":29978},{},[29979,29984],{"type":42,"tag":47,"props":29980,"children":29981},{},[29982],{"type":51,"value":29983},"A cloud AI analyst",{"type":51,"value":29985}," your team can talk to in Slack or Teams",{"type":42,"tag":218,"props":29987,"children":29988},{},[29989,29994],{"type":42,"tag":47,"props":29990,"children":29991},{},[29992],{"type":51,"value":29993},"Interactive dashboards",{"type":51,"value":29995}," built from natural language in Bruin Cloud",{"type":42,"tag":43,"props":29997,"children":29998},{},[29999,30001,30006],{"type":51,"value":30000},"The pipeline runs daily on schedule. Your team can ask questions without writing SQL. And the ",{"type":42,"tag":240,"props":30002,"children":30004},{"className":30003},[],[30005],{"type":51,"value":27724},{"type":51,"value":30007}," file improves every time you add to it.",{"type":42,"tag":43,"props":30009,"children":30010},{},[30011],{"type":42,"tag":47,"props":30012,"children":30013},{},[30014],{"type":51,"value":30015},"Where to go from here:",{"type":42,"tag":214,"props":30017,"children":30018},{},[30019,30024,30036,30041],{"type":42,"tag":218,"props":30020,"children":30021},{},[30022],{"type":51,"value":30023},"Add more data sources as your stack grows",{"type":42,"tag":218,"props":30025,"children":30026},{},[30027,30029,30034],{"type":51,"value":30028},"Add new terms and caveats to ",{"type":42,"tag":240,"props":30030,"children":30032},{"className":30031},[],[30033],{"type":51,"value":27724},{"type":51,"value":30035}," as you discover them",{"type":42,"tag":218,"props":30037,"children":30038},{},[30039],{"type":51,"value":30040},"Build additional dashboards for specific teams (marketing, ops, finance)",{"type":42,"tag":218,"props":30042,"children":30043},{},[30044,30046,30051],{"type":51,"value":30045},"Check out the ",{"type":42,"tag":229,"props":30047,"children":30048},{"href":279},[30049],{"type":51,"value":30050},"Bruin Core Concepts",{"type":51,"value":30052}," module if you want to go deeper on pipelines, assets, and variables",{"title":7,"searchDepth":99,"depth":99,"links":30054},[30055,30056,30057,30065,30066],{"id":193,"depth":99,"text":196},{"id":324,"depth":99,"text":327},{"id":356,"depth":99,"text":359,"children":30058},[30059,30060,30061,30062,30063,30064],{"id":29676,"depth":439,"text":29679},{"id":29693,"depth":439,"text":29696},{"id":29725,"depth":439,"text":29728},{"id":29756,"depth":439,"text":29759},{"id":29787,"depth":439,"text":29790},{"id":29818,"depth":439,"text":29821},{"id":1671,"depth":99,"text":1674},{"id":29924,"depth":99,"text":29927},"content:tutorials:ecommerce-pipeline:dashboards.md","tutorials\u002Fecommerce-pipeline\u002Fdashboards.md","tutorials\u002Fecommerce-pipeline\u002Fdashboards",1776143434356]