[{"data":1,"prerenderedAt":7579},["ShallowReactive",2],{"tutorial-dbt-bruin-analyst/import-schemas":3,"content-query-cMHDEPUjtD":1168,"content-query-g5ZKLlKTWc":2107},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":13,"difficulty":16,"module":5,"step":17,"journeys":18,"learnMore":21,"stepGif":28,"author":29,"body":33,"_type":1162,"_id":1163,"_source":1164,"_file":1165,"_stem":1166,"_extension":1167},"/tutorials/dbt-bruin-analyst/import-schemas","dbt-bruin-analyst",false,"","Import Your dbt Schemas as Assets","Use bruin import database to introspect every materialized dbt schema and write one .asset.yml per table — raw, staging, and reports — in a single command.","2026-04-28",5,"Tutorial",[14,15],"Bruin CLI","dbt","Beginner",3,[19,20],"Data Analyst","Data Engineer",[22,25],{"label":23,"url":24},"bruin import database (docs)","https://getbruin.com/docs/bruin/commands/import.html",{"label":26,"url":27},"Asset definition schema","https://getbruin.com/docs/bruin/assets/definition-schema.html","/img/learn/contoso-dbt-bruin-analyst.gif",{"name":30,"role":31,"image":32},"Bruin Team","Bruin Data","/bruin-logo-2025.svg",{"type":34,"children":35,"toc":1149},"root",[36,45,99,105,110,130,136,143,148,200,237,243,264,398,411,491,528,534,554,566,576,581,789,794,800,813,937,942,948,953,986,991,1000,1005,1011,1019,1047,1055,1076,1089,1114,1122,1127,1133,1143],{"type":37,"tag":38,"props":39,"children":41},"element","h2",{"id":40},"what-youll-do",[42],{"type":43,"value":44},"text","What you'll do",{"type":37,"tag":46,"props":47,"children":48},"p",{},[49,51,58,60,66,68,74,75,81,83,89,91,97],{"type":43,"value":50},"Run ",{"type":37,"tag":52,"props":53,"children":55},"code",{"className":54},[],[56],{"type":43,"value":57},"bruin import database",{"type":43,"value":59}," against the schemas your dbt project materializes (e.g., ",{"type":37,"tag":52,"props":61,"children":63},{"className":62},[],[64],{"type":43,"value":65},"*_raw",{"type":43,"value":67},", ",{"type":37,"tag":52,"props":69,"children":71},{"className":70},[],[72],{"type":43,"value":73},"*_staging",{"type":43,"value":67},{"type":37,"tag":52,"props":76,"children":78},{"className":77},[],[79],{"type":43,"value":80},"*_reports",{"type":43,"value":82},"). Bruin connects to the warehouse, reads each table's column list and types, and writes one ",{"type":37,"tag":52,"props":84,"children":86},{"className":85},[],[87],{"type":43,"value":88},".asset.yml",{"type":43,"value":90}," per table under ",{"type":37,"tag":52,"props":92,"children":94},{"className":93},[],[95],{"type":43,"value":96},"context/assets/",{"type":43,"value":98},".",{"type":37,"tag":38,"props":100,"children":102},{"id":101},"why-this-step-matters",[103],{"type":43,"value":104},"Why this step matters",{"type":37,"tag":46,"props":106,"children":107},{},[108],{"type":43,"value":109},"This is the heavy lifting in one command. Without it, you'd be hand-writing 40 YAML files trying to remember every column, every type, every table. With it, Bruin reads the warehouse you just built with dbt and generates the skeletons for you in seconds.",{"type":37,"tag":46,"props":111,"children":112},{},[113,115,121,123,128],{"type":43,"value":114},"What you get out of this step is ",{"type":37,"tag":116,"props":117,"children":118},"em",{},[119],{"type":43,"value":120},"structure",{"type":43,"value":122},": tables, columns, types. The next step (AI enhance) adds the ",{"type":37,"tag":116,"props":124,"children":125},{},[126],{"type":43,"value":127},"meaning",{"type":43,"value":129},": descriptions, tags, quality checks. Both halves matter — but the structure has to come from the warehouse, not from a guess.",{"type":37,"tag":38,"props":131,"children":133},{"id":132},"instructions",[134],{"type":43,"value":135},"Instructions",{"type":37,"tag":137,"props":138,"children":140},"h3",{"id":139},"_1-identify-your-dbt-schemas",[141],{"type":43,"value":142},"1. Identify your dbt schemas",{"type":37,"tag":46,"props":144,"children":145},{},[146],{"type":43,"value":147},"You need the actual warehouse schema names. If you used the reference contoso project's schema convention, they're:",{"type":37,"tag":149,"props":150,"children":151},"ul",{},[152,164,183],{"type":37,"tag":153,"props":154,"children":155},"li",{},[156,162],{"type":37,"tag":52,"props":157,"children":159},{"className":158},[],[160],{"type":43,"value":161},"contoso_dbt_raw",{"type":43,"value":163}," — what dlt loads",{"type":37,"tag":153,"props":165,"children":166},{},[167,173,175,181],{"type":37,"tag":52,"props":168,"children":170},{"className":169},[],[171],{"type":43,"value":172},"contoso_dbt_staging",{"type":43,"value":174}," — ",{"type":37,"tag":52,"props":176,"children":178},{"className":177},[],[179],{"type":43,"value":180},"stg_*",{"type":43,"value":182}," models",{"type":37,"tag":153,"props":184,"children":185},{},[186,192,193,199],{"type":37,"tag":52,"props":187,"children":189},{"className":188},[],[190],{"type":43,"value":191},"contoso_dbt_reports",{"type":43,"value":174},{"type":37,"tag":52,"props":194,"children":196},{"className":195},[],[197],{"type":43,"value":198},"rpt_*",{"type":43,"value":182},{"type":37,"tag":46,"props":201,"children":202},{},[203,205,211,213,219,221,227,229,235],{"type":43,"value":204},"If you're not sure what your dbt project lands as, check ",{"type":37,"tag":52,"props":206,"children":208},{"className":207},[],[209],{"type":43,"value":210},"dbt_project.yml",{"type":43,"value":212},". The full schema name is ",{"type":37,"tag":52,"props":214,"children":216},{"className":215},[],[217],{"type":43,"value":218},"\u003Ctarget.schema>_\u003C+schema>",{"type":43,"value":220}," by default, or just ",{"type":37,"tag":52,"props":222,"children":224},{"className":223},[],[225],{"type":43,"value":226},"\u003C+schema>",{"type":43,"value":228}," if you've overridden ",{"type":37,"tag":52,"props":230,"children":232},{"className":231},[],[233],{"type":43,"value":234},"generate_schema_name",{"type":43,"value":236}," (the contoso project does).",{"type":37,"tag":137,"props":238,"children":240},{"id":239},"_2-run-the-import",[241],{"type":43,"value":242},"2. Run the import",{"type":37,"tag":46,"props":244,"children":245},{},[246,248,254,256,262],{"type":43,"value":247},"From the dbt project root, point the import at your ",{"type":37,"tag":52,"props":249,"children":251},{"className":250},[],[252],{"type":43,"value":253},"context/",{"type":43,"value":255}," pipeline folder. The ",{"type":37,"tag":52,"props":257,"children":259},{"className":258},[],[260],{"type":43,"value":261},"--schemas",{"type":43,"value":263}," flag is repeatable for BigQuery — pass it once per schema:",{"type":37,"tag":265,"props":266,"children":270},"pre",{"className":267,"code":268,"language":269,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","bruin import database \\\n  --config-file context/.bruin.yml \\\n  --connection contoso_dbt_bq \\\n  --schemas contoso_dbt_raw \\\n  --schemas contoso_dbt_staging \\\n  --schemas contoso_dbt_reports \\\n  context\n","bash",[271],{"type":37,"tag":52,"props":272,"children":273},{"__ignoreMap":7},[274,303,321,338,356,372,389],{"type":37,"tag":275,"props":276,"children":279},"span",{"class":277,"line":278},"line",1,[280,286,292,297],{"type":37,"tag":275,"props":281,"children":283},{"style":282},"--shiki-default:#B392F0",[284],{"type":43,"value":285},"bruin",{"type":37,"tag":275,"props":287,"children":289},{"style":288},"--shiki-default:#9ECBFF",[290],{"type":43,"value":291}," import",{"type":37,"tag":275,"props":293,"children":294},{"style":288},[295],{"type":43,"value":296}," database",{"type":37,"tag":275,"props":298,"children":300},{"style":299},"--shiki-default:#79B8FF",[301],{"type":43,"value":302}," \\\n",{"type":37,"tag":275,"props":304,"children":306},{"class":277,"line":305},2,[307,312,317],{"type":37,"tag":275,"props":308,"children":309},{"style":299},[310],{"type":43,"value":311},"  --config-file",{"type":37,"tag":275,"props":313,"children":314},{"style":288},[315],{"type":43,"value":316}," context/.bruin.yml",{"type":37,"tag":275,"props":318,"children":319},{"style":299},[320],{"type":43,"value":302},{"type":37,"tag":275,"props":322,"children":323},{"class":277,"line":17},[324,329,334],{"type":37,"tag":275,"props":325,"children":326},{"style":299},[327],{"type":43,"value":328},"  --connection",{"type":37,"tag":275,"props":330,"children":331},{"style":288},[332],{"type":43,"value":333}," contoso_dbt_bq",{"type":37,"tag":275,"props":335,"children":336},{"style":299},[337],{"type":43,"value":302},{"type":37,"tag":275,"props":339,"children":341},{"class":277,"line":340},4,[342,347,352],{"type":37,"tag":275,"props":343,"children":344},{"style":299},[345],{"type":43,"value":346},"  --schemas",{"type":37,"tag":275,"props":348,"children":349},{"style":288},[350],{"type":43,"value":351}," contoso_dbt_raw",{"type":37,"tag":275,"props":353,"children":354},{"style":299},[355],{"type":43,"value":302},{"type":37,"tag":275,"props":357,"children":358},{"class":277,"line":11},[359,363,368],{"type":37,"tag":275,"props":360,"children":361},{"style":299},[362],{"type":43,"value":346},{"type":37,"tag":275,"props":364,"children":365},{"style":288},[366],{"type":43,"value":367}," contoso_dbt_staging",{"type":37,"tag":275,"props":369,"children":370},{"style":299},[371],{"type":43,"value":302},{"type":37,"tag":275,"props":373,"children":375},{"class":277,"line":374},6,[376,380,385],{"type":37,"tag":275,"props":377,"children":378},{"style":299},[379],{"type":43,"value":346},{"type":37,"tag":275,"props":381,"children":382},{"style":288},[383],{"type":43,"value":384}," contoso_dbt_reports",{"type":37,"tag":275,"props":386,"children":387},{"style":299},[388],{"type":43,"value":302},{"type":37,"tag":275,"props":390,"children":392},{"class":277,"line":391},7,[393],{"type":37,"tag":275,"props":394,"children":395},{"style":288},[396],{"type":43,"value":397},"  context\n",{"type":37,"tag":46,"props":399,"children":400},{},[401,403,409],{"type":43,"value":402},"For Postgres, Redshift, or ClickHouse, use ",{"type":37,"tag":52,"props":404,"children":406},{"className":405},[],[407],{"type":43,"value":408},"--schema",{"type":43,"value":410}," (singular) once per run:",{"type":37,"tag":265,"props":412,"children":414},{"className":267,"code":413,"language":269,"meta":7,"style":7},"bruin import database \\\n  --config-file context/.bruin.yml \\\n  --connection contoso_dbt_pg \\\n  --schema contoso_dbt_staging \\\n  context\n",[415],{"type":37,"tag":52,"props":416,"children":417},{"__ignoreMap":7},[418,437,452,468,484],{"type":37,"tag":275,"props":419,"children":420},{"class":277,"line":278},[421,425,429,433],{"type":37,"tag":275,"props":422,"children":423},{"style":282},[424],{"type":43,"value":285},{"type":37,"tag":275,"props":426,"children":427},{"style":288},[428],{"type":43,"value":291},{"type":37,"tag":275,"props":430,"children":431},{"style":288},[432],{"type":43,"value":296},{"type":37,"tag":275,"props":434,"children":435},{"style":299},[436],{"type":43,"value":302},{"type":37,"tag":275,"props":438,"children":439},{"class":277,"line":305},[440,444,448],{"type":37,"tag":275,"props":441,"children":442},{"style":299},[443],{"type":43,"value":311},{"type":37,"tag":275,"props":445,"children":446},{"style":288},[447],{"type":43,"value":316},{"type":37,"tag":275,"props":449,"children":450},{"style":299},[451],{"type":43,"value":302},{"type":37,"tag":275,"props":453,"children":454},{"class":277,"line":17},[455,459,464],{"type":37,"tag":275,"props":456,"children":457},{"style":299},[458],{"type":43,"value":328},{"type":37,"tag":275,"props":460,"children":461},{"style":288},[462],{"type":43,"value":463}," contoso_dbt_pg",{"type":37,"tag":275,"props":465,"children":466},{"style":299},[467],{"type":43,"value":302},{"type":37,"tag":275,"props":469,"children":470},{"class":277,"line":340},[471,476,480],{"type":37,"tag":275,"props":472,"children":473},{"style":299},[474],{"type":43,"value":475},"  --schema",{"type":37,"tag":275,"props":477,"children":478},{"style":288},[479],{"type":43,"value":367},{"type":37,"tag":275,"props":481,"children":482},{"style":299},[483],{"type":43,"value":302},{"type":37,"tag":275,"props":485,"children":486},{"class":277,"line":11},[487],{"type":37,"tag":275,"props":488,"children":489},{"style":288},[490],{"type":43,"value":397},{"type":37,"tag":492,"props":493,"children":494},"blockquote",{},[495],{"type":37,"tag":46,"props":496,"children":497},{},[498,504,506,511,513,519,521,527],{"type":37,"tag":499,"props":500,"children":501},"strong",{},[502],{"type":43,"value":503},"Note:",{"type":43,"value":505}," The trailing positional argument is the ",{"type":37,"tag":499,"props":507,"children":508},{},[509],{"type":43,"value":510},"pipeline path",{"type":43,"value":512},", not the project root. That's ",{"type":37,"tag":52,"props":514,"children":516},{"className":515},[],[517],{"type":43,"value":518},"context",{"type":43,"value":520}," in our setup — the directory containing ",{"type":37,"tag":52,"props":522,"children":524},{"className":523},[],[525],{"type":43,"value":526},"pipeline.yml",{"type":43,"value":98},{"type":37,"tag":137,"props":529,"children":531},{"id":530},"_3-inspect-what-was-generated",[532],{"type":43,"value":533},"3. Inspect what was generated",{"type":37,"tag":265,"props":535,"children":537},{"className":267,"code":536,"language":269,"meta":7,"style":7},"ls context/assets/\n",[538],{"type":37,"tag":52,"props":539,"children":540},{"__ignoreMap":7},[541],{"type":37,"tag":275,"props":542,"children":543},{"class":277,"line":278},[544,549],{"type":37,"tag":275,"props":545,"children":546},{"style":282},[547],{"type":43,"value":548},"ls",{"type":37,"tag":275,"props":550,"children":551},{"style":288},[552],{"type":43,"value":553}," context/assets/\n",{"type":37,"tag":46,"props":555,"children":556},{},[557,559,564],{"type":43,"value":558},"You should see one folder per schema, each containing one ",{"type":37,"tag":52,"props":560,"children":562},{"className":561},[],[563],{"type":43,"value":88},{"type":43,"value":565}," per table:",{"type":37,"tag":265,"props":567,"children":571},{"className":568,"code":570,"language":43},[569],"language-text","context/assets/\n├── contoso_dbt_raw/\n│   ├── customers.asset.yml\n│   ├── orders.asset.yml\n│   └── ...\n├── contoso_dbt_staging/\n│   ├── stg_customers.asset.yml\n│   └── ...\n└── contoso_dbt_reports/\n    ├── rpt_revenue_by_segment.asset.yml\n    └── ...\n",[572],{"type":37,"tag":52,"props":573,"children":574},{"__ignoreMap":7},[575],{"type":43,"value":570},{"type":37,"tag":46,"props":577,"children":578},{},[579],{"type":43,"value":580},"Open one — they look like this:",{"type":37,"tag":265,"props":582,"children":586},{"className":583,"code":584,"language":585,"meta":7,"style":7},"language-yaml shiki shiki-themes github-dark","name: contoso_dbt_reports.rpt_revenue_by_segment\ntype: bq.source\ncolumns:\n  - name: segment_id\n    type: STRING\n  - name: category_name\n    type: STRING\n  - name: year\n    type: INT64\n  - name: revenue_usd\n    type: NUMERIC\n","yaml",[587],{"type":37,"tag":52,"props":588,"children":589},{"__ignoreMap":7},[590,610,627,640,661,678,698,713,734,751,772],{"type":37,"tag":275,"props":591,"children":592},{"class":277,"line":278},[593,599,605],{"type":37,"tag":275,"props":594,"children":596},{"style":595},"--shiki-default:#85E89D",[597],{"type":43,"value":598},"name",{"type":37,"tag":275,"props":600,"children":602},{"style":601},"--shiki-default:#E1E4E8",[603],{"type":43,"value":604},": ",{"type":37,"tag":275,"props":606,"children":607},{"style":288},[608],{"type":43,"value":609},"contoso_dbt_reports.rpt_revenue_by_segment\n",{"type":37,"tag":275,"props":611,"children":612},{"class":277,"line":305},[613,618,622],{"type":37,"tag":275,"props":614,"children":615},{"style":595},[616],{"type":43,"value":617},"type",{"type":37,"tag":275,"props":619,"children":620},{"style":601},[621],{"type":43,"value":604},{"type":37,"tag":275,"props":623,"children":624},{"style":288},[625],{"type":43,"value":626},"bq.source\n",{"type":37,"tag":275,"props":628,"children":629},{"class":277,"line":17},[630,635],{"type":37,"tag":275,"props":631,"children":632},{"style":595},[633],{"type":43,"value":634},"columns",{"type":37,"tag":275,"props":636,"children":637},{"style":601},[638],{"type":43,"value":639},":\n",{"type":37,"tag":275,"props":641,"children":642},{"class":277,"line":340},[643,648,652,656],{"type":37,"tag":275,"props":644,"children":645},{"style":601},[646],{"type":43,"value":647},"  - ",{"type":37,"tag":275,"props":649,"children":650},{"style":595},[651],{"type":43,"value":598},{"type":37,"tag":275,"props":653,"children":654},{"style":601},[655],{"type":43,"value":604},{"type":37,"tag":275,"props":657,"children":658},{"style":288},[659],{"type":43,"value":660},"segment_id\n",{"type":37,"tag":275,"props":662,"children":663},{"class":277,"line":11},[664,669,673],{"type":37,"tag":275,"props":665,"children":666},{"style":595},[667],{"type":43,"value":668},"    type",{"type":37,"tag":275,"props":670,"children":671},{"style":601},[672],{"type":43,"value":604},{"type":37,"tag":275,"props":674,"children":675},{"style":288},[676],{"type":43,"value":677},"STRING\n",{"type":37,"tag":275,"props":679,"children":680},{"class":277,"line":374},[681,685,689,693],{"type":37,"tag":275,"props":682,"children":683},{"style":601},[684],{"type":43,"value":647},{"type":37,"tag":275,"props":686,"children":687},{"style":595},[688],{"type":43,"value":598},{"type":37,"tag":275,"props":690,"children":691},{"style":601},[692],{"type":43,"value":604},{"type":37,"tag":275,"props":694,"children":695},{"style":288},[696],{"type":43,"value":697},"category_name\n",{"type":37,"tag":275,"props":699,"children":700},{"class":277,"line":391},[701,705,709],{"type":37,"tag":275,"props":702,"children":703},{"style":595},[704],{"type":43,"value":668},{"type":37,"tag":275,"props":706,"children":707},{"style":601},[708],{"type":43,"value":604},{"type":37,"tag":275,"props":710,"children":711},{"style":288},[712],{"type":43,"value":677},{"type":37,"tag":275,"props":714,"children":716},{"class":277,"line":715},8,[717,721,725,729],{"type":37,"tag":275,"props":718,"children":719},{"style":601},[720],{"type":43,"value":647},{"type":37,"tag":275,"props":722,"children":723},{"style":595},[724],{"type":43,"value":598},{"type":37,"tag":275,"props":726,"children":727},{"style":601},[728],{"type":43,"value":604},{"type":37,"tag":275,"props":730,"children":731},{"style":288},[732],{"type":43,"value":733},"year\n",{"type":37,"tag":275,"props":735,"children":737},{"class":277,"line":736},9,[738,742,746],{"type":37,"tag":275,"props":739,"children":740},{"style":595},[741],{"type":43,"value":668},{"type":37,"tag":275,"props":743,"children":744},{"style":601},[745],{"type":43,"value":604},{"type":37,"tag":275,"props":747,"children":748},{"style":288},[749],{"type":43,"value":750},"INT64\n",{"type":37,"tag":275,"props":752,"children":754},{"class":277,"line":753},10,[755,759,763,767],{"type":37,"tag":275,"props":756,"children":757},{"style":601},[758],{"type":43,"value":647},{"type":37,"tag":275,"props":760,"children":761},{"style":595},[762],{"type":43,"value":598},{"type":37,"tag":275,"props":764,"children":765},{"style":601},[766],{"type":43,"value":604},{"type":37,"tag":275,"props":768,"children":769},{"style":288},[770],{"type":43,"value":771},"revenue_usd\n",{"type":37,"tag":275,"props":773,"children":775},{"class":277,"line":774},11,[776,780,784],{"type":37,"tag":275,"props":777,"children":778},{"style":595},[779],{"type":43,"value":668},{"type":37,"tag":275,"props":781,"children":782},{"style":601},[783],{"type":43,"value":604},{"type":37,"tag":275,"props":785,"children":786},{"style":288},[787],{"type":43,"value":788},"NUMERIC\n",{"type":37,"tag":46,"props":790,"children":791},{},[792],{"type":43,"value":793},"No descriptions, no tags, no checks yet — just structure. That's by design. The AI enhance step in the next chapter is what fills in the meaning.",{"type":37,"tag":137,"props":795,"children":797},{"id":796},"_4-filter-out-loader-internal-tables",[798],{"type":43,"value":799},"4. Filter out loader-internal tables",{"type":37,"tag":46,"props":801,"children":802},{},[803,805,811],{"type":43,"value":804},"If your raw schema was loaded by dlt, Fivetran, or Airbyte, the import will include their bookkeeping tables. They're not useful as agent context — drop them before enhancing so Claude doesn't waste time describing ",{"type":37,"tag":52,"props":806,"children":808},{"className":807},[],[809],{"type":43,"value":810},"_dlt_pipeline_state",{"type":43,"value":812},":",{"type":37,"tag":265,"props":814,"children":816},{"className":267,"code":815,"language":269,"meta":7,"style":7},"# dlt\nfind context/assets -name \"_dlt_*.asset.yml\" -delete\n\n# Airbyte\nfind context/assets -name \"_airbyte_*.asset.yml\" -delete\n\n# Fivetran\nfind context/assets -name \"fivetran_*.asset.yml\" -delete\n",[817],{"type":37,"tag":52,"props":818,"children":819},{"__ignoreMap":7},[820,829,857,866,874,898,905,913],{"type":37,"tag":275,"props":821,"children":822},{"class":277,"line":278},[823],{"type":37,"tag":275,"props":824,"children":826},{"style":825},"--shiki-default:#6A737D",[827],{"type":43,"value":828},"# dlt\n",{"type":37,"tag":275,"props":830,"children":831},{"class":277,"line":305},[832,837,842,847,852],{"type":37,"tag":275,"props":833,"children":834},{"style":282},[835],{"type":43,"value":836},"find",{"type":37,"tag":275,"props":838,"children":839},{"style":288},[840],{"type":43,"value":841}," context/assets",{"type":37,"tag":275,"props":843,"children":844},{"style":299},[845],{"type":43,"value":846}," -name",{"type":37,"tag":275,"props":848,"children":849},{"style":288},[850],{"type":43,"value":851}," \"_dlt_*.asset.yml\"",{"type":37,"tag":275,"props":853,"children":854},{"style":299},[855],{"type":43,"value":856}," -delete\n",{"type":37,"tag":275,"props":858,"children":859},{"class":277,"line":17},[860],{"type":37,"tag":275,"props":861,"children":863},{"emptyLinePlaceholder":862},true,[864],{"type":43,"value":865},"\n",{"type":37,"tag":275,"props":867,"children":868},{"class":277,"line":340},[869],{"type":37,"tag":275,"props":870,"children":871},{"style":825},[872],{"type":43,"value":873},"# Airbyte\n",{"type":37,"tag":275,"props":875,"children":876},{"class":277,"line":11},[877,881,885,889,894],{"type":37,"tag":275,"props":878,"children":879},{"style":282},[880],{"type":43,"value":836},{"type":37,"tag":275,"props":882,"children":883},{"style":288},[884],{"type":43,"value":841},{"type":37,"tag":275,"props":886,"children":887},{"style":299},[888],{"type":43,"value":846},{"type":37,"tag":275,"props":890,"children":891},{"style":288},[892],{"type":43,"value":893}," \"_airbyte_*.asset.yml\"",{"type":37,"tag":275,"props":895,"children":896},{"style":299},[897],{"type":43,"value":856},{"type":37,"tag":275,"props":899,"children":900},{"class":277,"line":374},[901],{"type":37,"tag":275,"props":902,"children":903},{"emptyLinePlaceholder":862},[904],{"type":43,"value":865},{"type":37,"tag":275,"props":906,"children":907},{"class":277,"line":391},[908],{"type":37,"tag":275,"props":909,"children":910},{"style":825},[911],{"type":43,"value":912},"# Fivetran\n",{"type":37,"tag":275,"props":914,"children":915},{"class":277,"line":715},[916,920,924,928,933],{"type":37,"tag":275,"props":917,"children":918},{"style":282},[919],{"type":43,"value":836},{"type":37,"tag":275,"props":921,"children":922},{"style":288},[923],{"type":43,"value":841},{"type":37,"tag":275,"props":925,"children":926},{"style":299},[927],{"type":43,"value":846},{"type":37,"tag":275,"props":929,"children":930},{"style":288},[931],{"type":43,"value":932}," \"fivetran_*.asset.yml\"",{"type":37,"tag":275,"props":934,"children":935},{"style":299},[936],{"type":43,"value":856},{"type":37,"tag":46,"props":938,"children":939},{},[940],{"type":43,"value":941},"Run only the one(s) that match your loader. The contoso project uses dlt, so the first command applies.",{"type":37,"tag":137,"props":943,"children":945},{"id":944},"_5-optional-validate-the-structure",[946],{"type":43,"value":947},"5. (Optional) Validate the structure",{"type":37,"tag":46,"props":949,"children":950},{},[951],{"type":43,"value":952},"Even before enhancement, you can sanity-check the YAMLs:",{"type":37,"tag":265,"props":954,"children":956},{"className":267,"code":955,"language":269,"meta":7,"style":7},"bruin validate --config-file context/.bruin.yml context\n",[957],{"type":37,"tag":52,"props":958,"children":959},{"__ignoreMap":7},[960],{"type":37,"tag":275,"props":961,"children":962},{"class":277,"line":278},[963,967,972,977,981],{"type":37,"tag":275,"props":964,"children":965},{"style":282},[966],{"type":43,"value":285},{"type":37,"tag":275,"props":968,"children":969},{"style":288},[970],{"type":43,"value":971}," validate",{"type":37,"tag":275,"props":973,"children":974},{"style":299},[975],{"type":43,"value":976}," --config-file",{"type":37,"tag":275,"props":978,"children":979},{"style":288},[980],{"type":43,"value":316},{"type":37,"tag":275,"props":982,"children":983},{"style":288},[984],{"type":43,"value":985}," context\n",{"type":37,"tag":46,"props":987,"children":988},{},[989],{"type":43,"value":990},"You should see one line per asset and a summary like:",{"type":37,"tag":265,"props":992,"children":995},{"className":993,"code":994,"language":43},[569],"✓ Successfully validated 40 assets across 1 pipeline, all good.\n",[996],{"type":37,"tag":52,"props":997,"children":998},{"__ignoreMap":7},[999],{"type":43,"value":994},{"type":37,"tag":46,"props":1001,"children":1002},{},[1003],{"type":43,"value":1004},"If you see parse errors, re-run the import for that schema — partial files can occasionally be left behind if the introspection is interrupted.",{"type":37,"tag":38,"props":1006,"children":1008},{"id":1007},"troubleshooting",[1009],{"type":43,"value":1010},"Troubleshooting",{"type":37,"tag":46,"props":1012,"children":1013},{},[1014],{"type":37,"tag":499,"props":1015,"children":1016},{},[1017],{"type":43,"value":1018},"\"connection not found\"",{"type":37,"tag":46,"props":1020,"children":1021},{},[1022,1024,1030,1032,1038,1040,1046],{"type":43,"value":1023},"You didn't pass ",{"type":37,"tag":52,"props":1025,"children":1027},{"className":1026},[],[1028],{"type":43,"value":1029},"--config-file",{"type":43,"value":1031},", so Bruin loaded a different ",{"type":37,"tag":52,"props":1033,"children":1035},{"className":1034},[],[1036],{"type":43,"value":1037},".bruin.yml",{"type":43,"value":1039}," from elsewhere in the repo. Always include ",{"type":37,"tag":52,"props":1041,"children":1043},{"className":1042},[],[1044],{"type":43,"value":1045},"--config-file context/.bruin.yml",{"type":43,"value":98},{"type":37,"tag":46,"props":1048,"children":1049},{},[1050],{"type":37,"tag":499,"props":1051,"children":1052},{},[1053],{"type":43,"value":1054},"\"permission denied\" / \"access denied\" on a schema",{"type":37,"tag":46,"props":1056,"children":1057},{},[1058,1060,1066,1068,1074],{"type":43,"value":1059},"Your connection identity is missing read access. For BigQuery, the role is ",{"type":37,"tag":52,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":43,"value":1065},"BigQuery Data Viewer",{"type":43,"value":1067}," on the dataset; for Postgres / Redshift, it's ",{"type":37,"tag":52,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":43,"value":1073},"SELECT",{"type":43,"value":1075}," on the schema's tables.",{"type":37,"tag":46,"props":1077,"children":1078},{},[1079],{"type":37,"tag":499,"props":1080,"children":1081},{},[1082,1084],{"type":43,"value":1083},"Some tables are missing from ",{"type":37,"tag":52,"props":1085,"children":1087},{"className":1086},[],[1088],{"type":43,"value":96},{"type":37,"tag":46,"props":1090,"children":1091},{},[1092,1097,1099,1104,1106,1112],{"type":37,"tag":52,"props":1093,"children":1095},{"className":1094},[],[1096],{"type":43,"value":57},{"type":43,"value":1098}," only writes assets for tables that exist ",{"type":37,"tag":116,"props":1100,"children":1101},{},[1102],{"type":43,"value":1103},"right now",{"type":43,"value":1105},". If a dbt model failed to materialize, it won't be there. Re-run ",{"type":37,"tag":52,"props":1107,"children":1109},{"className":1108},[],[1110],{"type":43,"value":1111},"dbt build",{"type":43,"value":1113},", then re-run the import.",{"type":37,"tag":46,"props":1115,"children":1116},{},[1117],{"type":37,"tag":499,"props":1118,"children":1119},{},[1120],{"type":43,"value":1121},"Import is slow on a large schema",{"type":37,"tag":46,"props":1123,"children":1124},{},[1125],{"type":43,"value":1126},"Each table costs one metadata round-trip. For a few hundred tables this is still a matter of seconds; if you have thousands, consider importing one schema at a time so partial progress isn't lost on Ctrl-C.",{"type":37,"tag":38,"props":1128,"children":1130},{"id":1129},"what-just-happened",[1131],{"type":43,"value":1132},"What just happened",{"type":37,"tag":46,"props":1134,"children":1135},{},[1136,1141],{"type":37,"tag":52,"props":1137,"children":1139},{"className":1138},[],[1140],{"type":43,"value":96},{"type":43,"value":1142}," now mirrors your warehouse: one YAML per table, with column names and types pulled directly from the live database. This is the skeleton — the structural truth that the rest of the module builds on. Next we'll let Claude (or your AI of choice) fill in the descriptions, tags, and quality checks.",{"type":37,"tag":1144,"props":1145,"children":1146},"style",{},[1147],{"type":43,"value":1148},"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":305,"depth":305,"links":1150},[1151,1152,1153,1160,1161],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":1154},[1155,1156,1157,1158,1159],{"id":139,"depth":17,"text":142},{"id":239,"depth":17,"text":242},{"id":530,"depth":17,"text":533},{"id":796,"depth":17,"text":799},{"id":944,"depth":17,"text":947},{"id":1007,"depth":305,"text":1010},{"id":1129,"depth":305,"text":1132},"markdown","content:tutorials:dbt-bruin-analyst:import-schemas.md","content","tutorials/dbt-bruin-analyst/import-schemas.md","tutorials/dbt-bruin-analyst/import-schemas","md",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":1169,"difficulty":16,"module":5,"step":17,"journeys":1170,"learnMore":1171,"stepGif":28,"author":1174,"body":1175,"_type":1162,"_id":1163,"_source":1164,"_file":1165,"_stem":1166,"_extension":1167},[14,15],[19,20],[1172,1173],{"label":23,"url":24},{"label":26,"url":27},{"name":30,"role":31,"image":32},{"type":34,"children":1176,"toc":2094},[1177,1181,1221,1225,1229,1243,1247,1251,1255,1297,1325,1329,1345,1452,1462,1539,1567,1571,1588,1598,1606,1610,1793,1797,1801,1811,1921,1925,1929,1933,1962,1966,1974,1978,1982,1989,2011,2018,2034,2046,2066,2073,2077,2081,2090],{"type":37,"tag":38,"props":1178,"children":1179},{"id":40},[1180],{"type":43,"value":44},{"type":37,"tag":46,"props":1182,"children":1183},{},[1184,1185,1190,1191,1196,1197,1202,1203,1208,1209,1214,1215,1220],{"type":43,"value":50},{"type":37,"tag":52,"props":1186,"children":1188},{"className":1187},[],[1189],{"type":43,"value":57},{"type":43,"value":59},{"type":37,"tag":52,"props":1192,"children":1194},{"className":1193},[],[1195],{"type":43,"value":65},{"type":43,"value":67},{"type":37,"tag":52,"props":1198,"children":1200},{"className":1199},[],[1201],{"type":43,"value":73},{"type":43,"value":67},{"type":37,"tag":52,"props":1204,"children":1206},{"className":1205},[],[1207],{"type":43,"value":80},{"type":43,"value":82},{"type":37,"tag":52,"props":1210,"children":1212},{"className":1211},[],[1213],{"type":43,"value":88},{"type":43,"value":90},{"type":37,"tag":52,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":43,"value":96},{"type":43,"value":98},{"type":37,"tag":38,"props":1222,"children":1223},{"id":101},[1224],{"type":43,"value":104},{"type":37,"tag":46,"props":1226,"children":1227},{},[1228],{"type":43,"value":109},{"type":37,"tag":46,"props":1230,"children":1231},{},[1232,1233,1237,1238,1242],{"type":43,"value":114},{"type":37,"tag":116,"props":1234,"children":1235},{},[1236],{"type":43,"value":120},{"type":43,"value":122},{"type":37,"tag":116,"props":1239,"children":1240},{},[1241],{"type":43,"value":127},{"type":43,"value":129},{"type":37,"tag":38,"props":1244,"children":1245},{"id":132},[1246],{"type":43,"value":135},{"type":37,"tag":137,"props":1248,"children":1249},{"id":139},[1250],{"type":43,"value":142},{"type":37,"tag":46,"props":1252,"children":1253},{},[1254],{"type":43,"value":147},{"type":37,"tag":149,"props":1256,"children":1257},{},[1258,1267,1282],{"type":37,"tag":153,"props":1259,"children":1260},{},[1261,1266],{"type":37,"tag":52,"props":1262,"children":1264},{"className":1263},[],[1265],{"type":43,"value":161},{"type":43,"value":163},{"type":37,"tag":153,"props":1268,"children":1269},{},[1270,1275,1276,1281],{"type":37,"tag":52,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":43,"value":172},{"type":43,"value":174},{"type":37,"tag":52,"props":1277,"children":1279},{"className":1278},[],[1280],{"type":43,"value":180},{"type":43,"value":182},{"type":37,"tag":153,"props":1283,"children":1284},{},[1285,1290,1291,1296],{"type":37,"tag":52,"props":1286,"children":1288},{"className":1287},[],[1289],{"type":43,"value":191},{"type":43,"value":174},{"type":37,"tag":52,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":43,"value":198},{"type":43,"value":182},{"type":37,"tag":46,"props":1298,"children":1299},{},[1300,1301,1306,1307,1312,1313,1318,1319,1324],{"type":43,"value":204},{"type":37,"tag":52,"props":1302,"children":1304},{"className":1303},[],[1305],{"type":43,"value":210},{"type":43,"value":212},{"type":37,"tag":52,"props":1308,"children":1310},{"className":1309},[],[1311],{"type":43,"value":218},{"type":43,"value":220},{"type":37,"tag":52,"props":1314,"children":1316},{"className":1315},[],[1317],{"type":43,"value":226},{"type":43,"value":228},{"type":37,"tag":52,"props":1320,"children":1322},{"className":1321},[],[1323],{"type":43,"value":234},{"type":43,"value":236},{"type":37,"tag":137,"props":1326,"children":1327},{"id":239},[1328],{"type":43,"value":242},{"type":37,"tag":46,"props":1330,"children":1331},{},[1332,1333,1338,1339,1344],{"type":43,"value":247},{"type":37,"tag":52,"props":1334,"children":1336},{"className":1335},[],[1337],{"type":43,"value":253},{"type":43,"value":255},{"type":37,"tag":52,"props":1340,"children":1342},{"className":1341},[],[1343],{"type":43,"value":261},{"type":43,"value":263},{"type":37,"tag":265,"props":1346,"children":1347},{"className":267,"code":268,"language":269,"meta":7,"style":7},[1348],{"type":37,"tag":52,"props":1349,"children":1350},{"__ignoreMap":7},[1351,1370,1385,1400,1415,1430,1445],{"type":37,"tag":275,"props":1352,"children":1353},{"class":277,"line":278},[1354,1358,1362,1366],{"type":37,"tag":275,"props":1355,"children":1356},{"style":282},[1357],{"type":43,"value":285},{"type":37,"tag":275,"props":1359,"children":1360},{"style":288},[1361],{"type":43,"value":291},{"type":37,"tag":275,"props":1363,"children":1364},{"style":288},[1365],{"type":43,"value":296},{"type":37,"tag":275,"props":1367,"children":1368},{"style":299},[1369],{"type":43,"value":302},{"type":37,"tag":275,"props":1371,"children":1372},{"class":277,"line":305},[1373,1377,1381],{"type":37,"tag":275,"props":1374,"children":1375},{"style":299},[1376],{"type":43,"value":311},{"type":37,"tag":275,"props":1378,"children":1379},{"style":288},[1380],{"type":43,"value":316},{"type":37,"tag":275,"props":1382,"children":1383},{"style":299},[1384],{"type":43,"value":302},{"type":37,"tag":275,"props":1386,"children":1387},{"class":277,"line":17},[1388,1392,1396],{"type":37,"tag":275,"props":1389,"children":1390},{"style":299},[1391],{"type":43,"value":328},{"type":37,"tag":275,"props":1393,"children":1394},{"style":288},[1395],{"type":43,"value":333},{"type":37,"tag":275,"props":1397,"children":1398},{"style":299},[1399],{"type":43,"value":302},{"type":37,"tag":275,"props":1401,"children":1402},{"class":277,"line":340},[1403,1407,1411],{"type":37,"tag":275,"props":1404,"children":1405},{"style":299},[1406],{"type":43,"value":346},{"type":37,"tag":275,"props":1408,"children":1409},{"style":288},[1410],{"type":43,"value":351},{"type":37,"tag":275,"props":1412,"children":1413},{"style":299},[1414],{"type":43,"value":302},{"type":37,"tag":275,"props":1416,"children":1417},{"class":277,"line":11},[1418,1422,1426],{"type":37,"tag":275,"props":1419,"children":1420},{"style":299},[1421],{"type":43,"value":346},{"type":37,"tag":275,"props":1423,"children":1424},{"style":288},[1425],{"type":43,"value":367},{"type":37,"tag":275,"props":1427,"children":1428},{"style":299},[1429],{"type":43,"value":302},{"type":37,"tag":275,"props":1431,"children":1432},{"class":277,"line":374},[1433,1437,1441],{"type":37,"tag":275,"props":1434,"children":1435},{"style":299},[1436],{"type":43,"value":346},{"type":37,"tag":275,"props":1438,"children":1439},{"style":288},[1440],{"type":43,"value":384},{"type":37,"tag":275,"props":1442,"children":1443},{"style":299},[1444],{"type":43,"value":302},{"type":37,"tag":275,"props":1446,"children":1447},{"class":277,"line":391},[1448],{"type":37,"tag":275,"props":1449,"children":1450},{"style":288},[1451],{"type":43,"value":397},{"type":37,"tag":46,"props":1453,"children":1454},{},[1455,1456,1461],{"type":43,"value":402},{"type":37,"tag":52,"props":1457,"children":1459},{"className":1458},[],[1460],{"type":43,"value":408},{"type":43,"value":410},{"type":37,"tag":265,"props":1463,"children":1464},{"className":267,"code":413,"language":269,"meta":7,"style":7},[1465],{"type":37,"tag":52,"props":1466,"children":1467},{"__ignoreMap":7},[1468,1487,1502,1517,1532],{"type":37,"tag":275,"props":1469,"children":1470},{"class":277,"line":278},[1471,1475,1479,1483],{"type":37,"tag":275,"props":1472,"children":1473},{"style":282},[1474],{"type":43,"value":285},{"type":37,"tag":275,"props":1476,"children":1477},{"style":288},[1478],{"type":43,"value":291},{"type":37,"tag":275,"props":1480,"children":1481},{"style":288},[1482],{"type":43,"value":296},{"type":37,"tag":275,"props":1484,"children":1485},{"style":299},[1486],{"type":43,"value":302},{"type":37,"tag":275,"props":1488,"children":1489},{"class":277,"line":305},[1490,1494,1498],{"type":37,"tag":275,"props":1491,"children":1492},{"style":299},[1493],{"type":43,"value":311},{"type":37,"tag":275,"props":1495,"children":1496},{"style":288},[1497],{"type":43,"value":316},{"type":37,"tag":275,"props":1499,"children":1500},{"style":299},[1501],{"type":43,"value":302},{"type":37,"tag":275,"props":1503,"children":1504},{"class":277,"line":17},[1505,1509,1513],{"type":37,"tag":275,"props":1506,"children":1507},{"style":299},[1508],{"type":43,"value":328},{"type":37,"tag":275,"props":1510,"children":1511},{"style":288},[1512],{"type":43,"value":463},{"type":37,"tag":275,"props":1514,"children":1515},{"style":299},[1516],{"type":43,"value":302},{"type":37,"tag":275,"props":1518,"children":1519},{"class":277,"line":340},[1520,1524,1528],{"type":37,"tag":275,"props":1521,"children":1522},{"style":299},[1523],{"type":43,"value":475},{"type":37,"tag":275,"props":1525,"children":1526},{"style":288},[1527],{"type":43,"value":367},{"type":37,"tag":275,"props":1529,"children":1530},{"style":299},[1531],{"type":43,"value":302},{"type":37,"tag":275,"props":1533,"children":1534},{"class":277,"line":11},[1535],{"type":37,"tag":275,"props":1536,"children":1537},{"style":288},[1538],{"type":43,"value":397},{"type":37,"tag":492,"props":1540,"children":1541},{},[1542],{"type":37,"tag":46,"props":1543,"children":1544},{},[1545,1549,1550,1554,1555,1560,1561,1566],{"type":37,"tag":499,"props":1546,"children":1547},{},[1548],{"type":43,"value":503},{"type":43,"value":505},{"type":37,"tag":499,"props":1551,"children":1552},{},[1553],{"type":43,"value":510},{"type":43,"value":512},{"type":37,"tag":52,"props":1556,"children":1558},{"className":1557},[],[1559],{"type":43,"value":518},{"type":43,"value":520},{"type":37,"tag":52,"props":1562,"children":1564},{"className":1563},[],[1565],{"type":43,"value":526},{"type":43,"value":98},{"type":37,"tag":137,"props":1568,"children":1569},{"id":530},[1570],{"type":43,"value":533},{"type":37,"tag":265,"props":1572,"children":1573},{"className":267,"code":536,"language":269,"meta":7,"style":7},[1574],{"type":37,"tag":52,"props":1575,"children":1576},{"__ignoreMap":7},[1577],{"type":37,"tag":275,"props":1578,"children":1579},{"class":277,"line":278},[1580,1584],{"type":37,"tag":275,"props":1581,"children":1582},{"style":282},[1583],{"type":43,"value":548},{"type":37,"tag":275,"props":1585,"children":1586},{"style":288},[1587],{"type":43,"value":553},{"type":37,"tag":46,"props":1589,"children":1590},{},[1591,1592,1597],{"type":43,"value":558},{"type":37,"tag":52,"props":1593,"children":1595},{"className":1594},[],[1596],{"type":43,"value":88},{"type":43,"value":565},{"type":37,"tag":265,"props":1599,"children":1601},{"className":1600,"code":570,"language":43},[569],[1602],{"type":37,"tag":52,"props":1603,"children":1604},{"__ignoreMap":7},[1605],{"type":43,"value":570},{"type":37,"tag":46,"props":1607,"children":1608},{},[1609],{"type":43,"value":580},{"type":37,"tag":265,"props":1611,"children":1612},{"className":583,"code":584,"language":585,"meta":7,"style":7},[1613],{"type":37,"tag":52,"props":1614,"children":1615},{"__ignoreMap":7},[1616,1631,1646,1657,1676,1691,1710,1725,1744,1759,1778],{"type":37,"tag":275,"props":1617,"children":1618},{"class":277,"line":278},[1619,1623,1627],{"type":37,"tag":275,"props":1620,"children":1621},{"style":595},[1622],{"type":43,"value":598},{"type":37,"tag":275,"props":1624,"children":1625},{"style":601},[1626],{"type":43,"value":604},{"type":37,"tag":275,"props":1628,"children":1629},{"style":288},[1630],{"type":43,"value":609},{"type":37,"tag":275,"props":1632,"children":1633},{"class":277,"line":305},[1634,1638,1642],{"type":37,"tag":275,"props":1635,"children":1636},{"style":595},[1637],{"type":43,"value":617},{"type":37,"tag":275,"props":1639,"children":1640},{"style":601},[1641],{"type":43,"value":604},{"type":37,"tag":275,"props":1643,"children":1644},{"style":288},[1645],{"type":43,"value":626},{"type":37,"tag":275,"props":1647,"children":1648},{"class":277,"line":17},[1649,1653],{"type":37,"tag":275,"props":1650,"children":1651},{"style":595},[1652],{"type":43,"value":634},{"type":37,"tag":275,"props":1654,"children":1655},{"style":601},[1656],{"type":43,"value":639},{"type":37,"tag":275,"props":1658,"children":1659},{"class":277,"line":340},[1660,1664,1668,1672],{"type":37,"tag":275,"props":1661,"children":1662},{"style":601},[1663],{"type":43,"value":647},{"type":37,"tag":275,"props":1665,"children":1666},{"style":595},[1667],{"type":43,"value":598},{"type":37,"tag":275,"props":1669,"children":1670},{"style":601},[1671],{"type":43,"value":604},{"type":37,"tag":275,"props":1673,"children":1674},{"style":288},[1675],{"type":43,"value":660},{"type":37,"tag":275,"props":1677,"children":1678},{"class":277,"line":11},[1679,1683,1687],{"type":37,"tag":275,"props":1680,"children":1681},{"style":595},[1682],{"type":43,"value":668},{"type":37,"tag":275,"props":1684,"children":1685},{"style":601},[1686],{"type":43,"value":604},{"type":37,"tag":275,"props":1688,"children":1689},{"style":288},[1690],{"type":43,"value":677},{"type":37,"tag":275,"props":1692,"children":1693},{"class":277,"line":374},[1694,1698,1702,1706],{"type":37,"tag":275,"props":1695,"children":1696},{"style":601},[1697],{"type":43,"value":647},{"type":37,"tag":275,"props":1699,"children":1700},{"style":595},[1701],{"type":43,"value":598},{"type":37,"tag":275,"props":1703,"children":1704},{"style":601},[1705],{"type":43,"value":604},{"type":37,"tag":275,"props":1707,"children":1708},{"style":288},[1709],{"type":43,"value":697},{"type":37,"tag":275,"props":1711,"children":1712},{"class":277,"line":391},[1713,1717,1721],{"type":37,"tag":275,"props":1714,"children":1715},{"style":595},[1716],{"type":43,"value":668},{"type":37,"tag":275,"props":1718,"children":1719},{"style":601},[1720],{"type":43,"value":604},{"type":37,"tag":275,"props":1722,"children":1723},{"style":288},[1724],{"type":43,"value":677},{"type":37,"tag":275,"props":1726,"children":1727},{"class":277,"line":715},[1728,1732,1736,1740],{"type":37,"tag":275,"props":1729,"children":1730},{"style":601},[1731],{"type":43,"value":647},{"type":37,"tag":275,"props":1733,"children":1734},{"style":595},[1735],{"type":43,"value":598},{"type":37,"tag":275,"props":1737,"children":1738},{"style":601},[1739],{"type":43,"value":604},{"type":37,"tag":275,"props":1741,"children":1742},{"style":288},[1743],{"type":43,"value":733},{"type":37,"tag":275,"props":1745,"children":1746},{"class":277,"line":736},[1747,1751,1755],{"type":37,"tag":275,"props":1748,"children":1749},{"style":595},[1750],{"type":43,"value":668},{"type":37,"tag":275,"props":1752,"children":1753},{"style":601},[1754],{"type":43,"value":604},{"type":37,"tag":275,"props":1756,"children":1757},{"style":288},[1758],{"type":43,"value":750},{"type":37,"tag":275,"props":1760,"children":1761},{"class":277,"line":753},[1762,1766,1770,1774],{"type":37,"tag":275,"props":1763,"children":1764},{"style":601},[1765],{"type":43,"value":647},{"type":37,"tag":275,"props":1767,"children":1768},{"style":595},[1769],{"type":43,"value":598},{"type":37,"tag":275,"props":1771,"children":1772},{"style":601},[1773],{"type":43,"value":604},{"type":37,"tag":275,"props":1775,"children":1776},{"style":288},[1777],{"type":43,"value":771},{"type":37,"tag":275,"props":1779,"children":1780},{"class":277,"line":774},[1781,1785,1789],{"type":37,"tag":275,"props":1782,"children":1783},{"style":595},[1784],{"type":43,"value":668},{"type":37,"tag":275,"props":1786,"children":1787},{"style":601},[1788],{"type":43,"value":604},{"type":37,"tag":275,"props":1790,"children":1791},{"style":288},[1792],{"type":43,"value":788},{"type":37,"tag":46,"props":1794,"children":1795},{},[1796],{"type":43,"value":793},{"type":37,"tag":137,"props":1798,"children":1799},{"id":796},[1800],{"type":43,"value":799},{"type":37,"tag":46,"props":1802,"children":1803},{},[1804,1805,1810],{"type":43,"value":804},{"type":37,"tag":52,"props":1806,"children":1808},{"className":1807},[],[1809],{"type":43,"value":810},{"type":43,"value":812},{"type":37,"tag":265,"props":1812,"children":1813},{"className":267,"code":815,"language":269,"meta":7,"style":7},[1814],{"type":37,"tag":52,"props":1815,"children":1816},{"__ignoreMap":7},[1817,1824,1847,1854,1861,1884,1891,1898],{"type":37,"tag":275,"props":1818,"children":1819},{"class":277,"line":278},[1820],{"type":37,"tag":275,"props":1821,"children":1822},{"style":825},[1823],{"type":43,"value":828},{"type":37,"tag":275,"props":1825,"children":1826},{"class":277,"line":305},[1827,1831,1835,1839,1843],{"type":37,"tag":275,"props":1828,"children":1829},{"style":282},[1830],{"type":43,"value":836},{"type":37,"tag":275,"props":1832,"children":1833},{"style":288},[1834],{"type":43,"value":841},{"type":37,"tag":275,"props":1836,"children":1837},{"style":299},[1838],{"type":43,"value":846},{"type":37,"tag":275,"props":1840,"children":1841},{"style":288},[1842],{"type":43,"value":851},{"type":37,"tag":275,"props":1844,"children":1845},{"style":299},[1846],{"type":43,"value":856},{"type":37,"tag":275,"props":1848,"children":1849},{"class":277,"line":17},[1850],{"type":37,"tag":275,"props":1851,"children":1852},{"emptyLinePlaceholder":862},[1853],{"type":43,"value":865},{"type":37,"tag":275,"props":1855,"children":1856},{"class":277,"line":340},[1857],{"type":37,"tag":275,"props":1858,"children":1859},{"style":825},[1860],{"type":43,"value":873},{"type":37,"tag":275,"props":1862,"children":1863},{"class":277,"line":11},[1864,1868,1872,1876,1880],{"type":37,"tag":275,"props":1865,"children":1866},{"style":282},[1867],{"type":43,"value":836},{"type":37,"tag":275,"props":1869,"children":1870},{"style":288},[1871],{"type":43,"value":841},{"type":37,"tag":275,"props":1873,"children":1874},{"style":299},[1875],{"type":43,"value":846},{"type":37,"tag":275,"props":1877,"children":1878},{"style":288},[1879],{"type":43,"value":893},{"type":37,"tag":275,"props":1881,"children":1882},{"style":299},[1883],{"type":43,"value":856},{"type":37,"tag":275,"props":1885,"children":1886},{"class":277,"line":374},[1887],{"type":37,"tag":275,"props":1888,"children":1889},{"emptyLinePlaceholder":862},[1890],{"type":43,"value":865},{"type":37,"tag":275,"props":1892,"children":1893},{"class":277,"line":391},[1894],{"type":37,"tag":275,"props":1895,"children":1896},{"style":825},[1897],{"type":43,"value":912},{"type":37,"tag":275,"props":1899,"children":1900},{"class":277,"line":715},[1901,1905,1909,1913,1917],{"type":37,"tag":275,"props":1902,"children":1903},{"style":282},[1904],{"type":43,"value":836},{"type":37,"tag":275,"props":1906,"children":1907},{"style":288},[1908],{"type":43,"value":841},{"type":37,"tag":275,"props":1910,"children":1911},{"style":299},[1912],{"type":43,"value":846},{"type":37,"tag":275,"props":1914,"children":1915},{"style":288},[1916],{"type":43,"value":932},{"type":37,"tag":275,"props":1918,"children":1919},{"style":299},[1920],{"type":43,"value":856},{"type":37,"tag":46,"props":1922,"children":1923},{},[1924],{"type":43,"value":941},{"type":37,"tag":137,"props":1926,"children":1927},{"id":944},[1928],{"type":43,"value":947},{"type":37,"tag":46,"props":1930,"children":1931},{},[1932],{"type":43,"value":952},{"type":37,"tag":265,"props":1934,"children":1935},{"className":267,"code":955,"language":269,"meta":7,"style":7},[1936],{"type":37,"tag":52,"props":1937,"children":1938},{"__ignoreMap":7},[1939],{"type":37,"tag":275,"props":1940,"children":1941},{"class":277,"line":278},[1942,1946,1950,1954,1958],{"type":37,"tag":275,"props":1943,"children":1944},{"style":282},[1945],{"type":43,"value":285},{"type":37,"tag":275,"props":1947,"children":1948},{"style":288},[1949],{"type":43,"value":971},{"type":37,"tag":275,"props":1951,"children":1952},{"style":299},[1953],{"type":43,"value":976},{"type":37,"tag":275,"props":1955,"children":1956},{"style":288},[1957],{"type":43,"value":316},{"type":37,"tag":275,"props":1959,"children":1960},{"style":288},[1961],{"type":43,"value":985},{"type":37,"tag":46,"props":1963,"children":1964},{},[1965],{"type":43,"value":990},{"type":37,"tag":265,"props":1967,"children":1969},{"className":1968,"code":994,"language":43},[569],[1970],{"type":37,"tag":52,"props":1971,"children":1972},{"__ignoreMap":7},[1973],{"type":43,"value":994},{"type":37,"tag":46,"props":1975,"children":1976},{},[1977],{"type":43,"value":1004},{"type":37,"tag":38,"props":1979,"children":1980},{"id":1007},[1981],{"type":43,"value":1010},{"type":37,"tag":46,"props":1983,"children":1984},{},[1985],{"type":37,"tag":499,"props":1986,"children":1987},{},[1988],{"type":43,"value":1018},{"type":37,"tag":46,"props":1990,"children":1991},{},[1992,1993,1998,1999,2004,2005,2010],{"type":43,"value":1023},{"type":37,"tag":52,"props":1994,"children":1996},{"className":1995},[],[1997],{"type":43,"value":1029},{"type":43,"value":1031},{"type":37,"tag":52,"props":2000,"children":2002},{"className":2001},[],[2003],{"type":43,"value":1037},{"type":43,"value":1039},{"type":37,"tag":52,"props":2006,"children":2008},{"className":2007},[],[2009],{"type":43,"value":1045},{"type":43,"value":98},{"type":37,"tag":46,"props":2012,"children":2013},{},[2014],{"type":37,"tag":499,"props":2015,"children":2016},{},[2017],{"type":43,"value":1054},{"type":37,"tag":46,"props":2019,"children":2020},{},[2021,2022,2027,2028,2033],{"type":43,"value":1059},{"type":37,"tag":52,"props":2023,"children":2025},{"className":2024},[],[2026],{"type":43,"value":1065},{"type":43,"value":1067},{"type":37,"tag":52,"props":2029,"children":2031},{"className":2030},[],[2032],{"type":43,"value":1073},{"type":43,"value":1075},{"type":37,"tag":46,"props":2035,"children":2036},{},[2037],{"type":37,"tag":499,"props":2038,"children":2039},{},[2040,2041],{"type":43,"value":1083},{"type":37,"tag":52,"props":2042,"children":2044},{"className":2043},[],[2045],{"type":43,"value":96},{"type":37,"tag":46,"props":2047,"children":2048},{},[2049,2054,2055,2059,2060,2065],{"type":37,"tag":52,"props":2050,"children":2052},{"className":2051},[],[2053],{"type":43,"value":57},{"type":43,"value":1098},{"type":37,"tag":116,"props":2056,"children":2057},{},[2058],{"type":43,"value":1103},{"type":43,"value":1105},{"type":37,"tag":52,"props":2061,"children":2063},{"className":2062},[],[2064],{"type":43,"value":1111},{"type":43,"value":1113},{"type":37,"tag":46,"props":2067,"children":2068},{},[2069],{"type":37,"tag":499,"props":2070,"children":2071},{},[2072],{"type":43,"value":1121},{"type":37,"tag":46,"props":2074,"children":2075},{},[2076],{"type":43,"value":1126},{"type":37,"tag":38,"props":2078,"children":2079},{"id":1129},[2080],{"type":43,"value":1132},{"type":37,"tag":46,"props":2082,"children":2083},{},[2084,2089],{"type":37,"tag":52,"props":2085,"children":2087},{"className":2086},[],[2088],{"type":43,"value":96},{"type":43,"value":1142},{"type":37,"tag":1144,"props":2091,"children":2092},{},[2093],{"type":43,"value":1148},{"title":7,"searchDepth":305,"depth":305,"links":2095},[2096,2097,2098,2105,2106],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":2099},[2100,2101,2102,2103,2104],{"id":139,"depth":17,"text":142},{"id":239,"depth":17,"text":242},{"id":530,"depth":17,"text":533},{"id":796,"depth":17,"text":799},{"id":944,"depth":17,"text":947},{"id":1007,"depth":305,"text":1010},{"id":1129,"depth":305,"text":1132},[2108,2655,3847,4786,6174],{"_path":2109,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2110,"description":2111,"date":10,"readingTime":340,"category":12,"tags":2112,"difficulty":16,"module":5,"step":278,"journeys":2114,"learnMore":2115,"stepGif":28,"author":2125,"body":2126,"_type":1162,"_id":2652,"_source":1164,"_file":2653,"_stem":2654,"_extension":1167},"/tutorials/dbt-bruin-analyst/dbt-prerequisite","Start From an Existing dbt Pipeline","A quick recap of the dbt setup this module assumes — staging models, mart models, and a warehouse already loaded with data.",[15,2113],"BigQuery",[19,20],[2116,2119,2122],{"label":2117,"url":2118},"Reference project: contoso-dbt on GitHub","https://github.com/arsalann/data_playground/tree/main/contoso-dbt",{"label":2120,"url":2121},"dbt + BigQuery profile setup","https://docs.getdbt.com/docs/core/connect-data-platform/bigquery-setup",{"label":2123,"url":2124},"Generating custom schema names in dbt","https://docs.getdbt.com/docs/build/custom-schemas",{"name":30,"role":31,"image":32},{"type":34,"children":2127,"toc":2642},[2128,2132,2137,2141,2160,2182,2197,2201,2207,2219,2228,2240,2246,2251,2389,2424,2430,2435,2454,2459,2500,2505,2618,2623,2627,2638],{"type":37,"tag":38,"props":2129,"children":2130},{"id":40},[2131],{"type":43,"value":44},{"type":37,"tag":46,"props":2133,"children":2134},{},[2135],{"type":43,"value":2136},"Confirm your dbt project is built and that the resulting tables exist in your warehouse. Everything in this module assumes those tables are already there — Bruin won't run dbt for you, it just describes what's in the warehouse afterward.",{"type":37,"tag":38,"props":2138,"children":2139},{"id":101},[2140],{"type":43,"value":104},{"type":37,"tag":46,"props":2142,"children":2143},{},[2144,2146,2151,2153,2158],{"type":43,"value":2145},"The Bruin context layer is ",{"type":37,"tag":499,"props":2147,"children":2148},{},[2149],{"type":43,"value":2150},"documentation-only",{"type":43,"value":2152}," for your dbt pipeline. It introspects the warehouse, not your dbt repo. So if your models haven't materialized yet, Bruin has nothing to import. Get ",{"type":37,"tag":52,"props":2154,"children":2156},{"className":2155},[],[2157],{"type":43,"value":1111},{"type":43,"value":2159}," green first, then come back.",{"type":37,"tag":46,"props":2161,"children":2162},{},[2163,2165,2173,2175,2180],{"type":43,"value":2164},"If you don't already have a project to follow along with, the ",{"type":37,"tag":2166,"props":2167,"children":2170},"a",{"href":2118,"rel":2168},[2169],"nofollow",[2171],{"type":43,"value":2172},"contoso-dbt reference repo",{"type":43,"value":2174}," is a complete worked example: dlt loads raw Contoso retail data into BigQuery, dbt builds 10 staging models and 7 report models on top, and the ",{"type":37,"tag":52,"props":2176,"children":2178},{"className":2177},[],[2179],{"type":43,"value":253},{"type":43,"value":2181}," directory holds the Bruin layer we'll build in the next steps.",{"type":37,"tag":492,"props":2183,"children":2184},{},[2185],{"type":37,"tag":46,"props":2186,"children":2187},{},[2188,2190,2196],{"type":43,"value":2189},"If you already have a dbt project building cleanly into a warehouse, skim this page and skip ahead to ",{"type":37,"tag":2166,"props":2191,"children":2193},{"href":2192},"/learn/dbt-bruin-analyst/isolated-context",[2194],{"type":43,"value":2195},"Step 2: Create an Isolated Bruin Context",{"type":43,"value":98},{"type":37,"tag":38,"props":2198,"children":2199},{"id":132},[2200],{"type":43,"value":135},{"type":37,"tag":137,"props":2202,"children":2204},{"id":2203},"reference-project-layout",[2205],{"type":43,"value":2206},"Reference project layout",{"type":37,"tag":46,"props":2208,"children":2209},{},[2210,2212,2217],{"type":43,"value":2211},"The reference project ends up looking like this. The ",{"type":37,"tag":52,"props":2213,"children":2215},{"className":2214},[],[2216],{"type":43,"value":253},{"type":43,"value":2218}," directory is what this module produces — everything else is dbt prerequisites:",{"type":37,"tag":265,"props":2220,"children":2223},{"className":2221,"code":2222,"language":43},[569],"contoso-dbt/\n├── ingest/pipeline.py         # dlt — loads raw tables to BigQuery\n├── models/                    # dbt — staging + reports\n│   ├── sources.yml\n│   ├── staging/stg_*.sql      (10)\n│   └── reports/rpt_*.sql      (7)\n├── context/                   # ← the Bruin context layer (this module)\n│   ├── .bruin.yml\n│   ├── pipeline.yml\n│   └── assets/\n│       ├── contoso_dbt_raw/*.asset.yml      (23)\n│       ├── contoso_dbt_staging/*.asset.yml  (10)\n│       └── contoso_dbt_reports/*.asset.yml  (7)\n├── AGENTS.md                  # how agents should use the context\n└── run_pipeline.sh            # dlt ingest + dbt build\n",[2224],{"type":37,"tag":52,"props":2225,"children":2226},{"__ignoreMap":7},[2227],{"type":43,"value":2222},{"type":37,"tag":46,"props":2229,"children":2230},{},[2231,2233,2238],{"type":43,"value":2232},"The end state is ",{"type":37,"tag":499,"props":2234,"children":2235},{},[2236],{"type":43,"value":2237},"40 YAMLs",{"type":43,"value":2239}," — one per materialized table — covering raw ingest, staging, and reports.",{"type":37,"tag":137,"props":2241,"children":2243},{"id":2242},"what-the-dbt-half-looks-like",[2244],{"type":43,"value":2245},"What the dbt half looks like",{"type":37,"tag":46,"props":2247,"children":2248},{},[2249],{"type":43,"value":2250},"The contoso-dbt project uses a fairly standard dbt-on-BigQuery setup. If yours looks similar, you're ready:",{"type":37,"tag":149,"props":2252,"children":2253},{},[2254,2290,2309,2328,2346,2379],{"type":37,"tag":153,"props":2255,"children":2256},{},[2257,2259,2264,2266,2272,2274,2280,2282,2288],{"type":43,"value":2258},"A ",{"type":37,"tag":52,"props":2260,"children":2262},{"className":2261},[],[2263],{"type":43,"value":210},{"type":43,"value":2265}," and a ",{"type":37,"tag":52,"props":2267,"children":2269},{"className":2268},[],[2270],{"type":43,"value":2271},"profiles.yml",{"type":43,"value":2273}," (the reference uses OAuth via ",{"type":37,"tag":52,"props":2275,"children":2277},{"className":2276},[],[2278],{"type":43,"value":2279},"gcloud auth application-default login",{"type":43,"value":2281},", location ",{"type":37,"tag":52,"props":2283,"children":2285},{"className":2284},[],[2286],{"type":43,"value":2287},"EU",{"type":43,"value":2289},")",{"type":37,"tag":153,"props":2291,"children":2292},{},[2293,2294,2300,2302,2307],{"type":43,"value":2258},{"type":37,"tag":52,"props":2295,"children":2297},{"className":2296},[],[2298],{"type":43,"value":2299},"models/sources.yml",{"type":43,"value":2301}," declaring raw tables loaded by dlt into a ",{"type":37,"tag":52,"props":2303,"children":2305},{"className":2304},[],[2306],{"type":43,"value":65},{"type":43,"value":2308}," schema",{"type":37,"tag":153,"props":2310,"children":2311},{},[2312,2314,2320,2322,2327],{"type":43,"value":2313},"Staging models (",{"type":37,"tag":52,"props":2315,"children":2317},{"className":2316},[],[2318],{"type":43,"value":2319},"stg_*.sql",{"type":43,"value":2321},") materialized into a ",{"type":37,"tag":52,"props":2323,"children":2325},{"className":2324},[],[2326],{"type":43,"value":73},{"type":43,"value":2308},{"type":37,"tag":153,"props":2329,"children":2330},{},[2331,2333,2339,2340,2345],{"type":43,"value":2332},"Report / mart models (",{"type":37,"tag":52,"props":2334,"children":2336},{"className":2335},[],[2337],{"type":43,"value":2338},"rpt_*.sql",{"type":43,"value":2321},{"type":37,"tag":52,"props":2341,"children":2343},{"className":2342},[],[2344],{"type":43,"value":80},{"type":43,"value":2308},{"type":37,"tag":153,"props":2347,"children":2348},{},[2349,2350,2356,2358,2364,2366,2371,2373],{"type":43,"value":2258},{"type":37,"tag":52,"props":2351,"children":2353},{"className":2352},[],[2354],{"type":43,"value":2355},"generate_schema_name.sql",{"type":43,"value":2357}," macro so a ",{"type":37,"tag":52,"props":2359,"children":2361},{"className":2360},[],[2362],{"type":43,"value":2363},"+schema: staging",{"type":43,"value":2365}," config lands as ",{"type":37,"tag":52,"props":2367,"children":2369},{"className":2368},[],[2370],{"type":43,"value":172},{"type":43,"value":2372},", not ",{"type":37,"tag":52,"props":2374,"children":2376},{"className":2375},[],[2377],{"type":43,"value":2378},"contoso_dbt_contoso_dbt_staging",{"type":37,"tag":153,"props":2380,"children":2381},{},[2382,2387],{"type":37,"tag":52,"props":2383,"children":2385},{"className":2384},[],[2386],{"type":43,"value":1111},{"type":43,"value":2388}," runs cleanly and the tables exist in the warehouse",{"type":37,"tag":492,"props":2390,"children":2391},{},[2392],{"type":37,"tag":46,"props":2393,"children":2394},{},[2395,2400,2402,2407,2409,2415,2417,2422],{"type":37,"tag":499,"props":2396,"children":2397},{},[2398],{"type":43,"value":2399},"Heads up on schema naming.",{"type":43,"value":2401}," dbt's default ",{"type":37,"tag":52,"props":2403,"children":2405},{"className":2404},[],[2406],{"type":43,"value":234},{"type":43,"value":2408}," macro concatenates the target schema with the ",{"type":37,"tag":52,"props":2410,"children":2412},{"className":2411},[],[2413],{"type":43,"value":2414},"+schema",{"type":43,"value":2416}," config, which is rarely what you want. The reference project overrides it to use the ",{"type":37,"tag":52,"props":2418,"children":2420},{"className":2419},[],[2421],{"type":43,"value":2414},{"type":43,"value":2423}," value directly. If your final schema names look doubled-up, this is usually why.",{"type":37,"tag":137,"props":2425,"children":2427},{"id":2426},"verify-the-warehouse-has-data",[2428],{"type":43,"value":2429},"Verify the warehouse has data",{"type":37,"tag":46,"props":2431,"children":2432},{},[2433],{"type":43,"value":2434},"Before moving to the Bruin steps, make sure your dbt-built tables actually exist. From your dbt project root:",{"type":37,"tag":265,"props":2436,"children":2438},{"className":267,"code":2437,"language":269,"meta":7,"style":7},"dbt build\n",[2439],{"type":37,"tag":52,"props":2440,"children":2441},{"__ignoreMap":7},[2442],{"type":37,"tag":275,"props":2443,"children":2444},{"class":277,"line":278},[2445,2449],{"type":37,"tag":275,"props":2446,"children":2447},{"style":282},[2448],{"type":43,"value":15},{"type":37,"tag":275,"props":2450,"children":2451},{"style":288},[2452],{"type":43,"value":2453}," build\n",{"type":37,"tag":46,"props":2455,"children":2456},{},[2457],{"type":43,"value":2458},"Then spot-check the warehouse. For BigQuery:",{"type":37,"tag":265,"props":2460,"children":2462},{"className":267,"code":2461,"language":269,"meta":7,"style":7},"bq ls bruin-playground-arsalan:contoso_dbt_staging\nbq ls bruin-playground-arsalan:contoso_dbt_reports\n",[2463],{"type":37,"tag":52,"props":2464,"children":2465},{"__ignoreMap":7},[2466,2484],{"type":37,"tag":275,"props":2467,"children":2468},{"class":277,"line":278},[2469,2474,2479],{"type":37,"tag":275,"props":2470,"children":2471},{"style":282},[2472],{"type":43,"value":2473},"bq",{"type":37,"tag":275,"props":2475,"children":2476},{"style":288},[2477],{"type":43,"value":2478}," ls",{"type":37,"tag":275,"props":2480,"children":2481},{"style":288},[2482],{"type":43,"value":2483}," bruin-playground-arsalan:contoso_dbt_staging\n",{"type":37,"tag":275,"props":2485,"children":2486},{"class":277,"line":305},[2487,2491,2495],{"type":37,"tag":275,"props":2488,"children":2489},{"style":282},[2490],{"type":43,"value":2473},{"type":37,"tag":275,"props":2492,"children":2493},{"style":288},[2494],{"type":43,"value":2478},{"type":37,"tag":275,"props":2496,"children":2497},{"style":288},[2498],{"type":43,"value":2499}," bruin-playground-arsalan:contoso_dbt_reports\n",{"type":37,"tag":46,"props":2501,"children":2502},{},[2503],{"type":43,"value":2504},"For Postgres / Redshift:",{"type":37,"tag":265,"props":2506,"children":2510},{"className":2507,"code":2508,"language":2509,"meta":7,"style":7},"language-sql shiki shiki-themes github-dark","SELECT table_schema, table_name\nFROM information_schema.tables\nWHERE table_schema IN ('contoso_dbt_staging', 'contoso_dbt_reports')\nORDER BY 1, 2;\n","sql",[2511],{"type":37,"tag":52,"props":2512,"children":2513},{"__ignoreMap":7},[2514,2527,2549,2591],{"type":37,"tag":275,"props":2515,"children":2516},{"class":277,"line":278},[2517,2522],{"type":37,"tag":275,"props":2518,"children":2520},{"style":2519},"--shiki-default:#F97583",[2521],{"type":43,"value":1073},{"type":37,"tag":275,"props":2523,"children":2524},{"style":601},[2525],{"type":43,"value":2526}," table_schema, table_name\n",{"type":37,"tag":275,"props":2528,"children":2529},{"class":277,"line":305},[2530,2535,2540,2544],{"type":37,"tag":275,"props":2531,"children":2532},{"style":2519},[2533],{"type":43,"value":2534},"FROM",{"type":37,"tag":275,"props":2536,"children":2537},{"style":299},[2538],{"type":43,"value":2539}," information_schema",{"type":37,"tag":275,"props":2541,"children":2542},{"style":601},[2543],{"type":43,"value":98},{"type":37,"tag":275,"props":2545,"children":2546},{"style":299},[2547],{"type":43,"value":2548},"tables\n",{"type":37,"tag":275,"props":2550,"children":2551},{"class":277,"line":17},[2552,2557,2562,2567,2572,2577,2581,2586],{"type":37,"tag":275,"props":2553,"children":2554},{"style":2519},[2555],{"type":43,"value":2556},"WHERE",{"type":37,"tag":275,"props":2558,"children":2559},{"style":601},[2560],{"type":43,"value":2561}," table_schema ",{"type":37,"tag":275,"props":2563,"children":2564},{"style":2519},[2565],{"type":43,"value":2566},"IN",{"type":37,"tag":275,"props":2568,"children":2569},{"style":601},[2570],{"type":43,"value":2571}," (",{"type":37,"tag":275,"props":2573,"children":2574},{"style":288},[2575],{"type":43,"value":2576},"'contoso_dbt_staging'",{"type":37,"tag":275,"props":2578,"children":2579},{"style":601},[2580],{"type":43,"value":67},{"type":37,"tag":275,"props":2582,"children":2583},{"style":288},[2584],{"type":43,"value":2585},"'contoso_dbt_reports'",{"type":37,"tag":275,"props":2587,"children":2588},{"style":601},[2589],{"type":43,"value":2590},")\n",{"type":37,"tag":275,"props":2592,"children":2593},{"class":277,"line":340},[2594,2599,2604,2608,2613],{"type":37,"tag":275,"props":2595,"children":2596},{"style":2519},[2597],{"type":43,"value":2598},"ORDER BY",{"type":37,"tag":275,"props":2600,"children":2601},{"style":299},[2602],{"type":43,"value":2603}," 1",{"type":37,"tag":275,"props":2605,"children":2606},{"style":601},[2607],{"type":43,"value":67},{"type":37,"tag":275,"props":2609,"children":2610},{"style":299},[2611],{"type":43,"value":2612},"2",{"type":37,"tag":275,"props":2614,"children":2615},{"style":601},[2616],{"type":43,"value":2617},";\n",{"type":37,"tag":46,"props":2619,"children":2620},{},[2621],{"type":43,"value":2622},"You should see one row per materialized model. If a model is missing, fix dbt before continuing — Bruin will simply skip what isn't there.",{"type":37,"tag":38,"props":2624,"children":2625},{"id":1129},[2626],{"type":43,"value":1132},{"type":37,"tag":46,"props":2628,"children":2629},{},[2630,2632,2637],{"type":43,"value":2631},"You now have a working dbt project with materialized staging and report tables in your warehouse. That's the canonical input for the Bruin context layer: a set of real schemas Bruin can introspect. From here on out, no more dbt commands — everything is ",{"type":37,"tag":52,"props":2633,"children":2635},{"className":2634},[],[2636],{"type":43,"value":285},{"type":43,"value":98},{"type":37,"tag":1144,"props":2639,"children":2640},{},[2641],{"type":43,"value":1148},{"title":7,"searchDepth":305,"depth":305,"links":2643},[2644,2645,2646,2651],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":2647},[2648,2649,2650],{"id":2203,"depth":17,"text":2206},{"id":2242,"depth":17,"text":2245},{"id":2426,"depth":17,"text":2429},{"id":1129,"depth":305,"text":1132},"content:tutorials:dbt-bruin-analyst:dbt-prerequisite.md","tutorials/dbt-bruin-analyst/dbt-prerequisite.md","tutorials/dbt-bruin-analyst/dbt-prerequisite",{"_path":2656,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2657,"description":2658,"date":10,"readingTime":374,"category":12,"tags":2659,"difficulty":16,"module":5,"step":305,"journeys":2660,"learnMore":2661,"stepGif":28,"author":2671,"body":2672,"_type":1162,"_id":3844,"_source":1164,"_file":3845,"_stem":3846,"_extension":1167},"/tutorials/dbt-bruin-analyst/isolated-context","Create an Isolated Bruin Context","Add a self-contained context/ directory with its own .bruin.yml and pipeline.yml — so the documentation layer for your dbt project never collides with other Bruin pipelines in the same repo.",[14,15,2113],[19,20],[2662,2665,2668],{"label":2663,"url":2664},"Connections reference (docs)","https://getbruin.com/docs/bruin/core-concepts/connections.html",{"label":2666,"url":2667},"Pipeline configuration (docs)","https://getbruin.com/docs/bruin/core-concepts/pipeline.html",{"label":2669,"url":2670},"Application Default Credentials","https://cloud.google.com/docs/authentication/application-default-credentials",{"name":30,"role":31,"image":32},{"type":34,"children":2673,"toc":3831},[2674,2678,2704,2708,2727,2746,2750,2762,2768,2793,2820,2831,2843,2995,3013,3041,3075,3080,3242,3378,3530,3541,3551,3645,3686,3709,3715,3720,3757,3762,3771,3783,3811,3815,3827],{"type":37,"tag":38,"props":2675,"children":2676},{"id":40},[2677],{"type":43,"value":44},{"type":37,"tag":46,"props":2679,"children":2680},{},[2681,2683,2688,2690,2695,2697,2702],{"type":43,"value":2682},"Inside your dbt repo, create a ",{"type":37,"tag":52,"props":2684,"children":2686},{"className":2685},[],[2687],{"type":43,"value":253},{"type":43,"value":2689}," directory with its own ",{"type":37,"tag":52,"props":2691,"children":2693},{"className":2692},[],[2694],{"type":43,"value":1037},{"type":43,"value":2696}," and ",{"type":37,"tag":52,"props":2698,"children":2700},{"className":2699},[],[2701],{"type":43,"value":526},{"type":43,"value":2703},". This is the workspace Bruin will use to describe your warehouse — kept fully isolated from any other Bruin pipelines or configs that might already live in the repo.",{"type":37,"tag":38,"props":2705,"children":2706},{"id":101},[2707],{"type":43,"value":104},{"type":37,"tag":46,"props":2709,"children":2710},{},[2711,2713,2718,2720,2725],{"type":43,"value":2712},"Bruin will happily share a ",{"type":37,"tag":52,"props":2714,"children":2716},{"className":2715},[],[2717],{"type":43,"value":1037},{"type":43,"value":2719}," across an entire repo, but for a documentation-only context layer that's usually the wrong default. A broken connection in a sibling pipeline will cause every ",{"type":37,"tag":52,"props":2721,"children":2723},{"className":2722},[],[2724],{"type":43,"value":285},{"type":43,"value":2726}," command to error, even when you're just trying to import schemas. Scoping the config to a sub-directory keeps the dbt context layer self-contained, easy to delete, and easy to regenerate.",{"type":37,"tag":46,"props":2728,"children":2729},{},[2730,2732,2737,2739,2744],{"type":43,"value":2731},"The context layer is ",{"type":37,"tag":499,"props":2733,"children":2734},{},[2735],{"type":43,"value":2736},"its own pipeline",{"type":43,"value":2738},", even though it never runs transforms. It's documentation that happens to live in ",{"type":37,"tag":52,"props":2740,"children":2742},{"className":2741},[],[2743],{"type":43,"value":526},{"type":43,"value":2745}," form so Bruin can validate it.",{"type":37,"tag":38,"props":2747,"children":2748},{"id":132},[2749],{"type":43,"value":135},{"type":37,"tag":46,"props":2751,"children":2752},{},[2753,2755,2760],{"type":43,"value":2754},"Run all of these from the root of your dbt project (the directory containing ",{"type":37,"tag":52,"props":2756,"children":2758},{"className":2757},[],[2759],{"type":43,"value":210},{"type":43,"value":2761},").",{"type":37,"tag":137,"props":2763,"children":2765},{"id":2764},"_1-create-the-context-directory",[2766],{"type":43,"value":2767},"1. Create the context directory",{"type":37,"tag":265,"props":2769,"children":2771},{"className":267,"code":2770,"language":269,"meta":7,"style":7},"mkdir -p context/assets\n",[2772],{"type":37,"tag":52,"props":2773,"children":2774},{"__ignoreMap":7},[2775],{"type":37,"tag":275,"props":2776,"children":2777},{"class":277,"line":278},[2778,2783,2788],{"type":37,"tag":275,"props":2779,"children":2780},{"style":282},[2781],{"type":43,"value":2782},"mkdir",{"type":37,"tag":275,"props":2784,"children":2785},{"style":299},[2786],{"type":43,"value":2787}," -p",{"type":37,"tag":275,"props":2789,"children":2790},{"style":288},[2791],{"type":43,"value":2792}," context/assets\n",{"type":37,"tag":46,"props":2794,"children":2795},{},[2796,2798,2804,2805,2811,2813,2818],{"type":43,"value":2797},"You'll end up with ",{"type":37,"tag":52,"props":2799,"children":2801},{"className":2800},[],[2802],{"type":43,"value":2803},"context/.bruin.yml",{"type":43,"value":67},{"type":37,"tag":52,"props":2806,"children":2808},{"className":2807},[],[2809],{"type":43,"value":2810},"context/pipeline.yml",{"type":43,"value":2812},", and a populated ",{"type":37,"tag":52,"props":2814,"children":2816},{"className":2815},[],[2817],{"type":43,"value":96},{"type":43,"value":2819}," after the next step.",{"type":37,"tag":137,"props":2821,"children":2823},{"id":2822},"_2-write-a-scoped-bruinyml",[2824,2826],{"type":43,"value":2825},"2. Write a scoped ",{"type":37,"tag":52,"props":2827,"children":2829},{"className":2828},[],[2830],{"type":43,"value":1037},{"type":37,"tag":46,"props":2832,"children":2833},{},[2834,2836,2841],{"type":43,"value":2835},"Drop this into ",{"type":37,"tag":52,"props":2837,"children":2839},{"className":2838},[],[2840],{"type":43,"value":2803},{"type":43,"value":2842},". Replace the project ID with your own warehouse's:",{"type":37,"tag":265,"props":2844,"children":2846},{"className":583,"code":2845,"language":585,"meta":7,"style":7},"# context/.bruin.yml\ndefault_environment: default\nenvironments:\n  default:\n    connections:\n      google_cloud_platform:\n        - name: contoso_dbt_bq\n          project_id: bruin-playground-arsalan\n          location: EU\n          use_application_default_credentials: true\n",[2847],{"type":37,"tag":52,"props":2848,"children":2849},{"__ignoreMap":7},[2850,2858,2875,2887,2899,2911,2923,2944,2961,2978],{"type":37,"tag":275,"props":2851,"children":2852},{"class":277,"line":278},[2853],{"type":37,"tag":275,"props":2854,"children":2855},{"style":825},[2856],{"type":43,"value":2857},"# context/.bruin.yml\n",{"type":37,"tag":275,"props":2859,"children":2860},{"class":277,"line":305},[2861,2866,2870],{"type":37,"tag":275,"props":2862,"children":2863},{"style":595},[2864],{"type":43,"value":2865},"default_environment",{"type":37,"tag":275,"props":2867,"children":2868},{"style":601},[2869],{"type":43,"value":604},{"type":37,"tag":275,"props":2871,"children":2872},{"style":288},[2873],{"type":43,"value":2874},"default\n",{"type":37,"tag":275,"props":2876,"children":2877},{"class":277,"line":17},[2878,2883],{"type":37,"tag":275,"props":2879,"children":2880},{"style":595},[2881],{"type":43,"value":2882},"environments",{"type":37,"tag":275,"props":2884,"children":2885},{"style":601},[2886],{"type":43,"value":639},{"type":37,"tag":275,"props":2888,"children":2889},{"class":277,"line":340},[2890,2895],{"type":37,"tag":275,"props":2891,"children":2892},{"style":595},[2893],{"type":43,"value":2894},"  default",{"type":37,"tag":275,"props":2896,"children":2897},{"style":601},[2898],{"type":43,"value":639},{"type":37,"tag":275,"props":2900,"children":2901},{"class":277,"line":11},[2902,2907],{"type":37,"tag":275,"props":2903,"children":2904},{"style":595},[2905],{"type":43,"value":2906},"    connections",{"type":37,"tag":275,"props":2908,"children":2909},{"style":601},[2910],{"type":43,"value":639},{"type":37,"tag":275,"props":2912,"children":2913},{"class":277,"line":374},[2914,2919],{"type":37,"tag":275,"props":2915,"children":2916},{"style":595},[2917],{"type":43,"value":2918},"      google_cloud_platform",{"type":37,"tag":275,"props":2920,"children":2921},{"style":601},[2922],{"type":43,"value":639},{"type":37,"tag":275,"props":2924,"children":2925},{"class":277,"line":391},[2926,2931,2935,2939],{"type":37,"tag":275,"props":2927,"children":2928},{"style":601},[2929],{"type":43,"value":2930},"        - ",{"type":37,"tag":275,"props":2932,"children":2933},{"style":595},[2934],{"type":43,"value":598},{"type":37,"tag":275,"props":2936,"children":2937},{"style":601},[2938],{"type":43,"value":604},{"type":37,"tag":275,"props":2940,"children":2941},{"style":288},[2942],{"type":43,"value":2943},"contoso_dbt_bq\n",{"type":37,"tag":275,"props":2945,"children":2946},{"class":277,"line":715},[2947,2952,2956],{"type":37,"tag":275,"props":2948,"children":2949},{"style":595},[2950],{"type":43,"value":2951},"          project_id",{"type":37,"tag":275,"props":2953,"children":2954},{"style":601},[2955],{"type":43,"value":604},{"type":37,"tag":275,"props":2957,"children":2958},{"style":288},[2959],{"type":43,"value":2960},"bruin-playground-arsalan\n",{"type":37,"tag":275,"props":2962,"children":2963},{"class":277,"line":736},[2964,2969,2973],{"type":37,"tag":275,"props":2965,"children":2966},{"style":595},[2967],{"type":43,"value":2968},"          location",{"type":37,"tag":275,"props":2970,"children":2971},{"style":601},[2972],{"type":43,"value":604},{"type":37,"tag":275,"props":2974,"children":2975},{"style":288},[2976],{"type":43,"value":2977},"EU\n",{"type":37,"tag":275,"props":2979,"children":2980},{"class":277,"line":753},[2981,2986,2990],{"type":37,"tag":275,"props":2982,"children":2983},{"style":595},[2984],{"type":43,"value":2985},"          use_application_default_credentials",{"type":37,"tag":275,"props":2987,"children":2988},{"style":601},[2989],{"type":43,"value":604},{"type":37,"tag":275,"props":2991,"children":2992},{"style":299},[2993],{"type":43,"value":2994},"true\n",{"type":37,"tag":46,"props":2996,"children":2997},{},[2998,3000,3004,3006,3011],{"type":43,"value":2999},"This connection uses ",{"type":37,"tag":499,"props":3001,"children":3002},{},[3003],{"type":43,"value":2669},{"type":43,"value":3005}," — the same ",{"type":37,"tag":52,"props":3007,"children":3009},{"className":3008},[],[3010],{"type":43,"value":2279},{"type":43,"value":3012}," session you already use for dbt. No service account keyfile to rotate, no secret to gitignore, and the AI agent inherits your identity at query time.",{"type":37,"tag":492,"props":3014,"children":3015},{},[3016],{"type":37,"tag":46,"props":3017,"children":3018},{},[3019,3024,3026,3032,3033,3039],{"type":37,"tag":499,"props":3020,"children":3021},{},[3022],{"type":43,"value":3023},"Gotcha — wrong field name.",{"type":43,"value":3025}," The field is ",{"type":37,"tag":52,"props":3027,"children":3029},{"className":3028},[],[3030],{"type":43,"value":3031},"use_application_default_credentials",{"type":43,"value":2372},{"type":37,"tag":52,"props":3034,"children":3036},{"className":3035},[],[3037],{"type":43,"value":3038},"use_default_credentials",{"type":43,"value":3040},". The latter is silently ignored and Bruin will look for a keyfile that isn't there.",{"type":37,"tag":492,"props":3042,"children":3043},{},[3044],{"type":37,"tag":46,"props":3045,"children":3046},{},[3047,3052,3054,3059,3061,3066,3068,3073],{"type":37,"tag":499,"props":3048,"children":3049},{},[3050],{"type":43,"value":3051},"Gotcha — sibling configs.",{"type":43,"value":3053}," ",{"type":37,"tag":52,"props":3055,"children":3057},{"className":3056},[],[3058],{"type":43,"value":285},{"type":43,"value":3060}," walks up looking for ",{"type":37,"tag":52,"props":3062,"children":3064},{"className":3063},[],[3065],{"type":43,"value":1037},{"type":43,"value":3067},". If a parent directory has one with a broken connection, every command in this scope will error. Always pass ",{"type":37,"tag":52,"props":3069,"children":3071},{"className":3070},[],[3072],{"type":43,"value":1045},{"type":43,"value":3074}," so Bruin only loads this file.",{"type":37,"tag":46,"props":3076,"children":3077},{},[3078],{"type":43,"value":3079},"For Redshift, ClickHouse, or Postgres, swap the connection block. Examples:",{"type":37,"tag":265,"props":3081,"children":3083},{"className":583,"code":3082,"language":585,"meta":7,"style":7},"# Postgres\nconnections:\n  postgres:\n    - name: contoso_dbt_pg\n      host: db.example.internal\n      port: 5432\n      username: analyst_ro\n      password: ${POSTGRES_PASSWORD}\n      database: contoso\n      ssl_mode: require\n",[3084],{"type":37,"tag":52,"props":3085,"children":3086},{"__ignoreMap":7},[3087,3095,3107,3119,3140,3157,3174,3191,3208,3225],{"type":37,"tag":275,"props":3088,"children":3089},{"class":277,"line":278},[3090],{"type":37,"tag":275,"props":3091,"children":3092},{"style":825},[3093],{"type":43,"value":3094},"# Postgres\n",{"type":37,"tag":275,"props":3096,"children":3097},{"class":277,"line":305},[3098,3103],{"type":37,"tag":275,"props":3099,"children":3100},{"style":595},[3101],{"type":43,"value":3102},"connections",{"type":37,"tag":275,"props":3104,"children":3105},{"style":601},[3106],{"type":43,"value":639},{"type":37,"tag":275,"props":3108,"children":3109},{"class":277,"line":17},[3110,3115],{"type":37,"tag":275,"props":3111,"children":3112},{"style":595},[3113],{"type":43,"value":3114},"  postgres",{"type":37,"tag":275,"props":3116,"children":3117},{"style":601},[3118],{"type":43,"value":639},{"type":37,"tag":275,"props":3120,"children":3121},{"class":277,"line":340},[3122,3127,3131,3135],{"type":37,"tag":275,"props":3123,"children":3124},{"style":601},[3125],{"type":43,"value":3126},"    - ",{"type":37,"tag":275,"props":3128,"children":3129},{"style":595},[3130],{"type":43,"value":598},{"type":37,"tag":275,"props":3132,"children":3133},{"style":601},[3134],{"type":43,"value":604},{"type":37,"tag":275,"props":3136,"children":3137},{"style":288},[3138],{"type":43,"value":3139},"contoso_dbt_pg\n",{"type":37,"tag":275,"props":3141,"children":3142},{"class":277,"line":11},[3143,3148,3152],{"type":37,"tag":275,"props":3144,"children":3145},{"style":595},[3146],{"type":43,"value":3147},"      host",{"type":37,"tag":275,"props":3149,"children":3150},{"style":601},[3151],{"type":43,"value":604},{"type":37,"tag":275,"props":3153,"children":3154},{"style":288},[3155],{"type":43,"value":3156},"db.example.internal\n",{"type":37,"tag":275,"props":3158,"children":3159},{"class":277,"line":374},[3160,3165,3169],{"type":37,"tag":275,"props":3161,"children":3162},{"style":595},[3163],{"type":43,"value":3164},"      port",{"type":37,"tag":275,"props":3166,"children":3167},{"style":601},[3168],{"type":43,"value":604},{"type":37,"tag":275,"props":3170,"children":3171},{"style":299},[3172],{"type":43,"value":3173},"5432\n",{"type":37,"tag":275,"props":3175,"children":3176},{"class":277,"line":391},[3177,3182,3186],{"type":37,"tag":275,"props":3178,"children":3179},{"style":595},[3180],{"type":43,"value":3181},"      username",{"type":37,"tag":275,"props":3183,"children":3184},{"style":601},[3185],{"type":43,"value":604},{"type":37,"tag":275,"props":3187,"children":3188},{"style":288},[3189],{"type":43,"value":3190},"analyst_ro\n",{"type":37,"tag":275,"props":3192,"children":3193},{"class":277,"line":715},[3194,3199,3203],{"type":37,"tag":275,"props":3195,"children":3196},{"style":595},[3197],{"type":43,"value":3198},"      password",{"type":37,"tag":275,"props":3200,"children":3201},{"style":601},[3202],{"type":43,"value":604},{"type":37,"tag":275,"props":3204,"children":3205},{"style":288},[3206],{"type":43,"value":3207},"${POSTGRES_PASSWORD}\n",{"type":37,"tag":275,"props":3209,"children":3210},{"class":277,"line":736},[3211,3216,3220],{"type":37,"tag":275,"props":3212,"children":3213},{"style":595},[3214],{"type":43,"value":3215},"      database",{"type":37,"tag":275,"props":3217,"children":3218},{"style":601},[3219],{"type":43,"value":604},{"type":37,"tag":275,"props":3221,"children":3222},{"style":288},[3223],{"type":43,"value":3224},"contoso\n",{"type":37,"tag":275,"props":3226,"children":3227},{"class":277,"line":753},[3228,3233,3237],{"type":37,"tag":275,"props":3229,"children":3230},{"style":595},[3231],{"type":43,"value":3232},"      ssl_mode",{"type":37,"tag":275,"props":3234,"children":3235},{"style":601},[3236],{"type":43,"value":604},{"type":37,"tag":275,"props":3238,"children":3239},{"style":288},[3240],{"type":43,"value":3241},"require\n",{"type":37,"tag":265,"props":3243,"children":3245},{"className":583,"code":3244,"language":585,"meta":7,"style":7},"# Redshift\nconnections:\n  redshift:\n    - name: contoso_dbt_rs\n      host: contoso.abcd1234.eu-west-1.redshift.amazonaws.com\n      port: 5439\n      username: analyst_ro\n      password: ${REDSHIFT_PASSWORD}\n      database: contoso\n",[3246],{"type":37,"tag":52,"props":3247,"children":3248},{"__ignoreMap":7},[3249,3257,3268,3280,3300,3316,3332,3347,3363],{"type":37,"tag":275,"props":3250,"children":3251},{"class":277,"line":278},[3252],{"type":37,"tag":275,"props":3253,"children":3254},{"style":825},[3255],{"type":43,"value":3256},"# Redshift\n",{"type":37,"tag":275,"props":3258,"children":3259},{"class":277,"line":305},[3260,3264],{"type":37,"tag":275,"props":3261,"children":3262},{"style":595},[3263],{"type":43,"value":3102},{"type":37,"tag":275,"props":3265,"children":3266},{"style":601},[3267],{"type":43,"value":639},{"type":37,"tag":275,"props":3269,"children":3270},{"class":277,"line":17},[3271,3276],{"type":37,"tag":275,"props":3272,"children":3273},{"style":595},[3274],{"type":43,"value":3275},"  redshift",{"type":37,"tag":275,"props":3277,"children":3278},{"style":601},[3279],{"type":43,"value":639},{"type":37,"tag":275,"props":3281,"children":3282},{"class":277,"line":340},[3283,3287,3291,3295],{"type":37,"tag":275,"props":3284,"children":3285},{"style":601},[3286],{"type":43,"value":3126},{"type":37,"tag":275,"props":3288,"children":3289},{"style":595},[3290],{"type":43,"value":598},{"type":37,"tag":275,"props":3292,"children":3293},{"style":601},[3294],{"type":43,"value":604},{"type":37,"tag":275,"props":3296,"children":3297},{"style":288},[3298],{"type":43,"value":3299},"contoso_dbt_rs\n",{"type":37,"tag":275,"props":3301,"children":3302},{"class":277,"line":11},[3303,3307,3311],{"type":37,"tag":275,"props":3304,"children":3305},{"style":595},[3306],{"type":43,"value":3147},{"type":37,"tag":275,"props":3308,"children":3309},{"style":601},[3310],{"type":43,"value":604},{"type":37,"tag":275,"props":3312,"children":3313},{"style":288},[3314],{"type":43,"value":3315},"contoso.abcd1234.eu-west-1.redshift.amazonaws.com\n",{"type":37,"tag":275,"props":3317,"children":3318},{"class":277,"line":374},[3319,3323,3327],{"type":37,"tag":275,"props":3320,"children":3321},{"style":595},[3322],{"type":43,"value":3164},{"type":37,"tag":275,"props":3324,"children":3325},{"style":601},[3326],{"type":43,"value":604},{"type":37,"tag":275,"props":3328,"children":3329},{"style":299},[3330],{"type":43,"value":3331},"5439\n",{"type":37,"tag":275,"props":3333,"children":3334},{"class":277,"line":391},[3335,3339,3343],{"type":37,"tag":275,"props":3336,"children":3337},{"style":595},[3338],{"type":43,"value":3181},{"type":37,"tag":275,"props":3340,"children":3341},{"style":601},[3342],{"type":43,"value":604},{"type":37,"tag":275,"props":3344,"children":3345},{"style":288},[3346],{"type":43,"value":3190},{"type":37,"tag":275,"props":3348,"children":3349},{"class":277,"line":715},[3350,3354,3358],{"type":37,"tag":275,"props":3351,"children":3352},{"style":595},[3353],{"type":43,"value":3198},{"type":37,"tag":275,"props":3355,"children":3356},{"style":601},[3357],{"type":43,"value":604},{"type":37,"tag":275,"props":3359,"children":3360},{"style":288},[3361],{"type":43,"value":3362},"${REDSHIFT_PASSWORD}\n",{"type":37,"tag":275,"props":3364,"children":3365},{"class":277,"line":736},[3366,3370,3374],{"type":37,"tag":275,"props":3367,"children":3368},{"style":595},[3369],{"type":43,"value":3215},{"type":37,"tag":275,"props":3371,"children":3372},{"style":601},[3373],{"type":43,"value":604},{"type":37,"tag":275,"props":3375,"children":3376},{"style":288},[3377],{"type":43,"value":3224},{"type":37,"tag":265,"props":3379,"children":3381},{"className":583,"code":3380,"language":585,"meta":7,"style":7},"# ClickHouse\nconnections:\n  clickhouse:\n    - name: contoso_dbt_ch\n      host: contoso.eu-central-1.aws.clickhouse.cloud\n      port: 9440\n      username: analyst_ro\n      password: ${CLICKHOUSE_PASSWORD}\n      database: default\n      secure: true\n",[3382],{"type":37,"tag":52,"props":3383,"children":3384},{"__ignoreMap":7},[3385,3393,3404,3416,3436,3452,3468,3483,3499,3514],{"type":37,"tag":275,"props":3386,"children":3387},{"class":277,"line":278},[3388],{"type":37,"tag":275,"props":3389,"children":3390},{"style":825},[3391],{"type":43,"value":3392},"# ClickHouse\n",{"type":37,"tag":275,"props":3394,"children":3395},{"class":277,"line":305},[3396,3400],{"type":37,"tag":275,"props":3397,"children":3398},{"style":595},[3399],{"type":43,"value":3102},{"type":37,"tag":275,"props":3401,"children":3402},{"style":601},[3403],{"type":43,"value":639},{"type":37,"tag":275,"props":3405,"children":3406},{"class":277,"line":17},[3407,3412],{"type":37,"tag":275,"props":3408,"children":3409},{"style":595},[3410],{"type":43,"value":3411},"  clickhouse",{"type":37,"tag":275,"props":3413,"children":3414},{"style":601},[3415],{"type":43,"value":639},{"type":37,"tag":275,"props":3417,"children":3418},{"class":277,"line":340},[3419,3423,3427,3431],{"type":37,"tag":275,"props":3420,"children":3421},{"style":601},[3422],{"type":43,"value":3126},{"type":37,"tag":275,"props":3424,"children":3425},{"style":595},[3426],{"type":43,"value":598},{"type":37,"tag":275,"props":3428,"children":3429},{"style":601},[3430],{"type":43,"value":604},{"type":37,"tag":275,"props":3432,"children":3433},{"style":288},[3434],{"type":43,"value":3435},"contoso_dbt_ch\n",{"type":37,"tag":275,"props":3437,"children":3438},{"class":277,"line":11},[3439,3443,3447],{"type":37,"tag":275,"props":3440,"children":3441},{"style":595},[3442],{"type":43,"value":3147},{"type":37,"tag":275,"props":3444,"children":3445},{"style":601},[3446],{"type":43,"value":604},{"type":37,"tag":275,"props":3448,"children":3449},{"style":288},[3450],{"type":43,"value":3451},"contoso.eu-central-1.aws.clickhouse.cloud\n",{"type":37,"tag":275,"props":3453,"children":3454},{"class":277,"line":374},[3455,3459,3463],{"type":37,"tag":275,"props":3456,"children":3457},{"style":595},[3458],{"type":43,"value":3164},{"type":37,"tag":275,"props":3460,"children":3461},{"style":601},[3462],{"type":43,"value":604},{"type":37,"tag":275,"props":3464,"children":3465},{"style":299},[3466],{"type":43,"value":3467},"9440\n",{"type":37,"tag":275,"props":3469,"children":3470},{"class":277,"line":391},[3471,3475,3479],{"type":37,"tag":275,"props":3472,"children":3473},{"style":595},[3474],{"type":43,"value":3181},{"type":37,"tag":275,"props":3476,"children":3477},{"style":601},[3478],{"type":43,"value":604},{"type":37,"tag":275,"props":3480,"children":3481},{"style":288},[3482],{"type":43,"value":3190},{"type":37,"tag":275,"props":3484,"children":3485},{"class":277,"line":715},[3486,3490,3494],{"type":37,"tag":275,"props":3487,"children":3488},{"style":595},[3489],{"type":43,"value":3198},{"type":37,"tag":275,"props":3491,"children":3492},{"style":601},[3493],{"type":43,"value":604},{"type":37,"tag":275,"props":3495,"children":3496},{"style":288},[3497],{"type":43,"value":3498},"${CLICKHOUSE_PASSWORD}\n",{"type":37,"tag":275,"props":3500,"children":3501},{"class":277,"line":736},[3502,3506,3510],{"type":37,"tag":275,"props":3503,"children":3504},{"style":595},[3505],{"type":43,"value":3215},{"type":37,"tag":275,"props":3507,"children":3508},{"style":601},[3509],{"type":43,"value":604},{"type":37,"tag":275,"props":3511,"children":3512},{"style":288},[3513],{"type":43,"value":2874},{"type":37,"tag":275,"props":3515,"children":3516},{"class":277,"line":753},[3517,3522,3526],{"type":37,"tag":275,"props":3518,"children":3519},{"style":595},[3520],{"type":43,"value":3521},"      secure",{"type":37,"tag":275,"props":3523,"children":3524},{"style":601},[3525],{"type":43,"value":604},{"type":37,"tag":275,"props":3527,"children":3528},{"style":299},[3529],{"type":43,"value":2994},{"type":37,"tag":137,"props":3531,"children":3533},{"id":3532},"_3-write-a-pipelineyml",[3534,3536],{"type":43,"value":3535},"3. Write a ",{"type":37,"tag":52,"props":3537,"children":3539},{"className":3538},[],[3540],{"type":43,"value":526},{"type":37,"tag":46,"props":3542,"children":3543},{},[3544,3545,3550],{"type":43,"value":2835},{"type":37,"tag":52,"props":3546,"children":3548},{"className":3547},[],[3549],{"type":43,"value":2810},{"type":43,"value":812},{"type":37,"tag":265,"props":3552,"children":3554},{"className":583,"code":3553,"language":585,"meta":7,"style":7},"# context/pipeline.yml\nname: contoso_dbt_context\nschedule: daily\nstart_date: \"2016-01-01\"\ndefault_connections:\n  google_cloud_platform: \"contoso_dbt_bq\"\n",[3555],{"type":37,"tag":52,"props":3556,"children":3557},{"__ignoreMap":7},[3558,3566,3582,3599,3616,3628],{"type":37,"tag":275,"props":3559,"children":3560},{"class":277,"line":278},[3561],{"type":37,"tag":275,"props":3562,"children":3563},{"style":825},[3564],{"type":43,"value":3565},"# context/pipeline.yml\n",{"type":37,"tag":275,"props":3567,"children":3568},{"class":277,"line":305},[3569,3573,3577],{"type":37,"tag":275,"props":3570,"children":3571},{"style":595},[3572],{"type":43,"value":598},{"type":37,"tag":275,"props":3574,"children":3575},{"style":601},[3576],{"type":43,"value":604},{"type":37,"tag":275,"props":3578,"children":3579},{"style":288},[3580],{"type":43,"value":3581},"contoso_dbt_context\n",{"type":37,"tag":275,"props":3583,"children":3584},{"class":277,"line":17},[3585,3590,3594],{"type":37,"tag":275,"props":3586,"children":3587},{"style":595},[3588],{"type":43,"value":3589},"schedule",{"type":37,"tag":275,"props":3591,"children":3592},{"style":601},[3593],{"type":43,"value":604},{"type":37,"tag":275,"props":3595,"children":3596},{"style":288},[3597],{"type":43,"value":3598},"daily\n",{"type":37,"tag":275,"props":3600,"children":3601},{"class":277,"line":340},[3602,3607,3611],{"type":37,"tag":275,"props":3603,"children":3604},{"style":595},[3605],{"type":43,"value":3606},"start_date",{"type":37,"tag":275,"props":3608,"children":3609},{"style":601},[3610],{"type":43,"value":604},{"type":37,"tag":275,"props":3612,"children":3613},{"style":288},[3614],{"type":43,"value":3615},"\"2016-01-01\"\n",{"type":37,"tag":275,"props":3617,"children":3618},{"class":277,"line":11},[3619,3624],{"type":37,"tag":275,"props":3620,"children":3621},{"style":595},[3622],{"type":43,"value":3623},"default_connections",{"type":37,"tag":275,"props":3625,"children":3626},{"style":601},[3627],{"type":43,"value":639},{"type":37,"tag":275,"props":3629,"children":3630},{"class":277,"line":374},[3631,3636,3640],{"type":37,"tag":275,"props":3632,"children":3633},{"style":595},[3634],{"type":43,"value":3635},"  google_cloud_platform",{"type":37,"tag":275,"props":3637,"children":3638},{"style":601},[3639],{"type":43,"value":604},{"type":37,"tag":275,"props":3641,"children":3642},{"style":288},[3643],{"type":43,"value":3644},"\"contoso_dbt_bq\"\n",{"type":37,"tag":46,"props":3646,"children":3647},{},[3648,3650,3655,3657,3663,3665,3671,3672,3678,3679,3685],{"type":43,"value":3649},"The ",{"type":37,"tag":52,"props":3651,"children":3653},{"className":3652},[],[3654],{"type":43,"value":3623},{"type":43,"value":3656}," block makes the connection name implicit for every asset Bruin generates in the next step — you won't have to repeat ",{"type":37,"tag":52,"props":3658,"children":3660},{"className":3659},[],[3661],{"type":43,"value":3662},"connection: contoso_dbt_bq",{"type":43,"value":3664}," in 40 separate YAMLs. For non-BigQuery warehouses, use the matching key (",{"type":37,"tag":52,"props":3666,"children":3668},{"className":3667},[],[3669],{"type":43,"value":3670},"postgres",{"type":43,"value":67},{"type":37,"tag":52,"props":3673,"children":3675},{"className":3674},[],[3676],{"type":43,"value":3677},"redshift",{"type":43,"value":67},{"type":37,"tag":52,"props":3680,"children":3682},{"className":3681},[],[3683],{"type":43,"value":3684},"clickhouse",{"type":43,"value":2761},{"type":37,"tag":492,"props":3687,"children":3688},{},[3689],{"type":37,"tag":46,"props":3690,"children":3691},{},[3692,3694,3699,3701,3707],{"type":43,"value":3693},"The pipeline never ",{"type":37,"tag":116,"props":3695,"children":3696},{},[3697],{"type":43,"value":3698},"runs",{"type":43,"value":3700}," anything — but Bruin still treats it as a pipeline, which gives you ",{"type":37,"tag":52,"props":3702,"children":3704},{"className":3703},[],[3705],{"type":43,"value":3706},"bruin validate",{"type":43,"value":3708},", lineage, and docs generation for free.",{"type":37,"tag":137,"props":3710,"children":3712},{"id":3711},"_4-test-the-connection",[3713],{"type":43,"value":3714},"4. Test the connection",{"type":37,"tag":46,"props":3716,"children":3717},{},[3718],{"type":43,"value":3719},"Confirm Bruin can reach the warehouse before going further:",{"type":37,"tag":265,"props":3721,"children":3723},{"className":267,"code":3722,"language":269,"meta":7,"style":7},"bruin connections ping --config-file context/.bruin.yml contoso_dbt_bq\n",[3724],{"type":37,"tag":52,"props":3725,"children":3726},{"__ignoreMap":7},[3727],{"type":37,"tag":275,"props":3728,"children":3729},{"class":277,"line":278},[3730,3734,3739,3744,3748,3752],{"type":37,"tag":275,"props":3731,"children":3732},{"style":282},[3733],{"type":43,"value":285},{"type":37,"tag":275,"props":3735,"children":3736},{"style":288},[3737],{"type":43,"value":3738}," connections",{"type":37,"tag":275,"props":3740,"children":3741},{"style":288},[3742],{"type":43,"value":3743}," ping",{"type":37,"tag":275,"props":3745,"children":3746},{"style":299},[3747],{"type":43,"value":976},{"type":37,"tag":275,"props":3749,"children":3750},{"style":288},[3751],{"type":43,"value":316},{"type":37,"tag":275,"props":3753,"children":3754},{"style":288},[3755],{"type":43,"value":3756}," contoso_dbt_bq\n",{"type":37,"tag":46,"props":3758,"children":3759},{},[3760],{"type":43,"value":3761},"Expected output:",{"type":37,"tag":265,"props":3763,"children":3766},{"className":3764,"code":3765,"language":43},[569],"Successfully connected to 'contoso_dbt_bq'.\n",[3767],{"type":37,"tag":52,"props":3768,"children":3769},{"__ignoreMap":7},[3770],{"type":43,"value":3765},{"type":37,"tag":46,"props":3772,"children":3773},{},[3774,3776,3781],{"type":43,"value":3775},"If you see an authentication error, run ",{"type":37,"tag":52,"props":3777,"children":3779},{"className":3778},[],[3780],{"type":43,"value":2279},{"type":43,"value":3782}," (BigQuery) or check your env vars (Postgres / Redshift / ClickHouse) and try again.",{"type":37,"tag":492,"props":3784,"children":3785},{},[3786],{"type":37,"tag":46,"props":3787,"children":3788},{},[3789,3802,3804,3809],{"type":37,"tag":499,"props":3790,"children":3791},{},[3792,3794,3800],{"type":43,"value":3793},"Gotcha — ",{"type":37,"tag":52,"props":3795,"children":3797},{"className":3796},[],[3798],{"type":43,"value":3799},"bruin connections test",{"type":43,"value":3801}," loads everything.",{"type":43,"value":3803}," It walks every connection in scope, so a broken sibling connection breaks the test. Always ",{"type":37,"tag":52,"props":3805,"children":3807},{"className":3806},[],[3808],{"type":43,"value":1029},{"type":43,"value":3810},"-scope when working in a sub-pipeline.",{"type":37,"tag":38,"props":3812,"children":3813},{"id":1129},[3814],{"type":43,"value":1132},{"type":37,"tag":46,"props":3816,"children":3817},{},[3818,3820,3825],{"type":43,"value":3819},"You now have a self-contained Bruin pipeline at ",{"type":37,"tag":52,"props":3821,"children":3823},{"className":3822},[],[3824],{"type":43,"value":253},{"type":43,"value":3826}," — config, connection, and pipeline metadata, isolated from anything else in the repo. The next step uses this scoped config to introspect your warehouse and turn every dbt-materialized table into a Bruin asset YAML.",{"type":37,"tag":1144,"props":3828,"children":3829},{},[3830],{"type":43,"value":1148},{"title":7,"searchDepth":305,"depth":305,"links":3832},[3833,3834,3835,3843],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":3836},[3837,3838,3840,3842],{"id":2764,"depth":17,"text":2767},{"id":2822,"depth":17,"text":3839},"2. Write a scoped .bruin.yml",{"id":3532,"depth":17,"text":3841},"3. Write a pipeline.yml",{"id":3711,"depth":17,"text":3714},{"id":1129,"depth":305,"text":1132},"content:tutorials:dbt-bruin-analyst:isolated-context.md","tutorials/dbt-bruin-analyst/isolated-context.md","tutorials/dbt-bruin-analyst/isolated-context",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":3848,"difficulty":16,"module":5,"step":17,"journeys":3849,"learnMore":3850,"stepGif":28,"author":3853,"body":3854,"_type":1162,"_id":1163,"_source":1164,"_file":1165,"_stem":1166,"_extension":1167},[14,15],[19,20],[3851,3852],{"label":23,"url":24},{"label":26,"url":27},{"name":30,"role":31,"image":32},{"type":34,"children":3855,"toc":4773},[3856,3860,3900,3904,3908,3922,3926,3930,3934,3976,4004,4008,4024,4131,4141,4218,4246,4250,4267,4277,4285,4289,4472,4476,4480,4490,4600,4604,4608,4612,4641,4645,4653,4657,4661,4668,4690,4697,4713,4725,4745,4752,4756,4760,4769],{"type":37,"tag":38,"props":3857,"children":3858},{"id":40},[3859],{"type":43,"value":44},{"type":37,"tag":46,"props":3861,"children":3862},{},[3863,3864,3869,3870,3875,3876,3881,3882,3887,3888,3893,3894,3899],{"type":43,"value":50},{"type":37,"tag":52,"props":3865,"children":3867},{"className":3866},[],[3868],{"type":43,"value":57},{"type":43,"value":59},{"type":37,"tag":52,"props":3871,"children":3873},{"className":3872},[],[3874],{"type":43,"value":65},{"type":43,"value":67},{"type":37,"tag":52,"props":3877,"children":3879},{"className":3878},[],[3880],{"type":43,"value":73},{"type":43,"value":67},{"type":37,"tag":52,"props":3883,"children":3885},{"className":3884},[],[3886],{"type":43,"value":80},{"type":43,"value":82},{"type":37,"tag":52,"props":3889,"children":3891},{"className":3890},[],[3892],{"type":43,"value":88},{"type":43,"value":90},{"type":37,"tag":52,"props":3895,"children":3897},{"className":3896},[],[3898],{"type":43,"value":96},{"type":43,"value":98},{"type":37,"tag":38,"props":3901,"children":3902},{"id":101},[3903],{"type":43,"value":104},{"type":37,"tag":46,"props":3905,"children":3906},{},[3907],{"type":43,"value":109},{"type":37,"tag":46,"props":3909,"children":3910},{},[3911,3912,3916,3917,3921],{"type":43,"value":114},{"type":37,"tag":116,"props":3913,"children":3914},{},[3915],{"type":43,"value":120},{"type":43,"value":122},{"type":37,"tag":116,"props":3918,"children":3919},{},[3920],{"type":43,"value":127},{"type":43,"value":129},{"type":37,"tag":38,"props":3923,"children":3924},{"id":132},[3925],{"type":43,"value":135},{"type":37,"tag":137,"props":3927,"children":3928},{"id":139},[3929],{"type":43,"value":142},{"type":37,"tag":46,"props":3931,"children":3932},{},[3933],{"type":43,"value":147},{"type":37,"tag":149,"props":3935,"children":3936},{},[3937,3946,3961],{"type":37,"tag":153,"props":3938,"children":3939},{},[3940,3945],{"type":37,"tag":52,"props":3941,"children":3943},{"className":3942},[],[3944],{"type":43,"value":161},{"type":43,"value":163},{"type":37,"tag":153,"props":3947,"children":3948},{},[3949,3954,3955,3960],{"type":37,"tag":52,"props":3950,"children":3952},{"className":3951},[],[3953],{"type":43,"value":172},{"type":43,"value":174},{"type":37,"tag":52,"props":3956,"children":3958},{"className":3957},[],[3959],{"type":43,"value":180},{"type":43,"value":182},{"type":37,"tag":153,"props":3962,"children":3963},{},[3964,3969,3970,3975],{"type":37,"tag":52,"props":3965,"children":3967},{"className":3966},[],[3968],{"type":43,"value":191},{"type":43,"value":174},{"type":37,"tag":52,"props":3971,"children":3973},{"className":3972},[],[3974],{"type":43,"value":198},{"type":43,"value":182},{"type":37,"tag":46,"props":3977,"children":3978},{},[3979,3980,3985,3986,3991,3992,3997,3998,4003],{"type":43,"value":204},{"type":37,"tag":52,"props":3981,"children":3983},{"className":3982},[],[3984],{"type":43,"value":210},{"type":43,"value":212},{"type":37,"tag":52,"props":3987,"children":3989},{"className":3988},[],[3990],{"type":43,"value":218},{"type":43,"value":220},{"type":37,"tag":52,"props":3993,"children":3995},{"className":3994},[],[3996],{"type":43,"value":226},{"type":43,"value":228},{"type":37,"tag":52,"props":3999,"children":4001},{"className":4000},[],[4002],{"type":43,"value":234},{"type":43,"value":236},{"type":37,"tag":137,"props":4005,"children":4006},{"id":239},[4007],{"type":43,"value":242},{"type":37,"tag":46,"props":4009,"children":4010},{},[4011,4012,4017,4018,4023],{"type":43,"value":247},{"type":37,"tag":52,"props":4013,"children":4015},{"className":4014},[],[4016],{"type":43,"value":253},{"type":43,"value":255},{"type":37,"tag":52,"props":4019,"children":4021},{"className":4020},[],[4022],{"type":43,"value":261},{"type":43,"value":263},{"type":37,"tag":265,"props":4025,"children":4026},{"className":267,"code":268,"language":269,"meta":7,"style":7},[4027],{"type":37,"tag":52,"props":4028,"children":4029},{"__ignoreMap":7},[4030,4049,4064,4079,4094,4109,4124],{"type":37,"tag":275,"props":4031,"children":4032},{"class":277,"line":278},[4033,4037,4041,4045],{"type":37,"tag":275,"props":4034,"children":4035},{"style":282},[4036],{"type":43,"value":285},{"type":37,"tag":275,"props":4038,"children":4039},{"style":288},[4040],{"type":43,"value":291},{"type":37,"tag":275,"props":4042,"children":4043},{"style":288},[4044],{"type":43,"value":296},{"type":37,"tag":275,"props":4046,"children":4047},{"style":299},[4048],{"type":43,"value":302},{"type":37,"tag":275,"props":4050,"children":4051},{"class":277,"line":305},[4052,4056,4060],{"type":37,"tag":275,"props":4053,"children":4054},{"style":299},[4055],{"type":43,"value":311},{"type":37,"tag":275,"props":4057,"children":4058},{"style":288},[4059],{"type":43,"value":316},{"type":37,"tag":275,"props":4061,"children":4062},{"style":299},[4063],{"type":43,"value":302},{"type":37,"tag":275,"props":4065,"children":4066},{"class":277,"line":17},[4067,4071,4075],{"type":37,"tag":275,"props":4068,"children":4069},{"style":299},[4070],{"type":43,"value":328},{"type":37,"tag":275,"props":4072,"children":4073},{"style":288},[4074],{"type":43,"value":333},{"type":37,"tag":275,"props":4076,"children":4077},{"style":299},[4078],{"type":43,"value":302},{"type":37,"tag":275,"props":4080,"children":4081},{"class":277,"line":340},[4082,4086,4090],{"type":37,"tag":275,"props":4083,"children":4084},{"style":299},[4085],{"type":43,"value":346},{"type":37,"tag":275,"props":4087,"children":4088},{"style":288},[4089],{"type":43,"value":351},{"type":37,"tag":275,"props":4091,"children":4092},{"style":299},[4093],{"type":43,"value":302},{"type":37,"tag":275,"props":4095,"children":4096},{"class":277,"line":11},[4097,4101,4105],{"type":37,"tag":275,"props":4098,"children":4099},{"style":299},[4100],{"type":43,"value":346},{"type":37,"tag":275,"props":4102,"children":4103},{"style":288},[4104],{"type":43,"value":367},{"type":37,"tag":275,"props":4106,"children":4107},{"style":299},[4108],{"type":43,"value":302},{"type":37,"tag":275,"props":4110,"children":4111},{"class":277,"line":374},[4112,4116,4120],{"type":37,"tag":275,"props":4113,"children":4114},{"style":299},[4115],{"type":43,"value":346},{"type":37,"tag":275,"props":4117,"children":4118},{"style":288},[4119],{"type":43,"value":384},{"type":37,"tag":275,"props":4121,"children":4122},{"style":299},[4123],{"type":43,"value":302},{"type":37,"tag":275,"props":4125,"children":4126},{"class":277,"line":391},[4127],{"type":37,"tag":275,"props":4128,"children":4129},{"style":288},[4130],{"type":43,"value":397},{"type":37,"tag":46,"props":4132,"children":4133},{},[4134,4135,4140],{"type":43,"value":402},{"type":37,"tag":52,"props":4136,"children":4138},{"className":4137},[],[4139],{"type":43,"value":408},{"type":43,"value":410},{"type":37,"tag":265,"props":4142,"children":4143},{"className":267,"code":413,"language":269,"meta":7,"style":7},[4144],{"type":37,"tag":52,"props":4145,"children":4146},{"__ignoreMap":7},[4147,4166,4181,4196,4211],{"type":37,"tag":275,"props":4148,"children":4149},{"class":277,"line":278},[4150,4154,4158,4162],{"type":37,"tag":275,"props":4151,"children":4152},{"style":282},[4153],{"type":43,"value":285},{"type":37,"tag":275,"props":4155,"children":4156},{"style":288},[4157],{"type":43,"value":291},{"type":37,"tag":275,"props":4159,"children":4160},{"style":288},[4161],{"type":43,"value":296},{"type":37,"tag":275,"props":4163,"children":4164},{"style":299},[4165],{"type":43,"value":302},{"type":37,"tag":275,"props":4167,"children":4168},{"class":277,"line":305},[4169,4173,4177],{"type":37,"tag":275,"props":4170,"children":4171},{"style":299},[4172],{"type":43,"value":311},{"type":37,"tag":275,"props":4174,"children":4175},{"style":288},[4176],{"type":43,"value":316},{"type":37,"tag":275,"props":4178,"children":4179},{"style":299},[4180],{"type":43,"value":302},{"type":37,"tag":275,"props":4182,"children":4183},{"class":277,"line":17},[4184,4188,4192],{"type":37,"tag":275,"props":4185,"children":4186},{"style":299},[4187],{"type":43,"value":328},{"type":37,"tag":275,"props":4189,"children":4190},{"style":288},[4191],{"type":43,"value":463},{"type":37,"tag":275,"props":4193,"children":4194},{"style":299},[4195],{"type":43,"value":302},{"type":37,"tag":275,"props":4197,"children":4198},{"class":277,"line":340},[4199,4203,4207],{"type":37,"tag":275,"props":4200,"children":4201},{"style":299},[4202],{"type":43,"value":475},{"type":37,"tag":275,"props":4204,"children":4205},{"style":288},[4206],{"type":43,"value":367},{"type":37,"tag":275,"props":4208,"children":4209},{"style":299},[4210],{"type":43,"value":302},{"type":37,"tag":275,"props":4212,"children":4213},{"class":277,"line":11},[4214],{"type":37,"tag":275,"props":4215,"children":4216},{"style":288},[4217],{"type":43,"value":397},{"type":37,"tag":492,"props":4219,"children":4220},{},[4221],{"type":37,"tag":46,"props":4222,"children":4223},{},[4224,4228,4229,4233,4234,4239,4240,4245],{"type":37,"tag":499,"props":4225,"children":4226},{},[4227],{"type":43,"value":503},{"type":43,"value":505},{"type":37,"tag":499,"props":4230,"children":4231},{},[4232],{"type":43,"value":510},{"type":43,"value":512},{"type":37,"tag":52,"props":4235,"children":4237},{"className":4236},[],[4238],{"type":43,"value":518},{"type":43,"value":520},{"type":37,"tag":52,"props":4241,"children":4243},{"className":4242},[],[4244],{"type":43,"value":526},{"type":43,"value":98},{"type":37,"tag":137,"props":4247,"children":4248},{"id":530},[4249],{"type":43,"value":533},{"type":37,"tag":265,"props":4251,"children":4252},{"className":267,"code":536,"language":269,"meta":7,"style":7},[4253],{"type":37,"tag":52,"props":4254,"children":4255},{"__ignoreMap":7},[4256],{"type":37,"tag":275,"props":4257,"children":4258},{"class":277,"line":278},[4259,4263],{"type":37,"tag":275,"props":4260,"children":4261},{"style":282},[4262],{"type":43,"value":548},{"type":37,"tag":275,"props":4264,"children":4265},{"style":288},[4266],{"type":43,"value":553},{"type":37,"tag":46,"props":4268,"children":4269},{},[4270,4271,4276],{"type":43,"value":558},{"type":37,"tag":52,"props":4272,"children":4274},{"className":4273},[],[4275],{"type":43,"value":88},{"type":43,"value":565},{"type":37,"tag":265,"props":4278,"children":4280},{"className":4279,"code":570,"language":43},[569],[4281],{"type":37,"tag":52,"props":4282,"children":4283},{"__ignoreMap":7},[4284],{"type":43,"value":570},{"type":37,"tag":46,"props":4286,"children":4287},{},[4288],{"type":43,"value":580},{"type":37,"tag":265,"props":4290,"children":4291},{"className":583,"code":584,"language":585,"meta":7,"style":7},[4292],{"type":37,"tag":52,"props":4293,"children":4294},{"__ignoreMap":7},[4295,4310,4325,4336,4355,4370,4389,4404,4423,4438,4457],{"type":37,"tag":275,"props":4296,"children":4297},{"class":277,"line":278},[4298,4302,4306],{"type":37,"tag":275,"props":4299,"children":4300},{"style":595},[4301],{"type":43,"value":598},{"type":37,"tag":275,"props":4303,"children":4304},{"style":601},[4305],{"type":43,"value":604},{"type":37,"tag":275,"props":4307,"children":4308},{"style":288},[4309],{"type":43,"value":609},{"type":37,"tag":275,"props":4311,"children":4312},{"class":277,"line":305},[4313,4317,4321],{"type":37,"tag":275,"props":4314,"children":4315},{"style":595},[4316],{"type":43,"value":617},{"type":37,"tag":275,"props":4318,"children":4319},{"style":601},[4320],{"type":43,"value":604},{"type":37,"tag":275,"props":4322,"children":4323},{"style":288},[4324],{"type":43,"value":626},{"type":37,"tag":275,"props":4326,"children":4327},{"class":277,"line":17},[4328,4332],{"type":37,"tag":275,"props":4329,"children":4330},{"style":595},[4331],{"type":43,"value":634},{"type":37,"tag":275,"props":4333,"children":4334},{"style":601},[4335],{"type":43,"value":639},{"type":37,"tag":275,"props":4337,"children":4338},{"class":277,"line":340},[4339,4343,4347,4351],{"type":37,"tag":275,"props":4340,"children":4341},{"style":601},[4342],{"type":43,"value":647},{"type":37,"tag":275,"props":4344,"children":4345},{"style":595},[4346],{"type":43,"value":598},{"type":37,"tag":275,"props":4348,"children":4349},{"style":601},[4350],{"type":43,"value":604},{"type":37,"tag":275,"props":4352,"children":4353},{"style":288},[4354],{"type":43,"value":660},{"type":37,"tag":275,"props":4356,"children":4357},{"class":277,"line":11},[4358,4362,4366],{"type":37,"tag":275,"props":4359,"children":4360},{"style":595},[4361],{"type":43,"value":668},{"type":37,"tag":275,"props":4363,"children":4364},{"style":601},[4365],{"type":43,"value":604},{"type":37,"tag":275,"props":4367,"children":4368},{"style":288},[4369],{"type":43,"value":677},{"type":37,"tag":275,"props":4371,"children":4372},{"class":277,"line":374},[4373,4377,4381,4385],{"type":37,"tag":275,"props":4374,"children":4375},{"style":601},[4376],{"type":43,"value":647},{"type":37,"tag":275,"props":4378,"children":4379},{"style":595},[4380],{"type":43,"value":598},{"type":37,"tag":275,"props":4382,"children":4383},{"style":601},[4384],{"type":43,"value":604},{"type":37,"tag":275,"props":4386,"children":4387},{"style":288},[4388],{"type":43,"value":697},{"type":37,"tag":275,"props":4390,"children":4391},{"class":277,"line":391},[4392,4396,4400],{"type":37,"tag":275,"props":4393,"children":4394},{"style":595},[4395],{"type":43,"value":668},{"type":37,"tag":275,"props":4397,"children":4398},{"style":601},[4399],{"type":43,"value":604},{"type":37,"tag":275,"props":4401,"children":4402},{"style":288},[4403],{"type":43,"value":677},{"type":37,"tag":275,"props":4405,"children":4406},{"class":277,"line":715},[4407,4411,4415,4419],{"type":37,"tag":275,"props":4408,"children":4409},{"style":601},[4410],{"type":43,"value":647},{"type":37,"tag":275,"props":4412,"children":4413},{"style":595},[4414],{"type":43,"value":598},{"type":37,"tag":275,"props":4416,"children":4417},{"style":601},[4418],{"type":43,"value":604},{"type":37,"tag":275,"props":4420,"children":4421},{"style":288},[4422],{"type":43,"value":733},{"type":37,"tag":275,"props":4424,"children":4425},{"class":277,"line":736},[4426,4430,4434],{"type":37,"tag":275,"props":4427,"children":4428},{"style":595},[4429],{"type":43,"value":668},{"type":37,"tag":275,"props":4431,"children":4432},{"style":601},[4433],{"type":43,"value":604},{"type":37,"tag":275,"props":4435,"children":4436},{"style":288},[4437],{"type":43,"value":750},{"type":37,"tag":275,"props":4439,"children":4440},{"class":277,"line":753},[4441,4445,4449,4453],{"type":37,"tag":275,"props":4442,"children":4443},{"style":601},[4444],{"type":43,"value":647},{"type":37,"tag":275,"props":4446,"children":4447},{"style":595},[4448],{"type":43,"value":598},{"type":37,"tag":275,"props":4450,"children":4451},{"style":601},[4452],{"type":43,"value":604},{"type":37,"tag":275,"props":4454,"children":4455},{"style":288},[4456],{"type":43,"value":771},{"type":37,"tag":275,"props":4458,"children":4459},{"class":277,"line":774},[4460,4464,4468],{"type":37,"tag":275,"props":4461,"children":4462},{"style":595},[4463],{"type":43,"value":668},{"type":37,"tag":275,"props":4465,"children":4466},{"style":601},[4467],{"type":43,"value":604},{"type":37,"tag":275,"props":4469,"children":4470},{"style":288},[4471],{"type":43,"value":788},{"type":37,"tag":46,"props":4473,"children":4474},{},[4475],{"type":43,"value":793},{"type":37,"tag":137,"props":4477,"children":4478},{"id":796},[4479],{"type":43,"value":799},{"type":37,"tag":46,"props":4481,"children":4482},{},[4483,4484,4489],{"type":43,"value":804},{"type":37,"tag":52,"props":4485,"children":4487},{"className":4486},[],[4488],{"type":43,"value":810},{"type":43,"value":812},{"type":37,"tag":265,"props":4491,"children":4492},{"className":267,"code":815,"language":269,"meta":7,"style":7},[4493],{"type":37,"tag":52,"props":4494,"children":4495},{"__ignoreMap":7},[4496,4503,4526,4533,4540,4563,4570,4577],{"type":37,"tag":275,"props":4497,"children":4498},{"class":277,"line":278},[4499],{"type":37,"tag":275,"props":4500,"children":4501},{"style":825},[4502],{"type":43,"value":828},{"type":37,"tag":275,"props":4504,"children":4505},{"class":277,"line":305},[4506,4510,4514,4518,4522],{"type":37,"tag":275,"props":4507,"children":4508},{"style":282},[4509],{"type":43,"value":836},{"type":37,"tag":275,"props":4511,"children":4512},{"style":288},[4513],{"type":43,"value":841},{"type":37,"tag":275,"props":4515,"children":4516},{"style":299},[4517],{"type":43,"value":846},{"type":37,"tag":275,"props":4519,"children":4520},{"style":288},[4521],{"type":43,"value":851},{"type":37,"tag":275,"props":4523,"children":4524},{"style":299},[4525],{"type":43,"value":856},{"type":37,"tag":275,"props":4527,"children":4528},{"class":277,"line":17},[4529],{"type":37,"tag":275,"props":4530,"children":4531},{"emptyLinePlaceholder":862},[4532],{"type":43,"value":865},{"type":37,"tag":275,"props":4534,"children":4535},{"class":277,"line":340},[4536],{"type":37,"tag":275,"props":4537,"children":4538},{"style":825},[4539],{"type":43,"value":873},{"type":37,"tag":275,"props":4541,"children":4542},{"class":277,"line":11},[4543,4547,4551,4555,4559],{"type":37,"tag":275,"props":4544,"children":4545},{"style":282},[4546],{"type":43,"value":836},{"type":37,"tag":275,"props":4548,"children":4549},{"style":288},[4550],{"type":43,"value":841},{"type":37,"tag":275,"props":4552,"children":4553},{"style":299},[4554],{"type":43,"value":846},{"type":37,"tag":275,"props":4556,"children":4557},{"style":288},[4558],{"type":43,"value":893},{"type":37,"tag":275,"props":4560,"children":4561},{"style":299},[4562],{"type":43,"value":856},{"type":37,"tag":275,"props":4564,"children":4565},{"class":277,"line":374},[4566],{"type":37,"tag":275,"props":4567,"children":4568},{"emptyLinePlaceholder":862},[4569],{"type":43,"value":865},{"type":37,"tag":275,"props":4571,"children":4572},{"class":277,"line":391},[4573],{"type":37,"tag":275,"props":4574,"children":4575},{"style":825},[4576],{"type":43,"value":912},{"type":37,"tag":275,"props":4578,"children":4579},{"class":277,"line":715},[4580,4584,4588,4592,4596],{"type":37,"tag":275,"props":4581,"children":4582},{"style":282},[4583],{"type":43,"value":836},{"type":37,"tag":275,"props":4585,"children":4586},{"style":288},[4587],{"type":43,"value":841},{"type":37,"tag":275,"props":4589,"children":4590},{"style":299},[4591],{"type":43,"value":846},{"type":37,"tag":275,"props":4593,"children":4594},{"style":288},[4595],{"type":43,"value":932},{"type":37,"tag":275,"props":4597,"children":4598},{"style":299},[4599],{"type":43,"value":856},{"type":37,"tag":46,"props":4601,"children":4602},{},[4603],{"type":43,"value":941},{"type":37,"tag":137,"props":4605,"children":4606},{"id":944},[4607],{"type":43,"value":947},{"type":37,"tag":46,"props":4609,"children":4610},{},[4611],{"type":43,"value":952},{"type":37,"tag":265,"props":4613,"children":4614},{"className":267,"code":955,"language":269,"meta":7,"style":7},[4615],{"type":37,"tag":52,"props":4616,"children":4617},{"__ignoreMap":7},[4618],{"type":37,"tag":275,"props":4619,"children":4620},{"class":277,"line":278},[4621,4625,4629,4633,4637],{"type":37,"tag":275,"props":4622,"children":4623},{"style":282},[4624],{"type":43,"value":285},{"type":37,"tag":275,"props":4626,"children":4627},{"style":288},[4628],{"type":43,"value":971},{"type":37,"tag":275,"props":4630,"children":4631},{"style":299},[4632],{"type":43,"value":976},{"type":37,"tag":275,"props":4634,"children":4635},{"style":288},[4636],{"type":43,"value":316},{"type":37,"tag":275,"props":4638,"children":4639},{"style":288},[4640],{"type":43,"value":985},{"type":37,"tag":46,"props":4642,"children":4643},{},[4644],{"type":43,"value":990},{"type":37,"tag":265,"props":4646,"children":4648},{"className":4647,"code":994,"language":43},[569],[4649],{"type":37,"tag":52,"props":4650,"children":4651},{"__ignoreMap":7},[4652],{"type":43,"value":994},{"type":37,"tag":46,"props":4654,"children":4655},{},[4656],{"type":43,"value":1004},{"type":37,"tag":38,"props":4658,"children":4659},{"id":1007},[4660],{"type":43,"value":1010},{"type":37,"tag":46,"props":4662,"children":4663},{},[4664],{"type":37,"tag":499,"props":4665,"children":4666},{},[4667],{"type":43,"value":1018},{"type":37,"tag":46,"props":4669,"children":4670},{},[4671,4672,4677,4678,4683,4684,4689],{"type":43,"value":1023},{"type":37,"tag":52,"props":4673,"children":4675},{"className":4674},[],[4676],{"type":43,"value":1029},{"type":43,"value":1031},{"type":37,"tag":52,"props":4679,"children":4681},{"className":4680},[],[4682],{"type":43,"value":1037},{"type":43,"value":1039},{"type":37,"tag":52,"props":4685,"children":4687},{"className":4686},[],[4688],{"type":43,"value":1045},{"type":43,"value":98},{"type":37,"tag":46,"props":4691,"children":4692},{},[4693],{"type":37,"tag":499,"props":4694,"children":4695},{},[4696],{"type":43,"value":1054},{"type":37,"tag":46,"props":4698,"children":4699},{},[4700,4701,4706,4707,4712],{"type":43,"value":1059},{"type":37,"tag":52,"props":4702,"children":4704},{"className":4703},[],[4705],{"type":43,"value":1065},{"type":43,"value":1067},{"type":37,"tag":52,"props":4708,"children":4710},{"className":4709},[],[4711],{"type":43,"value":1073},{"type":43,"value":1075},{"type":37,"tag":46,"props":4714,"children":4715},{},[4716],{"type":37,"tag":499,"props":4717,"children":4718},{},[4719,4720],{"type":43,"value":1083},{"type":37,"tag":52,"props":4721,"children":4723},{"className":4722},[],[4724],{"type":43,"value":96},{"type":37,"tag":46,"props":4726,"children":4727},{},[4728,4733,4734,4738,4739,4744],{"type":37,"tag":52,"props":4729,"children":4731},{"className":4730},[],[4732],{"type":43,"value":57},{"type":43,"value":1098},{"type":37,"tag":116,"props":4735,"children":4736},{},[4737],{"type":43,"value":1103},{"type":43,"value":1105},{"type":37,"tag":52,"props":4740,"children":4742},{"className":4741},[],[4743],{"type":43,"value":1111},{"type":43,"value":1113},{"type":37,"tag":46,"props":4746,"children":4747},{},[4748],{"type":37,"tag":499,"props":4749,"children":4750},{},[4751],{"type":43,"value":1121},{"type":37,"tag":46,"props":4753,"children":4754},{},[4755],{"type":43,"value":1126},{"type":37,"tag":38,"props":4757,"children":4758},{"id":1129},[4759],{"type":43,"value":1132},{"type":37,"tag":46,"props":4761,"children":4762},{},[4763,4768],{"type":37,"tag":52,"props":4764,"children":4766},{"className":4765},[],[4767],{"type":43,"value":96},{"type":43,"value":1142},{"type":37,"tag":1144,"props":4770,"children":4771},{},[4772],{"type":43,"value":1148},{"title":7,"searchDepth":305,"depth":305,"links":4774},[4775,4776,4777,4784,4785],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":4778},[4779,4780,4781,4782,4783],{"id":139,"depth":17,"text":142},{"id":239,"depth":17,"text":242},{"id":530,"depth":17,"text":533},{"id":796,"depth":17,"text":799},{"id":944,"depth":17,"text":947},{"id":1007,"depth":305,"text":1010},{"id":1129,"depth":305,"text":1132},{"_path":4787,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":4788,"description":4789,"date":10,"readingTime":374,"category":12,"tags":4790,"difficulty":16,"module":5,"step":340,"journeys":4792,"learnMore":4793,"stepGif":28,"author":4803,"body":4804,"_type":1162,"_id":6171,"_source":1164,"_file":6172,"_stem":6173,"_extension":1167},"/tutorials/dbt-bruin-analyst/enhance-and-validate","AI-Enhance and Validate the Context","Use bruin ai enhance to fill every asset with descriptions, tags, and quality checks — then bruin validate to make sure nothing got corrupted along the way.",[14,4791,15],"Bruin AI",[19,20],[4794,4797,4800],{"label":4795,"url":4796},"bruin ai enhance (docs)","https://getbruin.com/docs/bruin/commands/ai-enhance.html",{"label":4798,"url":4799},"Quality checks reference","https://getbruin.com/docs/bruin/quality/overview.html",{"label":4801,"url":4802},"bruin validate (docs)","https://getbruin.com/docs/bruin/commands/validate.html",{"name":30,"role":31,"image":32},{"type":34,"children":4805,"toc":6160},[4806,4810,4844,4848,4884,4904,4908,4914,4919,4952,4957,5049,5083,5104,5137,5179,5185,5190,5210,5215,5639,5644,5679,5685,5714,5718,5726,5731,5737,5770,6092,6104,6133,6137,6156],{"type":37,"tag":38,"props":4807,"children":4808},{"id":40},[4809],{"type":43,"value":44},{"type":37,"tag":4811,"props":4812,"children":4813},"ol",{},[4814,4833],{"type":37,"tag":153,"props":4815,"children":4816},{},[4817,4818,4824,4826,4831],{"type":43,"value":50},{"type":37,"tag":52,"props":4819,"children":4821},{"className":4820},[],[4822],{"type":43,"value":4823},"bruin ai enhance",{"type":43,"value":4825}," over ",{"type":37,"tag":52,"props":4827,"children":4829},{"className":4828},[],[4830],{"type":43,"value":96},{"type":43,"value":4832}," so every asset gets a description, semantic tags, per-column docs, and quality checks",{"type":37,"tag":153,"props":4834,"children":4835},{},[4836,4837,4842],{"type":43,"value":50},{"type":37,"tag":52,"props":4838,"children":4840},{"className":4839},[],[4841],{"type":43,"value":3706},{"type":43,"value":4843}," to confirm none of the YAMLs ended up malformed",{"type":37,"tag":38,"props":4845,"children":4846},{"id":101},[4847],{"type":43,"value":104},{"type":37,"tag":46,"props":4849,"children":4850},{},[4851,4853,4858,4860,4866,4868,4874,4876,4882],{"type":43,"value":4852},"Without descriptions, an AI agent can read your schema but doesn't know what it ",{"type":37,"tag":116,"props":4854,"children":4855},{},[4856],{"type":43,"value":4857},"means",{"type":43,"value":4859},". It sees ",{"type":37,"tag":52,"props":4861,"children":4863},{"className":4862},[],[4864],{"type":43,"value":4865},"gmv",{"type":43,"value":4867}," and guesses; it sees ",{"type":37,"tag":52,"props":4869,"children":4871},{"className":4870},[],[4872],{"type":43,"value":4873},"status = 3",{"type":43,"value":4875}," and queries blindly; it sees a ",{"type":37,"tag":52,"props":4877,"children":4879},{"className":4878},[],[4880],{"type":43,"value":4881},"created_at",{"type":43,"value":4883}," column and assumes UTC. Enhancement is what turns the structural skeleton from the previous step into something an agent can actually reason about.",{"type":37,"tag":46,"props":4885,"children":4886},{},[4887,4889,4895,4897,4902],{"type":43,"value":4888},"Validation matters because ",{"type":37,"tag":52,"props":4890,"children":4892},{"className":4891},[],[4893],{"type":43,"value":4894},"ai enhance",{"type":43,"value":4896}," writes to YAML files at scale, and rare edge cases can produce malformed files. A 30-second ",{"type":37,"tag":52,"props":4898,"children":4900},{"className":4899},[],[4901],{"type":43,"value":3706},{"type":43,"value":4903}," is cheap insurance that catches them immediately, before they confuse an agent at query time.",{"type":37,"tag":38,"props":4905,"children":4906},{"id":132},[4907],{"type":43,"value":135},{"type":37,"tag":137,"props":4909,"children":4911},{"id":4910},"_1-run-the-ai-enhancement",[4912],{"type":43,"value":4913},"1. Run the AI enhancement",{"type":37,"tag":46,"props":4915,"children":4916},{},[4917],{"type":43,"value":4918},"From the dbt project root:",{"type":37,"tag":265,"props":4920,"children":4922},{"className":267,"code":4921,"language":269,"meta":7,"style":7},"bruin ai enhance --claude context/assets\n",[4923],{"type":37,"tag":52,"props":4924,"children":4925},{"__ignoreMap":7},[4926],{"type":37,"tag":275,"props":4927,"children":4928},{"class":277,"line":278},[4929,4933,4938,4943,4948],{"type":37,"tag":275,"props":4930,"children":4931},{"style":282},[4932],{"type":43,"value":285},{"type":37,"tag":275,"props":4934,"children":4935},{"style":288},[4936],{"type":43,"value":4937}," ai",{"type":37,"tag":275,"props":4939,"children":4940},{"style":288},[4941],{"type":43,"value":4942}," enhance",{"type":37,"tag":275,"props":4944,"children":4945},{"style":299},[4946],{"type":43,"value":4947}," --claude",{"type":37,"tag":275,"props":4949,"children":4950},{"style":288},[4951],{"type":43,"value":2792},{"type":37,"tag":46,"props":4953,"children":4954},{},[4955],{"type":43,"value":4956},"For each asset, Bruin sends the column list + a sample of the data to Claude and fills in:",{"type":37,"tag":149,"props":4958,"children":4959},{},[4960,4972,5004,5016],{"type":37,"tag":153,"props":4961,"children":4962},{},[4963,4965,4970],{"type":43,"value":4964},"A multi-paragraph ",{"type":37,"tag":499,"props":4966,"children":4967},{},[4968],{"type":43,"value":4969},"description",{"type":43,"value":4971}," covering purpose, grain, lineage, and typical use",{"type":37,"tag":153,"props":4973,"children":4974},{},[4975,4977,4982,4984,4990,4991,4997,4998],{"type":43,"value":4976},"Semantic ",{"type":37,"tag":499,"props":4978,"children":4979},{},[4980],{"type":43,"value":4981},"tags",{"type":43,"value":4983}," like ",{"type":37,"tag":52,"props":4985,"children":4987},{"className":4986},[],[4988],{"type":43,"value":4989},"domain:retail",{"type":43,"value":67},{"type":37,"tag":52,"props":4992,"children":4994},{"className":4993},[],[4995],{"type":43,"value":4996},"layer:staging",{"type":43,"value":67},{"type":37,"tag":52,"props":4999,"children":5001},{"className":5000},[],[5002],{"type":43,"value":5003},"sensitivity:pii",{"type":37,"tag":153,"props":5005,"children":5006},{},[5007,5009,5014],{"type":43,"value":5008},"Per-column ",{"type":37,"tag":499,"props":5010,"children":5011},{},[5012],{"type":43,"value":5013},"descriptions",{"type":43,"value":5015}," with business meaning",{"type":37,"tag":153,"props":5017,"children":5018},{},[5019,5024,5025,5031,5033,5039,5041,5047],{"type":37,"tag":499,"props":5020,"children":5021},{},[5022],{"type":43,"value":5023},"Quality checks",{"type":43,"value":174},{"type":37,"tag":52,"props":5026,"children":5028},{"className":5027},[],[5029],{"type":43,"value":5030},"not_null",{"type":43,"value":5032}," on keys, ",{"type":37,"tag":52,"props":5034,"children":5036},{"className":5035},[],[5037],{"type":43,"value":5038},"unique",{"type":43,"value":5040}," on identifiers, ",{"type":37,"tag":52,"props":5042,"children":5044},{"className":5043},[],[5045],{"type":43,"value":5046},"accepted_values",{"type":43,"value":5048}," on enums",{"type":37,"tag":46,"props":5050,"children":5051},{},[5052,5054,5060,5061,5067,5068,5074,5076,5082],{"type":43,"value":5053},"The command auto-detects which AI CLI you have installed. If you have several, pass an explicit flag — ",{"type":37,"tag":52,"props":5055,"children":5057},{"className":5056},[],[5058],{"type":43,"value":5059},"--claude",{"type":43,"value":67},{"type":37,"tag":52,"props":5062,"children":5064},{"className":5063},[],[5065],{"type":43,"value":5066},"--opencode",{"type":43,"value":67},{"type":37,"tag":52,"props":5069,"children":5071},{"className":5070},[],[5072],{"type":43,"value":5073},"--codex",{"type":43,"value":5075},", or ",{"type":37,"tag":52,"props":5077,"children":5079},{"className":5078},[],[5080],{"type":43,"value":5081},"--cursor",{"type":43,"value":98},{"type":37,"tag":492,"props":5084,"children":5085},{},[5086],{"type":37,"tag":46,"props":5087,"children":5088},{},[5089,5094,5096,5102],{"type":37,"tag":499,"props":5090,"children":5091},{},[5092],{"type":43,"value":5093},"Time estimate.",{"type":43,"value":5095}," Each asset costs minutes of Claude time. For ~40 assets (the contoso reference), expect 30–60 minutes wall-clock. Bruin parallelizes up to 5 by default — increase with ",{"type":37,"tag":52,"props":5097,"children":5099},{"className":5098},[],[5100],{"type":43,"value":5101},"--concurrency 10",{"type":43,"value":5103}," if you want it faster and your AI quota tolerates it.",{"type":37,"tag":492,"props":5105,"children":5106},{},[5107],{"type":37,"tag":46,"props":5108,"children":5109},{},[5110,5127,5129,5135],{"type":37,"tag":499,"props":5111,"children":5112},{},[5113,5114,5119,5121,5126],{"type":43,"value":3793},{"type":37,"tag":52,"props":5115,"children":5117},{"className":5116},[],[5118],{"type":43,"value":4894},{"type":43,"value":5120}," doesn't always honor ",{"type":37,"tag":52,"props":5122,"children":5124},{"className":5123},[],[5125],{"type":43,"value":1029},{"type":43,"value":98},{"type":43,"value":5128}," It can fall back to your global ",{"type":37,"tag":52,"props":5130,"children":5132},{"className":5131},[],[5133],{"type":43,"value":5134},"~/.bruin.yml",{"type":43,"value":5136}," for connection lookup, and if that has a broken connection you'll see \"fill columns failed\" warnings. The warnings are cosmetic — column types were already filled by the import step. The enhancement still writes correctly.",{"type":37,"tag":492,"props":5138,"children":5139},{},[5140],{"type":37,"tag":46,"props":5141,"children":5142},{},[5143,5148,5150,5155,5157,5163,5165,5170,5172,5178],{"type":37,"tag":499,"props":5144,"children":5145},{},[5146],{"type":43,"value":5147},"Gotcha — rare YAML corruption.",{"type":43,"value":5149}," On a small fraction of assets, ",{"type":37,"tag":52,"props":5151,"children":5153},{"className":5152},[],[5154],{"type":43,"value":4894},{"type":43,"value":5156}," has been known to mangle the ",{"type":37,"tag":52,"props":5158,"children":5160},{"className":5159},[],[5161],{"type":43,"value":5162},"columns:",{"type":43,"value":5164}," block. Always run ",{"type":37,"tag":52,"props":5166,"children":5168},{"className":5167},[],[5169],{"type":43,"value":3706},{"type":43,"value":5171}," afterward (next step). If a single asset breaks, regenerate just that file: ",{"type":37,"tag":52,"props":5173,"children":5175},{"className":5174},[],[5176],{"type":43,"value":5177},"bruin ai enhance --claude context/assets/\u003Cschema>/\u003Ctable>.asset.yml",{"type":43,"value":98},{"type":37,"tag":137,"props":5180,"children":5182},{"id":5181},"_2-spot-check-a-single-asset",[5183],{"type":43,"value":5184},"2. Spot-check a single asset",{"type":37,"tag":46,"props":5186,"children":5187},{},[5188],{"type":43,"value":5189},"Open one of the report assets — these benefit most from enrichment because the column names alone don't tell the full story:",{"type":37,"tag":265,"props":5191,"children":5193},{"className":267,"code":5192,"language":269,"meta":7,"style":7},"cat context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml\n",[5194],{"type":37,"tag":52,"props":5195,"children":5196},{"__ignoreMap":7},[5197],{"type":37,"tag":275,"props":5198,"children":5199},{"class":277,"line":278},[5200,5205],{"type":37,"tag":275,"props":5201,"children":5202},{"style":282},[5203],{"type":43,"value":5204},"cat",{"type":37,"tag":275,"props":5206,"children":5207},{"style":288},[5208],{"type":43,"value":5209}," context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml\n",{"type":37,"tag":46,"props":5211,"children":5212},{},[5213],{"type":43,"value":5214},"You should now see something like:",{"type":37,"tag":265,"props":5216,"children":5218},{"className":583,"code":5217,"language":585,"meta":7,"style":7},"name: contoso_dbt_reports.rpt_revenue_by_segment\ntype: bq.source\ndescription: |\n  Yearly revenue rolled up by product segment and category. Built from the\n  staging order-line table joined with the product dimension. One row per\n  (segment_id, category_name, year). Used by retail merchandising and\n  finance for category-level reporting.\ntags:\n  - domain:retail\n  - layer:reports\n  - grain:segment_category_year\ncolumns:\n  - name: segment_id\n    type: STRING\n    description: \"Identifier for the product segment (joins to dim_segment).\"\n    checks:\n      - name: not_null\n  - name: category_name\n    type: STRING\n    description: \"Human-readable category label, e.g. 'Bikes', 'Components'.\"\n    checks:\n      - name: not_null\n  - name: year\n    type: INT64\n    description: \"Calendar year of the order date, in UTC.\"\n  - name: revenue_usd\n    type: NUMERIC\n    description: \"Sum of order_line.gross_amount in USD, post-discount.\"\n",[5219],{"type":37,"tag":52,"props":5220,"children":5221},{"__ignoreMap":7},[5222,5237,5252,5268,5276,5284,5292,5300,5311,5323,5335,5347,5359,5379,5395,5413,5426,5448,5468,5484,5501,5513,5533,5553,5569,5586,5606,5622],{"type":37,"tag":275,"props":5223,"children":5224},{"class":277,"line":278},[5225,5229,5233],{"type":37,"tag":275,"props":5226,"children":5227},{"style":595},[5228],{"type":43,"value":598},{"type":37,"tag":275,"props":5230,"children":5231},{"style":601},[5232],{"type":43,"value":604},{"type":37,"tag":275,"props":5234,"children":5235},{"style":288},[5236],{"type":43,"value":609},{"type":37,"tag":275,"props":5238,"children":5239},{"class":277,"line":305},[5240,5244,5248],{"type":37,"tag":275,"props":5241,"children":5242},{"style":595},[5243],{"type":43,"value":617},{"type":37,"tag":275,"props":5245,"children":5246},{"style":601},[5247],{"type":43,"value":604},{"type":37,"tag":275,"props":5249,"children":5250},{"style":288},[5251],{"type":43,"value":626},{"type":37,"tag":275,"props":5253,"children":5254},{"class":277,"line":17},[5255,5259,5263],{"type":37,"tag":275,"props":5256,"children":5257},{"style":595},[5258],{"type":43,"value":4969},{"type":37,"tag":275,"props":5260,"children":5261},{"style":601},[5262],{"type":43,"value":604},{"type":37,"tag":275,"props":5264,"children":5265},{"style":2519},[5266],{"type":43,"value":5267},"|\n",{"type":37,"tag":275,"props":5269,"children":5270},{"class":277,"line":340},[5271],{"type":37,"tag":275,"props":5272,"children":5273},{"style":288},[5274],{"type":43,"value":5275},"  Yearly revenue rolled up by product segment and category. Built from the\n",{"type":37,"tag":275,"props":5277,"children":5278},{"class":277,"line":11},[5279],{"type":37,"tag":275,"props":5280,"children":5281},{"style":288},[5282],{"type":43,"value":5283},"  staging order-line table joined with the product dimension. One row per\n",{"type":37,"tag":275,"props":5285,"children":5286},{"class":277,"line":374},[5287],{"type":37,"tag":275,"props":5288,"children":5289},{"style":288},[5290],{"type":43,"value":5291},"  (segment_id, category_name, year). Used by retail merchandising and\n",{"type":37,"tag":275,"props":5293,"children":5294},{"class":277,"line":391},[5295],{"type":37,"tag":275,"props":5296,"children":5297},{"style":288},[5298],{"type":43,"value":5299},"  finance for category-level reporting.\n",{"type":37,"tag":275,"props":5301,"children":5302},{"class":277,"line":715},[5303,5307],{"type":37,"tag":275,"props":5304,"children":5305},{"style":595},[5306],{"type":43,"value":4981},{"type":37,"tag":275,"props":5308,"children":5309},{"style":601},[5310],{"type":43,"value":639},{"type":37,"tag":275,"props":5312,"children":5313},{"class":277,"line":736},[5314,5318],{"type":37,"tag":275,"props":5315,"children":5316},{"style":601},[5317],{"type":43,"value":647},{"type":37,"tag":275,"props":5319,"children":5320},{"style":288},[5321],{"type":43,"value":5322},"domain:retail\n",{"type":37,"tag":275,"props":5324,"children":5325},{"class":277,"line":753},[5326,5330],{"type":37,"tag":275,"props":5327,"children":5328},{"style":601},[5329],{"type":43,"value":647},{"type":37,"tag":275,"props":5331,"children":5332},{"style":288},[5333],{"type":43,"value":5334},"layer:reports\n",{"type":37,"tag":275,"props":5336,"children":5337},{"class":277,"line":774},[5338,5342],{"type":37,"tag":275,"props":5339,"children":5340},{"style":601},[5341],{"type":43,"value":647},{"type":37,"tag":275,"props":5343,"children":5344},{"style":288},[5345],{"type":43,"value":5346},"grain:segment_category_year\n",{"type":37,"tag":275,"props":5348,"children":5350},{"class":277,"line":5349},12,[5351,5355],{"type":37,"tag":275,"props":5352,"children":5353},{"style":595},[5354],{"type":43,"value":634},{"type":37,"tag":275,"props":5356,"children":5357},{"style":601},[5358],{"type":43,"value":639},{"type":37,"tag":275,"props":5360,"children":5362},{"class":277,"line":5361},13,[5363,5367,5371,5375],{"type":37,"tag":275,"props":5364,"children":5365},{"style":601},[5366],{"type":43,"value":647},{"type":37,"tag":275,"props":5368,"children":5369},{"style":595},[5370],{"type":43,"value":598},{"type":37,"tag":275,"props":5372,"children":5373},{"style":601},[5374],{"type":43,"value":604},{"type":37,"tag":275,"props":5376,"children":5377},{"style":288},[5378],{"type":43,"value":660},{"type":37,"tag":275,"props":5380,"children":5382},{"class":277,"line":5381},14,[5383,5387,5391],{"type":37,"tag":275,"props":5384,"children":5385},{"style":595},[5386],{"type":43,"value":668},{"type":37,"tag":275,"props":5388,"children":5389},{"style":601},[5390],{"type":43,"value":604},{"type":37,"tag":275,"props":5392,"children":5393},{"style":288},[5394],{"type":43,"value":677},{"type":37,"tag":275,"props":5396,"children":5398},{"class":277,"line":5397},15,[5399,5404,5408],{"type":37,"tag":275,"props":5400,"children":5401},{"style":595},[5402],{"type":43,"value":5403},"    description",{"type":37,"tag":275,"props":5405,"children":5406},{"style":601},[5407],{"type":43,"value":604},{"type":37,"tag":275,"props":5409,"children":5410},{"style":288},[5411],{"type":43,"value":5412},"\"Identifier for the product segment (joins to dim_segment).\"\n",{"type":37,"tag":275,"props":5414,"children":5416},{"class":277,"line":5415},16,[5417,5422],{"type":37,"tag":275,"props":5418,"children":5419},{"style":595},[5420],{"type":43,"value":5421},"    checks",{"type":37,"tag":275,"props":5423,"children":5424},{"style":601},[5425],{"type":43,"value":639},{"type":37,"tag":275,"props":5427,"children":5429},{"class":277,"line":5428},17,[5430,5435,5439,5443],{"type":37,"tag":275,"props":5431,"children":5432},{"style":601},[5433],{"type":43,"value":5434},"      - ",{"type":37,"tag":275,"props":5436,"children":5437},{"style":595},[5438],{"type":43,"value":598},{"type":37,"tag":275,"props":5440,"children":5441},{"style":601},[5442],{"type":43,"value":604},{"type":37,"tag":275,"props":5444,"children":5445},{"style":288},[5446],{"type":43,"value":5447},"not_null\n",{"type":37,"tag":275,"props":5449,"children":5451},{"class":277,"line":5450},18,[5452,5456,5460,5464],{"type":37,"tag":275,"props":5453,"children":5454},{"style":601},[5455],{"type":43,"value":647},{"type":37,"tag":275,"props":5457,"children":5458},{"style":595},[5459],{"type":43,"value":598},{"type":37,"tag":275,"props":5461,"children":5462},{"style":601},[5463],{"type":43,"value":604},{"type":37,"tag":275,"props":5465,"children":5466},{"style":288},[5467],{"type":43,"value":697},{"type":37,"tag":275,"props":5469,"children":5471},{"class":277,"line":5470},19,[5472,5476,5480],{"type":37,"tag":275,"props":5473,"children":5474},{"style":595},[5475],{"type":43,"value":668},{"type":37,"tag":275,"props":5477,"children":5478},{"style":601},[5479],{"type":43,"value":604},{"type":37,"tag":275,"props":5481,"children":5482},{"style":288},[5483],{"type":43,"value":677},{"type":37,"tag":275,"props":5485,"children":5487},{"class":277,"line":5486},20,[5488,5492,5496],{"type":37,"tag":275,"props":5489,"children":5490},{"style":595},[5491],{"type":43,"value":5403},{"type":37,"tag":275,"props":5493,"children":5494},{"style":601},[5495],{"type":43,"value":604},{"type":37,"tag":275,"props":5497,"children":5498},{"style":288},[5499],{"type":43,"value":5500},"\"Human-readable category label, e.g. 'Bikes', 'Components'.\"\n",{"type":37,"tag":275,"props":5502,"children":5504},{"class":277,"line":5503},21,[5505,5509],{"type":37,"tag":275,"props":5506,"children":5507},{"style":595},[5508],{"type":43,"value":5421},{"type":37,"tag":275,"props":5510,"children":5511},{"style":601},[5512],{"type":43,"value":639},{"type":37,"tag":275,"props":5514,"children":5516},{"class":277,"line":5515},22,[5517,5521,5525,5529],{"type":37,"tag":275,"props":5518,"children":5519},{"style":601},[5520],{"type":43,"value":5434},{"type":37,"tag":275,"props":5522,"children":5523},{"style":595},[5524],{"type":43,"value":598},{"type":37,"tag":275,"props":5526,"children":5527},{"style":601},[5528],{"type":43,"value":604},{"type":37,"tag":275,"props":5530,"children":5531},{"style":288},[5532],{"type":43,"value":5447},{"type":37,"tag":275,"props":5534,"children":5536},{"class":277,"line":5535},23,[5537,5541,5545,5549],{"type":37,"tag":275,"props":5538,"children":5539},{"style":601},[5540],{"type":43,"value":647},{"type":37,"tag":275,"props":5542,"children":5543},{"style":595},[5544],{"type":43,"value":598},{"type":37,"tag":275,"props":5546,"children":5547},{"style":601},[5548],{"type":43,"value":604},{"type":37,"tag":275,"props":5550,"children":5551},{"style":288},[5552],{"type":43,"value":733},{"type":37,"tag":275,"props":5554,"children":5556},{"class":277,"line":5555},24,[5557,5561,5565],{"type":37,"tag":275,"props":5558,"children":5559},{"style":595},[5560],{"type":43,"value":668},{"type":37,"tag":275,"props":5562,"children":5563},{"style":601},[5564],{"type":43,"value":604},{"type":37,"tag":275,"props":5566,"children":5567},{"style":288},[5568],{"type":43,"value":750},{"type":37,"tag":275,"props":5570,"children":5572},{"class":277,"line":5571},25,[5573,5577,5581],{"type":37,"tag":275,"props":5574,"children":5575},{"style":595},[5576],{"type":43,"value":5403},{"type":37,"tag":275,"props":5578,"children":5579},{"style":601},[5580],{"type":43,"value":604},{"type":37,"tag":275,"props":5582,"children":5583},{"style":288},[5584],{"type":43,"value":5585},"\"Calendar year of the order date, in UTC.\"\n",{"type":37,"tag":275,"props":5587,"children":5589},{"class":277,"line":5588},26,[5590,5594,5598,5602],{"type":37,"tag":275,"props":5591,"children":5592},{"style":601},[5593],{"type":43,"value":647},{"type":37,"tag":275,"props":5595,"children":5596},{"style":595},[5597],{"type":43,"value":598},{"type":37,"tag":275,"props":5599,"children":5600},{"style":601},[5601],{"type":43,"value":604},{"type":37,"tag":275,"props":5603,"children":5604},{"style":288},[5605],{"type":43,"value":771},{"type":37,"tag":275,"props":5607,"children":5609},{"class":277,"line":5608},27,[5610,5614,5618],{"type":37,"tag":275,"props":5611,"children":5612},{"style":595},[5613],{"type":43,"value":668},{"type":37,"tag":275,"props":5615,"children":5616},{"style":601},[5617],{"type":43,"value":604},{"type":37,"tag":275,"props":5619,"children":5620},{"style":288},[5621],{"type":43,"value":788},{"type":37,"tag":275,"props":5623,"children":5625},{"class":277,"line":5624},28,[5626,5630,5634],{"type":37,"tag":275,"props":5627,"children":5628},{"style":595},[5629],{"type":43,"value":5403},{"type":37,"tag":275,"props":5631,"children":5632},{"style":601},[5633],{"type":43,"value":604},{"type":37,"tag":275,"props":5635,"children":5636},{"style":288},[5637],{"type":43,"value":5638},"\"Sum of order_line.gross_amount in USD, post-discount.\"\n",{"type":37,"tag":46,"props":5640,"children":5641},{},[5642],{"type":43,"value":5643},"This is what the agent will read before it queries. The richer this gets, the better its SQL gets.",{"type":37,"tag":492,"props":5645,"children":5646},{},[5647],{"type":37,"tag":46,"props":5648,"children":5649},{},[5650,5662,5664,5669,5671,5677],{"type":37,"tag":499,"props":5651,"children":5652},{},[5653,5655,5660],{"type":43,"value":5654},"Watch for incorrect ",{"type":37,"tag":52,"props":5656,"children":5658},{"className":5657},[],[5659],{"type":43,"value":5038},{"type":43,"value":5661}," checks.",{"type":43,"value":5663}," AI enhancement sometimes adds ",{"type":37,"tag":52,"props":5665,"children":5667},{"className":5666},[],[5668],{"type":43,"value":5038},{"type":43,"value":5670}," to columns that look like keys but aren't unique per row (e.g., ",{"type":37,"tag":52,"props":5672,"children":5674},{"className":5673},[],[5675],{"type":43,"value":5676},"segment_id",{"type":43,"value":5678}," in a yearly fact table appears once per year, not once total). Skim the generated checks and remove any that don't match how the data actually works.",{"type":37,"tag":137,"props":5680,"children":5682},{"id":5681},"_3-validate-the-whole-pipeline",[5683],{"type":43,"value":5684},"3. Validate the whole pipeline",{"type":37,"tag":265,"props":5686,"children":5687},{"className":267,"code":955,"language":269,"meta":7,"style":7},[5688],{"type":37,"tag":52,"props":5689,"children":5690},{"__ignoreMap":7},[5691],{"type":37,"tag":275,"props":5692,"children":5693},{"class":277,"line":278},[5694,5698,5702,5706,5710],{"type":37,"tag":275,"props":5695,"children":5696},{"style":282},[5697],{"type":43,"value":285},{"type":37,"tag":275,"props":5699,"children":5700},{"style":288},[5701],{"type":43,"value":971},{"type":37,"tag":275,"props":5703,"children":5704},{"style":299},[5705],{"type":43,"value":976},{"type":37,"tag":275,"props":5707,"children":5708},{"style":288},[5709],{"type":43,"value":316},{"type":37,"tag":275,"props":5711,"children":5712},{"style":288},[5713],{"type":43,"value":985},{"type":37,"tag":46,"props":5715,"children":5716},{},[5717],{"type":43,"value":3761},{"type":37,"tag":265,"props":5719,"children":5721},{"className":5720,"code":994,"language":43},[569],[5722],{"type":37,"tag":52,"props":5723,"children":5724},{"__ignoreMap":7},[5725],{"type":43,"value":994},{"type":37,"tag":46,"props":5727,"children":5728},{},[5729],{"type":43,"value":5730},"If anything fails, the message will name the file and the line. Open it, fix or regenerate that single asset, and re-run validate until it's green.",{"type":37,"tag":137,"props":5732,"children":5734},{"id":5733},"_4-wrap-it-in-a-regenerator-script-optional",[5735],{"type":43,"value":5736},"4. Wrap it in a regenerator script (optional)",{"type":37,"tag":46,"props":5738,"children":5739},{},[5740,5742,5752,5754,5760,5762,5768],{"type":43,"value":5741},"The whole sequence — config, import, filter, enhance, validate — is idempotent and worth wrapping in a script so you can refresh the context layer whenever your dbt models change. The reference project has ",{"type":37,"tag":2166,"props":5743,"children":5745},{"href":2118,"rel":5744},[2169],[5746],{"type":37,"tag":52,"props":5747,"children":5749},{"className":5748},[],[5750],{"type":43,"value":5751},"generate_context.sh",{"type":43,"value":5753}," with ",{"type":37,"tag":52,"props":5755,"children":5757},{"className":5756},[],[5758],{"type":43,"value":5759},"--skip-import",{"type":43,"value":5761}," (re-enhance only) and ",{"type":37,"tag":52,"props":5763,"children":5765},{"className":5764},[],[5766],{"type":43,"value":5767},"--skip-enhance",{"type":43,"value":5769}," (fast structure refresh) flags. A minimal version:",{"type":37,"tag":265,"props":5771,"children":5773},{"className":267,"code":5772,"language":269,"meta":7,"style":7},"#!/usr/bin/env bash\nset -euo pipefail\n\nCONFIG=\"context/.bruin.yml\"\nPIPELINE=\"context\"\n\nbruin import database \\\n  --config-file \"$CONFIG\" \\\n  --connection contoso_dbt_bq \\\n  --schemas contoso_dbt_raw \\\n  --schemas contoso_dbt_staging \\\n  --schemas contoso_dbt_reports \\\n  \"$PIPELINE\"\n\nfind \"$PIPELINE/assets\" -name \"_dlt_*.asset.yml\" -delete\n\nbruin ai enhance --claude \"$PIPELINE/assets\"\nbruin validate --config-file \"$CONFIG\" \"$PIPELINE\"\n",[5774],{"type":37,"tag":52,"props":5775,"children":5776},{"__ignoreMap":7},[5777,5785,5803,5810,5828,5845,5852,5871,5897,5912,5927,5942,5957,5975,5982,6014,6021,6053],{"type":37,"tag":275,"props":5778,"children":5779},{"class":277,"line":278},[5780],{"type":37,"tag":275,"props":5781,"children":5782},{"style":825},[5783],{"type":43,"value":5784},"#!/usr/bin/env bash\n",{"type":37,"tag":275,"props":5786,"children":5787},{"class":277,"line":305},[5788,5793,5798],{"type":37,"tag":275,"props":5789,"children":5790},{"style":299},[5791],{"type":43,"value":5792},"set",{"type":37,"tag":275,"props":5794,"children":5795},{"style":299},[5796],{"type":43,"value":5797}," -euo",{"type":37,"tag":275,"props":5799,"children":5800},{"style":288},[5801],{"type":43,"value":5802}," pipefail\n",{"type":37,"tag":275,"props":5804,"children":5805},{"class":277,"line":17},[5806],{"type":37,"tag":275,"props":5807,"children":5808},{"emptyLinePlaceholder":862},[5809],{"type":43,"value":865},{"type":37,"tag":275,"props":5811,"children":5812},{"class":277,"line":340},[5813,5818,5823],{"type":37,"tag":275,"props":5814,"children":5815},{"style":601},[5816],{"type":43,"value":5817},"CONFIG",{"type":37,"tag":275,"props":5819,"children":5820},{"style":2519},[5821],{"type":43,"value":5822},"=",{"type":37,"tag":275,"props":5824,"children":5825},{"style":288},[5826],{"type":43,"value":5827},"\"context/.bruin.yml\"\n",{"type":37,"tag":275,"props":5829,"children":5830},{"class":277,"line":11},[5831,5836,5840],{"type":37,"tag":275,"props":5832,"children":5833},{"style":601},[5834],{"type":43,"value":5835},"PIPELINE",{"type":37,"tag":275,"props":5837,"children":5838},{"style":2519},[5839],{"type":43,"value":5822},{"type":37,"tag":275,"props":5841,"children":5842},{"style":288},[5843],{"type":43,"value":5844},"\"context\"\n",{"type":37,"tag":275,"props":5846,"children":5847},{"class":277,"line":374},[5848],{"type":37,"tag":275,"props":5849,"children":5850},{"emptyLinePlaceholder":862},[5851],{"type":43,"value":865},{"type":37,"tag":275,"props":5853,"children":5854},{"class":277,"line":391},[5855,5859,5863,5867],{"type":37,"tag":275,"props":5856,"children":5857},{"style":282},[5858],{"type":43,"value":285},{"type":37,"tag":275,"props":5860,"children":5861},{"style":288},[5862],{"type":43,"value":291},{"type":37,"tag":275,"props":5864,"children":5865},{"style":288},[5866],{"type":43,"value":296},{"type":37,"tag":275,"props":5868,"children":5869},{"style":299},[5870],{"type":43,"value":302},{"type":37,"tag":275,"props":5872,"children":5873},{"class":277,"line":715},[5874,5878,5883,5888,5893],{"type":37,"tag":275,"props":5875,"children":5876},{"style":299},[5877],{"type":43,"value":311},{"type":37,"tag":275,"props":5879,"children":5880},{"style":288},[5881],{"type":43,"value":5882}," \"",{"type":37,"tag":275,"props":5884,"children":5885},{"style":601},[5886],{"type":43,"value":5887},"$CONFIG",{"type":37,"tag":275,"props":5889,"children":5890},{"style":288},[5891],{"type":43,"value":5892},"\"",{"type":37,"tag":275,"props":5894,"children":5895},{"style":299},[5896],{"type":43,"value":302},{"type":37,"tag":275,"props":5898,"children":5899},{"class":277,"line":736},[5900,5904,5908],{"type":37,"tag":275,"props":5901,"children":5902},{"style":299},[5903],{"type":43,"value":328},{"type":37,"tag":275,"props":5905,"children":5906},{"style":288},[5907],{"type":43,"value":333},{"type":37,"tag":275,"props":5909,"children":5910},{"style":299},[5911],{"type":43,"value":302},{"type":37,"tag":275,"props":5913,"children":5914},{"class":277,"line":753},[5915,5919,5923],{"type":37,"tag":275,"props":5916,"children":5917},{"style":299},[5918],{"type":43,"value":346},{"type":37,"tag":275,"props":5920,"children":5921},{"style":288},[5922],{"type":43,"value":351},{"type":37,"tag":275,"props":5924,"children":5925},{"style":299},[5926],{"type":43,"value":302},{"type":37,"tag":275,"props":5928,"children":5929},{"class":277,"line":774},[5930,5934,5938],{"type":37,"tag":275,"props":5931,"children":5932},{"style":299},[5933],{"type":43,"value":346},{"type":37,"tag":275,"props":5935,"children":5936},{"style":288},[5937],{"type":43,"value":367},{"type":37,"tag":275,"props":5939,"children":5940},{"style":299},[5941],{"type":43,"value":302},{"type":37,"tag":275,"props":5943,"children":5944},{"class":277,"line":5349},[5945,5949,5953],{"type":37,"tag":275,"props":5946,"children":5947},{"style":299},[5948],{"type":43,"value":346},{"type":37,"tag":275,"props":5950,"children":5951},{"style":288},[5952],{"type":43,"value":384},{"type":37,"tag":275,"props":5954,"children":5955},{"style":299},[5956],{"type":43,"value":302},{"type":37,"tag":275,"props":5958,"children":5959},{"class":277,"line":5361},[5960,5965,5970],{"type":37,"tag":275,"props":5961,"children":5962},{"style":288},[5963],{"type":43,"value":5964},"  \"",{"type":37,"tag":275,"props":5966,"children":5967},{"style":601},[5968],{"type":43,"value":5969},"$PIPELINE",{"type":37,"tag":275,"props":5971,"children":5972},{"style":288},[5973],{"type":43,"value":5974},"\"\n",{"type":37,"tag":275,"props":5976,"children":5977},{"class":277,"line":5381},[5978],{"type":37,"tag":275,"props":5979,"children":5980},{"emptyLinePlaceholder":862},[5981],{"type":43,"value":865},{"type":37,"tag":275,"props":5983,"children":5984},{"class":277,"line":5397},[5985,5989,5993,5997,6002,6006,6010],{"type":37,"tag":275,"props":5986,"children":5987},{"style":282},[5988],{"type":43,"value":836},{"type":37,"tag":275,"props":5990,"children":5991},{"style":288},[5992],{"type":43,"value":5882},{"type":37,"tag":275,"props":5994,"children":5995},{"style":601},[5996],{"type":43,"value":5969},{"type":37,"tag":275,"props":5998,"children":5999},{"style":288},[6000],{"type":43,"value":6001},"/assets\"",{"type":37,"tag":275,"props":6003,"children":6004},{"style":299},[6005],{"type":43,"value":846},{"type":37,"tag":275,"props":6007,"children":6008},{"style":288},[6009],{"type":43,"value":851},{"type":37,"tag":275,"props":6011,"children":6012},{"style":299},[6013],{"type":43,"value":856},{"type":37,"tag":275,"props":6015,"children":6016},{"class":277,"line":5415},[6017],{"type":37,"tag":275,"props":6018,"children":6019},{"emptyLinePlaceholder":862},[6020],{"type":43,"value":865},{"type":37,"tag":275,"props":6022,"children":6023},{"class":277,"line":5428},[6024,6028,6032,6036,6040,6044,6048],{"type":37,"tag":275,"props":6025,"children":6026},{"style":282},[6027],{"type":43,"value":285},{"type":37,"tag":275,"props":6029,"children":6030},{"style":288},[6031],{"type":43,"value":4937},{"type":37,"tag":275,"props":6033,"children":6034},{"style":288},[6035],{"type":43,"value":4942},{"type":37,"tag":275,"props":6037,"children":6038},{"style":299},[6039],{"type":43,"value":4947},{"type":37,"tag":275,"props":6041,"children":6042},{"style":288},[6043],{"type":43,"value":5882},{"type":37,"tag":275,"props":6045,"children":6046},{"style":601},[6047],{"type":43,"value":5969},{"type":37,"tag":275,"props":6049,"children":6050},{"style":288},[6051],{"type":43,"value":6052},"/assets\"\n",{"type":37,"tag":275,"props":6054,"children":6055},{"class":277,"line":5450},[6056,6060,6064,6068,6072,6076,6080,6084,6088],{"type":37,"tag":275,"props":6057,"children":6058},{"style":282},[6059],{"type":43,"value":285},{"type":37,"tag":275,"props":6061,"children":6062},{"style":288},[6063],{"type":43,"value":971},{"type":37,"tag":275,"props":6065,"children":6066},{"style":299},[6067],{"type":43,"value":976},{"type":37,"tag":275,"props":6069,"children":6070},{"style":288},[6071],{"type":43,"value":5882},{"type":37,"tag":275,"props":6073,"children":6074},{"style":601},[6075],{"type":43,"value":5887},{"type":37,"tag":275,"props":6077,"children":6078},{"style":288},[6079],{"type":43,"value":5892},{"type":37,"tag":275,"props":6081,"children":6082},{"style":288},[6083],{"type":43,"value":5882},{"type":37,"tag":275,"props":6085,"children":6086},{"style":601},[6087],{"type":43,"value":5969},{"type":37,"tag":275,"props":6089,"children":6090},{"style":288},[6091],{"type":43,"value":5974},{"type":37,"tag":46,"props":6093,"children":6094},{},[6095,6097,6102],{"type":43,"value":6096},"Save it as ",{"type":37,"tag":52,"props":6098,"children":6100},{"className":6099},[],[6101],{"type":43,"value":5751},{"type":43,"value":6103}," next to your dbt project. Run it after meaningful schema changes — column renames, new models, dropped tables — to keep the context layer in sync.",{"type":37,"tag":492,"props":6105,"children":6106},{},[6107],{"type":37,"tag":46,"props":6108,"children":6109},{},[6110,6115,6117,6123,6125,6131],{"type":37,"tag":499,"props":6111,"children":6112},{},[6113],{"type":43,"value":6114},"Don't hand-edit generated YAMLs.",{"type":43,"value":6116}," They're regenerable artifacts. If a description is consistently wrong, fix it upstream — in the dbt model's ",{"type":37,"tag":52,"props":6118,"children":6120},{"className":6119},[],[6121],{"type":43,"value":6122},"schema.yml",{"type":43,"value":6124}," or ",{"type":37,"tag":52,"props":6126,"children":6128},{"className":6127},[],[6129],{"type":43,"value":6130},"description: ",{"type":43,"value":6132}," block — and the next import + enhance will pick the change up.",{"type":37,"tag":38,"props":6134,"children":6135},{"id":1129},[6136],{"type":43,"value":1132},{"type":37,"tag":46,"props":6138,"children":6139},{},[6140,6142,6147,6149,6154],{"type":43,"value":6141},"Your ",{"type":37,"tag":52,"props":6143,"children":6145},{"className":6144},[],[6146],{"type":43,"value":96},{"type":43,"value":6148}," is now a 40-file knowledge base: every dbt-materialized table is documented with descriptions, tags, and checks that an AI agent can read before writing a single query. Combined with the warehouse connection from step 2, you have everything an agent needs ",{"type":37,"tag":116,"props":6150,"children":6151},{},[6152],{"type":43,"value":6153},"except",{"type":43,"value":6155}," the wiring that lets it actually call out to all of this. That's the next step.",{"type":37,"tag":1144,"props":6157,"children":6158},{},[6159],{"type":43,"value":1148},{"title":7,"searchDepth":305,"depth":305,"links":6161},[6162,6163,6164,6170],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":6165},[6166,6167,6168,6169],{"id":4910,"depth":17,"text":4913},{"id":5181,"depth":17,"text":5184},{"id":5681,"depth":17,"text":5684},{"id":5733,"depth":17,"text":5736},{"id":1129,"depth":305,"text":1132},"content:tutorials:dbt-bruin-analyst:enhance-and-validate.md","tutorials/dbt-bruin-analyst/enhance-and-validate.md","tutorials/dbt-bruin-analyst/enhance-and-validate",{"_path":6175,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":6176,"description":6177,"date":10,"readingTime":391,"category":12,"tags":6178,"difficulty":16,"module":5,"step":11,"variants":6183,"journeys":6184,"learnMore":6185,"stepGif":28,"author":6195,"body":6196,"_type":1162,"_id":7576,"_source":1164,"_file":7577,"_stem":7578,"_extension":1167},"/tutorials/dbt-bruin-analyst/wire-up-agent","Wire Up the AI Agent","Add Bruin MCP, point your agent at context/assets/, and use bruin query to run SQL with the same credentials your dbt project already uses.",[14,6179,15,6180,6181,6182],"MCP","Claude Code","Cursor","Codex",[6180,6181,6182],[19,20],[6186,6189,6192],{"label":6187,"url":6188},"Bruin MCP setup guide","https://getbruin.com/docs/bruin/getting-started/bruin-mcp.html",{"label":6190,"url":6191},"bruin query (docs)","https://getbruin.com/docs/bruin/commands/query.html",{"label":6193,"url":6194},"MCP best practices for AI agents","https://getbruin.com/docs/bruin/getting-started/bruin-mcp.html#best-practices-for-ai-agents",{"name":30,"role":31,"image":32},{"type":34,"children":6197,"toc":7561},[6198,6202,6241,6245,6257,6301,6306,6310,6316,6321,6647,6660,6672,6793,6805,6818,6851,7227,7233,7238,7254,7259,7303,7315,7321,7428,7434,7439,7522,7534,7538,7557],{"type":37,"tag":38,"props":6199,"children":6200},{"id":40},[6201],{"type":43,"value":44},{"type":37,"tag":4811,"props":6203,"children":6204},{},[6205,6210,6236],{"type":37,"tag":153,"props":6206,"children":6207},{},[6208],{"type":43,"value":6209},"Register Bruin MCP in your AI coding tool so the agent can ask Bruin \"how do I…?\" questions",{"type":37,"tag":153,"props":6211,"children":6212},{},[6213,6215,6221,6223,6228,6230],{"type":43,"value":6214},"Add an ",{"type":37,"tag":52,"props":6216,"children":6218},{"className":6217},[],[6219],{"type":43,"value":6220},"AGENTS.md",{"type":43,"value":6222}," at the repo root that points the agent at ",{"type":37,"tag":52,"props":6224,"children":6226},{"className":6225},[],[6227],{"type":43,"value":96},{"type":43,"value":6229}," and at ",{"type":37,"tag":52,"props":6231,"children":6233},{"className":6232},[],[6234],{"type":43,"value":6235},"bruin query",{"type":37,"tag":153,"props":6237,"children":6238},{},[6239],{"type":43,"value":6240},"Verify the loop end-to-end with a real business question",{"type":37,"tag":38,"props":6242,"children":6243},{"id":101},[6244],{"type":43,"value":104},{"type":37,"tag":46,"props":6246,"children":6247},{},[6248,6250,6255],{"type":43,"value":6249},"The context layer is half the equation. The agent also needs an ",{"type":37,"tag":499,"props":6251,"children":6252},{},[6253],{"type":43,"value":6254},"interface",{"type":43,"value":6256}," to use it:",{"type":37,"tag":149,"props":6258,"children":6259},{},[6260,6265,6277],{"type":37,"tag":153,"props":6261,"children":6262},{},[6263],{"type":43,"value":6264},"A way to learn how Bruin itself works (asset types, command flags) — that's what Bruin MCP gives you",{"type":37,"tag":153,"props":6266,"children":6267},{},[6268,6270,6275],{"type":43,"value":6269},"A way to actually run SQL against the warehouse — that's ",{"type":37,"tag":52,"props":6271,"children":6273},{"className":6272},[],[6274],{"type":43,"value":6235},{"type":43,"value":6276},", which uses the same connection you defined in step 2",{"type":37,"tag":153,"props":6278,"children":6279},{},[6280,6282,6287,6289,6294,6296],{"type":43,"value":6281},"A canonical workflow that tells the agent ",{"type":37,"tag":116,"props":6283,"children":6284},{},[6285],{"type":43,"value":6286},"which",{"type":43,"value":6288}," of the two to use, ",{"type":37,"tag":116,"props":6290,"children":6291},{},[6292],{"type":43,"value":6293},"when",{"type":43,"value":6295}," — that's ",{"type":37,"tag":52,"props":6297,"children":6299},{"className":6298},[],[6300],{"type":43,"value":6220},{"type":37,"tag":46,"props":6302,"children":6303},{},[6304],{"type":43,"value":6305},"Get all three in place and the agent stops guessing table names and starts citing the asset YAMLs you generated.",{"type":37,"tag":38,"props":6307,"children":6308},{"id":132},[6309],{"type":43,"value":135},{"type":37,"tag":137,"props":6311,"children":6313},{"id":6312},"_1-register-bruin-mcp-in-your-ai-tool",[6314],{"type":43,"value":6315},"1. Register Bruin MCP in your AI tool",{"type":37,"tag":46,"props":6317,"children":6318},{},[6319],{"type":43,"value":6320},"Pick the tab that matches the tool you're using. Bruin MCP is stateless — register it once per machine, not per project.",{"type":37,"tag":6322,"props":6323,"children":6325},"variant-tabs",{":variants":6324},"[{\"id\":\"claude-code\",\"label\":\"Claude Code\"},{\"id\":\"cursor\",\"label\":\"Cursor\"},{\"id\":\"codex\",\"label\":\"Codex\"}]",[6326,6416,6571],{"type":37,"tag":6327,"props":6328,"children":6329},"template",{"v-slot:claude-code":7},[6330,6335,6340,6384,6389],{"type":37,"tag":137,"props":6331,"children":6333},{"id":6332},"claude-code",[6334],{"type":43,"value":6180},{"type":37,"tag":46,"props":6336,"children":6337},{},[6338],{"type":43,"value":6339},"Run this once in your terminal:",{"type":37,"tag":265,"props":6341,"children":6343},{"className":267,"code":6342,"language":269,"meta":7,"style":7},"claude mcp add bruin -- bruin mcp\n",[6344],{"type":37,"tag":52,"props":6345,"children":6346},{"__ignoreMap":7},[6347],{"type":37,"tag":275,"props":6348,"children":6349},{"class":277,"line":278},[6350,6355,6360,6365,6370,6375,6379],{"type":37,"tag":275,"props":6351,"children":6352},{"style":282},[6353],{"type":43,"value":6354},"claude",{"type":37,"tag":275,"props":6356,"children":6357},{"style":288},[6358],{"type":43,"value":6359}," mcp",{"type":37,"tag":275,"props":6361,"children":6362},{"style":288},[6363],{"type":43,"value":6364}," add",{"type":37,"tag":275,"props":6366,"children":6367},{"style":288},[6368],{"type":43,"value":6369}," bruin",{"type":37,"tag":275,"props":6371,"children":6372},{"style":299},[6373],{"type":43,"value":6374}," --",{"type":37,"tag":275,"props":6376,"children":6377},{"style":288},[6378],{"type":43,"value":6369},{"type":37,"tag":275,"props":6380,"children":6381},{"style":288},[6382],{"type":43,"value":6383}," mcp\n",{"type":37,"tag":46,"props":6385,"children":6386},{},[6387],{"type":43,"value":6388},"Restart your Claude Code session — MCP servers are loaded at session start, so the change won't apply until you open a new one.",{"type":37,"tag":46,"props":6390,"children":6391},{},[6392,6394,6406,6408,6414],{"type":43,"value":6393},"To verify, ask Claude Code: ",{"type":37,"tag":116,"props":6395,"children":6396},{},[6397,6399,6404],{"type":43,"value":6398},"\"Use the Bruin MCP to list the available ",{"type":37,"tag":52,"props":6400,"children":6402},{"className":6401},[],[6403],{"type":43,"value":285},{"type":43,"value":6405}," commands.\"",{"type":43,"value":6407}," It should reply with a list pulled from ",{"type":37,"tag":52,"props":6409,"children":6411},{"className":6410},[],[6412],{"type":43,"value":6413},"bruin_get_overview",{"type":43,"value":6415}," rather than guessing.",{"type":37,"tag":6327,"props":6417,"children":6418},{"v-slot:cursor":7},[6419,6424,6464,6537,6545],{"type":37,"tag":137,"props":6420,"children":6422},{"id":6421},"cursor",[6423],{"type":43,"value":6181},{"type":37,"tag":4811,"props":6425,"children":6426},{},[6427,6439,6449,6459],{"type":37,"tag":153,"props":6428,"children":6429},{},[6430,6432,6437],{"type":43,"value":6431},"Open ",{"type":37,"tag":499,"props":6433,"children":6434},{},[6435],{"type":43,"value":6436},"Cursor Settings",{"type":43,"value":6438}," (Cmd/Ctrl + ,)",{"type":37,"tag":153,"props":6440,"children":6441},{},[6442,6444],{"type":43,"value":6443},"Navigate to ",{"type":37,"tag":499,"props":6445,"children":6446},{},[6447],{"type":43,"value":6448},"MCP & Integrations",{"type":37,"tag":153,"props":6450,"children":6451},{},[6452,6454],{"type":43,"value":6453},"Click ",{"type":37,"tag":499,"props":6455,"children":6456},{},[6457],{"type":43,"value":6458},"Add Custom MCP",{"type":37,"tag":153,"props":6460,"children":6461},{},[6462],{"type":43,"value":6463},"Paste:",{"type":37,"tag":265,"props":6465,"children":6469},{"className":6466,"code":6467,"language":6468,"meta":7,"style":7},"language-json shiki shiki-themes github-dark","{\n  \"mcpServers\": {\n    \"bruin\": {\n      \"command\": \"bruin\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n","json",[6470],{"type":37,"tag":52,"props":6471,"children":6472},{"__ignoreMap":7},[6473,6481,6489,6497,6505,6513,6521,6529],{"type":37,"tag":275,"props":6474,"children":6475},{"class":277,"line":278},[6476],{"type":37,"tag":275,"props":6477,"children":6478},{},[6479],{"type":43,"value":6480},"{\n",{"type":37,"tag":275,"props":6482,"children":6483},{"class":277,"line":305},[6484],{"type":37,"tag":275,"props":6485,"children":6486},{},[6487],{"type":43,"value":6488},"  \"mcpServers\": {\n",{"type":37,"tag":275,"props":6490,"children":6491},{"class":277,"line":17},[6492],{"type":37,"tag":275,"props":6493,"children":6494},{},[6495],{"type":43,"value":6496},"    \"bruin\": {\n",{"type":37,"tag":275,"props":6498,"children":6499},{"class":277,"line":340},[6500],{"type":37,"tag":275,"props":6501,"children":6502},{},[6503],{"type":43,"value":6504},"      \"command\": \"bruin\",\n",{"type":37,"tag":275,"props":6506,"children":6507},{"class":277,"line":11},[6508],{"type":37,"tag":275,"props":6509,"children":6510},{},[6511],{"type":43,"value":6512},"      \"args\": [\"mcp\"]\n",{"type":37,"tag":275,"props":6514,"children":6515},{"class":277,"line":374},[6516],{"type":37,"tag":275,"props":6517,"children":6518},{},[6519],{"type":43,"value":6520},"    }\n",{"type":37,"tag":275,"props":6522,"children":6523},{"class":277,"line":391},[6524],{"type":37,"tag":275,"props":6525,"children":6526},{},[6527],{"type":43,"value":6528},"  }\n",{"type":37,"tag":275,"props":6530,"children":6531},{"class":277,"line":715},[6532],{"type":37,"tag":275,"props":6533,"children":6534},{},[6535],{"type":43,"value":6536},"}\n",{"type":37,"tag":4811,"props":6538,"children":6539},{"start":11},[6540],{"type":37,"tag":153,"props":6541,"children":6542},{},[6543],{"type":43,"value":6544},"Restart Cursor.",{"type":37,"tag":46,"props":6546,"children":6547},{},[6548,6550,6562,6564,6570],{"type":43,"value":6549},"To verify, ask Cursor's chat: ",{"type":37,"tag":116,"props":6551,"children":6552},{},[6553,6555,6560],{"type":43,"value":6554},"\"Use the Bruin MCP to fetch the docs for ",{"type":37,"tag":52,"props":6556,"children":6558},{"className":6557},[],[6559],{"type":43,"value":57},{"type":43,"value":6561},".\"",{"type":43,"value":6563}," It should pull the doc page via ",{"type":37,"tag":52,"props":6565,"children":6567},{"className":6566},[],[6568],{"type":43,"value":6569},"bruin_get_doc_content",{"type":43,"value":98},{"type":37,"tag":6327,"props":6572,"children":6573},{"v-slot:codex":7},[6574,6579,6591,6624,6629],{"type":37,"tag":137,"props":6575,"children":6577},{"id":6576},"codex",[6578],{"type":43,"value":6182},{"type":37,"tag":46,"props":6580,"children":6581},{},[6582,6584,6590],{"type":43,"value":6583},"Add this to ",{"type":37,"tag":52,"props":6585,"children":6587},{"className":6586},[],[6588],{"type":43,"value":6589},"~/.codex/config.toml",{"type":43,"value":812},{"type":37,"tag":265,"props":6592,"children":6596},{"className":6593,"code":6594,"language":6595,"meta":7,"style":7},"language-toml shiki shiki-themes github-dark","[mcp_servers.bruin]\ncommand = \"bruin\"\nargs = [\"mcp\"]\n","toml",[6597],{"type":37,"tag":52,"props":6598,"children":6599},{"__ignoreMap":7},[6600,6608,6616],{"type":37,"tag":275,"props":6601,"children":6602},{"class":277,"line":278},[6603],{"type":37,"tag":275,"props":6604,"children":6605},{},[6606],{"type":43,"value":6607},"[mcp_servers.bruin]\n",{"type":37,"tag":275,"props":6609,"children":6610},{"class":277,"line":305},[6611],{"type":37,"tag":275,"props":6612,"children":6613},{},[6614],{"type":43,"value":6615},"command = \"bruin\"\n",{"type":37,"tag":275,"props":6617,"children":6618},{"class":277,"line":17},[6619],{"type":37,"tag":275,"props":6620,"children":6621},{},[6622],{"type":43,"value":6623},"args = [\"mcp\"]\n",{"type":37,"tag":46,"props":6625,"children":6626},{},[6627],{"type":43,"value":6628},"Restart Codex.",{"type":37,"tag":46,"props":6630,"children":6631},{},[6632,6634,6639,6641,6646],{"type":43,"value":6633},"To verify, ask Codex: ",{"type":37,"tag":116,"props":6635,"children":6636},{},[6637],{"type":43,"value":6638},"\"Use Bruin MCP to list connection types Bruin supports.\"",{"type":43,"value":6640}," It should return the list from ",{"type":37,"tag":52,"props":6642,"children":6644},{"className":6643},[],[6645],{"type":43,"value":6569},{"type":43,"value":98},{"type":37,"tag":137,"props":6648,"children":6650},{"id":6649},"_2-confirm-bruin-query-works-as-the-agent-will-use-it",[6651,6653,6658],{"type":43,"value":6652},"2. Confirm ",{"type":37,"tag":52,"props":6654,"children":6656},{"className":6655},[],[6657],{"type":43,"value":6235},{"type":43,"value":6659}," works as the agent will use it",{"type":37,"tag":46,"props":6661,"children":6662},{},[6663,6665,6670],{"type":43,"value":6664},"Run a sanity-check query against your warehouse using the ",{"type":37,"tag":499,"props":6666,"children":6667},{},[6668],{"type":43,"value":6669},"scoped config",{"type":43,"value":6671},", exactly the way the agent will:",{"type":37,"tag":265,"props":6673,"children":6675},{"className":267,"code":6674,"language":269,"meta":7,"style":7},"bruin query \\\n  --config-file context/.bruin.yml \\\n  --connection contoso_dbt_bq \\\n  --query \"SELECT category_name, SUM(revenue_usd) AS rev\n           FROM \\`bruin-playground-arsalan.contoso_dbt_reports.rpt_revenue_by_segment\\`\n           WHERE year = 2024\n           GROUP BY 1\n           ORDER BY rev DESC\n           LIMIT 10\"\n",[6676],{"type":37,"tag":52,"props":6677,"children":6678},{"__ignoreMap":7},[6679,6695,6710,6725,6738,6761,6769,6777,6785],{"type":37,"tag":275,"props":6680,"children":6681},{"class":277,"line":278},[6682,6686,6691],{"type":37,"tag":275,"props":6683,"children":6684},{"style":282},[6685],{"type":43,"value":285},{"type":37,"tag":275,"props":6687,"children":6688},{"style":288},[6689],{"type":43,"value":6690}," query",{"type":37,"tag":275,"props":6692,"children":6693},{"style":299},[6694],{"type":43,"value":302},{"type":37,"tag":275,"props":6696,"children":6697},{"class":277,"line":305},[6698,6702,6706],{"type":37,"tag":275,"props":6699,"children":6700},{"style":299},[6701],{"type":43,"value":311},{"type":37,"tag":275,"props":6703,"children":6704},{"style":288},[6705],{"type":43,"value":316},{"type":37,"tag":275,"props":6707,"children":6708},{"style":299},[6709],{"type":43,"value":302},{"type":37,"tag":275,"props":6711,"children":6712},{"class":277,"line":17},[6713,6717,6721],{"type":37,"tag":275,"props":6714,"children":6715},{"style":299},[6716],{"type":43,"value":328},{"type":37,"tag":275,"props":6718,"children":6719},{"style":288},[6720],{"type":43,"value":333},{"type":37,"tag":275,"props":6722,"children":6723},{"style":299},[6724],{"type":43,"value":302},{"type":37,"tag":275,"props":6726,"children":6727},{"class":277,"line":340},[6728,6733],{"type":37,"tag":275,"props":6729,"children":6730},{"style":299},[6731],{"type":43,"value":6732},"  --query",{"type":37,"tag":275,"props":6734,"children":6735},{"style":288},[6736],{"type":43,"value":6737}," \"SELECT category_name, SUM(revenue_usd) AS rev\n",{"type":37,"tag":275,"props":6739,"children":6740},{"class":277,"line":11},[6741,6746,6751,6756],{"type":37,"tag":275,"props":6742,"children":6743},{"style":288},[6744],{"type":43,"value":6745},"           FROM ",{"type":37,"tag":275,"props":6747,"children":6748},{"style":299},[6749],{"type":43,"value":6750},"\\`",{"type":37,"tag":275,"props":6752,"children":6753},{"style":288},[6754],{"type":43,"value":6755},"bruin-playground-arsalan.contoso_dbt_reports.rpt_revenue_by_segment",{"type":37,"tag":275,"props":6757,"children":6758},{"style":299},[6759],{"type":43,"value":6760},"\\`\n",{"type":37,"tag":275,"props":6762,"children":6763},{"class":277,"line":374},[6764],{"type":37,"tag":275,"props":6765,"children":6766},{"style":288},[6767],{"type":43,"value":6768},"           WHERE year = 2024\n",{"type":37,"tag":275,"props":6770,"children":6771},{"class":277,"line":391},[6772],{"type":37,"tag":275,"props":6773,"children":6774},{"style":288},[6775],{"type":43,"value":6776},"           GROUP BY 1\n",{"type":37,"tag":275,"props":6778,"children":6779},{"class":277,"line":715},[6780],{"type":37,"tag":275,"props":6781,"children":6782},{"style":288},[6783],{"type":43,"value":6784},"           ORDER BY rev DESC\n",{"type":37,"tag":275,"props":6786,"children":6787},{"class":277,"line":736},[6788],{"type":37,"tag":275,"props":6789,"children":6790},{"style":288},[6791],{"type":43,"value":6792},"           LIMIT 10\"\n",{"type":37,"tag":46,"props":6794,"children":6795},{},[6796,6798,6803],{"type":43,"value":6797},"You should get a small result table back. Because the connection uses Application Default Credentials, no keyfiles change hands — the agent runs SQL as your ",{"type":37,"tag":52,"props":6799,"children":6801},{"className":6800},[],[6802],{"type":43,"value":2279},{"type":43,"value":6804}," identity.",{"type":37,"tag":137,"props":6806,"children":6808},{"id":6807},"_3-add-an-agentsmd-at-the-repo-root",[6809,6811,6816],{"type":43,"value":6810},"3. Add an ",{"type":37,"tag":52,"props":6812,"children":6814},{"className":6813},[],[6815],{"type":43,"value":6220},{"type":43,"value":6817}," at the repo root",{"type":37,"tag":46,"props":6819,"children":6820},{},[6821,6823,6828,6830,6835,6837,6842,6844,6849],{"type":43,"value":6822},"Create ",{"type":37,"tag":52,"props":6824,"children":6826},{"className":6825},[],[6827],{"type":43,"value":6220},{"type":43,"value":6829}," next to ",{"type":37,"tag":52,"props":6831,"children":6833},{"className":6832},[],[6834],{"type":43,"value":210},{"type":43,"value":6836}," (the ",{"type":37,"tag":499,"props":6838,"children":6839},{},[6840],{"type":43,"value":6841},"repo root",{"type":43,"value":6843},", not inside ",{"type":37,"tag":52,"props":6845,"children":6847},{"className":6846},[],[6848],{"type":43,"value":253},{"type":43,"value":6850},"). AI coding tools auto-load this file at session start, so it's the canonical place for \"how to use this project\". Adapt the paths and connection name to your setup:",{"type":37,"tag":265,"props":6852,"children":6855},{"className":6853,"code":6854,"language":1162,"meta":7,"style":7},"language-markdown shiki shiki-themes github-dark","# AGENTS.md\n\nThis repo contains a dbt project plus a Bruin context layer documenting the\nwarehouse it builds. Use this guide before reading code or running queries.\n\n## Canonical workflow\n\n1. **Read context first.** Before querying, open the relevant\n   `context/assets/\u003Cschema>/\u003Ctable>.asset.yml`. It has the description, grain,\n   column docs, and quality checks for that table — written from real samples.\n2. **Use Bruin MCP for tooling questions.** Anything like \"how does\n   `bruin import` work?\" or \"what asset types exist?\" — call the MCP server,\n   don't guess from training data.\n3. **Use `bruin query` for SQL.** Always pass `--config-file context/.bruin.yml`\n   so the scoped connection is used.\n4. **Cite the asset(s) you read.** When answering, reference the\n   `context/assets/...asset.yml` files you used.\n\n## Data access\n\n- Connection name: `contoso_dbt_bq`\n- Auth: Application Default Credentials (inherits `gcloud auth application-default login`)\n- This is **read-only.** Never INSERT, UPDATE, DELETE, MERGE, or DROP.\n- Always show the SQL before executing it.\n- Use `LIMIT 100` (or smaller) when exploring an unfamiliar table.\n\n## Layout\n\n- `models/` — dbt models. Don't run `dbt` for analysis questions; the\n  warehouse is already built. Read these only when asked about transformation logic.\n- `context/assets/contoso_dbt_raw/` — raw dlt-loaded tables (lowest level).\n- `context/assets/contoso_dbt_staging/` — `stg_*` cleaned/typed views.\n- `context/assets/contoso_dbt_reports/` — `rpt_*` mart-level reports.\n  Prefer these for business questions; staging is for ad-hoc deep dives.\n\n## Things to avoid\n\n- **Don't hand-edit `context/assets/*.asset.yml`.** They're regenerated by\n  `generate_context.sh`. Improve descriptions in the dbt model's `schema.yml`\n  upstream and re-run the generator.\n- **Don't mix configs across pipelines.** This project's connection lives in\n  `context/.bruin.yml`; other Bruin pipelines in the repo have their own.\n  Always use `--config-file`.\n- **Don't trust row counts in descriptions.** They're snapshot-time and may\n  be stale. If a question hinges on exact size, run `SELECT COUNT(*)` yourself.\n",[6856],{"type":37,"tag":52,"props":6857,"children":6858},{"__ignoreMap":7},[6859,6867,6874,6882,6890,6897,6905,6912,6920,6928,6936,6944,6952,6960,6968,6976,6984,6992,6999,7007,7014,7022,7030,7038,7046,7054,7061,7069,7076,7085,7094,7103,7112,7121,7130,7138,7147,7155,7164,7173,7182,7191,7200,7209,7218],{"type":37,"tag":275,"props":6860,"children":6861},{"class":277,"line":278},[6862],{"type":37,"tag":275,"props":6863,"children":6864},{},[6865],{"type":43,"value":6866},"# AGENTS.md\n",{"type":37,"tag":275,"props":6868,"children":6869},{"class":277,"line":305},[6870],{"type":37,"tag":275,"props":6871,"children":6872},{"emptyLinePlaceholder":862},[6873],{"type":43,"value":865},{"type":37,"tag":275,"props":6875,"children":6876},{"class":277,"line":17},[6877],{"type":37,"tag":275,"props":6878,"children":6879},{},[6880],{"type":43,"value":6881},"This repo contains a dbt project plus a Bruin context layer documenting the\n",{"type":37,"tag":275,"props":6883,"children":6884},{"class":277,"line":340},[6885],{"type":37,"tag":275,"props":6886,"children":6887},{},[6888],{"type":43,"value":6889},"warehouse it builds. Use this guide before reading code or running queries.\n",{"type":37,"tag":275,"props":6891,"children":6892},{"class":277,"line":11},[6893],{"type":37,"tag":275,"props":6894,"children":6895},{"emptyLinePlaceholder":862},[6896],{"type":43,"value":865},{"type":37,"tag":275,"props":6898,"children":6899},{"class":277,"line":374},[6900],{"type":37,"tag":275,"props":6901,"children":6902},{},[6903],{"type":43,"value":6904},"## Canonical workflow\n",{"type":37,"tag":275,"props":6906,"children":6907},{"class":277,"line":391},[6908],{"type":37,"tag":275,"props":6909,"children":6910},{"emptyLinePlaceholder":862},[6911],{"type":43,"value":865},{"type":37,"tag":275,"props":6913,"children":6914},{"class":277,"line":715},[6915],{"type":37,"tag":275,"props":6916,"children":6917},{},[6918],{"type":43,"value":6919},"1. **Read context first.** Before querying, open the relevant\n",{"type":37,"tag":275,"props":6921,"children":6922},{"class":277,"line":736},[6923],{"type":37,"tag":275,"props":6924,"children":6925},{},[6926],{"type":43,"value":6927},"   `context/assets/\u003Cschema>/\u003Ctable>.asset.yml`. It has the description, grain,\n",{"type":37,"tag":275,"props":6929,"children":6930},{"class":277,"line":753},[6931],{"type":37,"tag":275,"props":6932,"children":6933},{},[6934],{"type":43,"value":6935},"   column docs, and quality checks for that table — written from real samples.\n",{"type":37,"tag":275,"props":6937,"children":6938},{"class":277,"line":774},[6939],{"type":37,"tag":275,"props":6940,"children":6941},{},[6942],{"type":43,"value":6943},"2. **Use Bruin MCP for tooling questions.** Anything like \"how does\n",{"type":37,"tag":275,"props":6945,"children":6946},{"class":277,"line":5349},[6947],{"type":37,"tag":275,"props":6948,"children":6949},{},[6950],{"type":43,"value":6951},"   `bruin import` work?\" or \"what asset types exist?\" — call the MCP server,\n",{"type":37,"tag":275,"props":6953,"children":6954},{"class":277,"line":5361},[6955],{"type":37,"tag":275,"props":6956,"children":6957},{},[6958],{"type":43,"value":6959},"   don't guess from training data.\n",{"type":37,"tag":275,"props":6961,"children":6962},{"class":277,"line":5381},[6963],{"type":37,"tag":275,"props":6964,"children":6965},{},[6966],{"type":43,"value":6967},"3. **Use `bruin query` for SQL.** Always pass `--config-file context/.bruin.yml`\n",{"type":37,"tag":275,"props":6969,"children":6970},{"class":277,"line":5397},[6971],{"type":37,"tag":275,"props":6972,"children":6973},{},[6974],{"type":43,"value":6975},"   so the scoped connection is used.\n",{"type":37,"tag":275,"props":6977,"children":6978},{"class":277,"line":5415},[6979],{"type":37,"tag":275,"props":6980,"children":6981},{},[6982],{"type":43,"value":6983},"4. **Cite the asset(s) you read.** When answering, reference the\n",{"type":37,"tag":275,"props":6985,"children":6986},{"class":277,"line":5428},[6987],{"type":37,"tag":275,"props":6988,"children":6989},{},[6990],{"type":43,"value":6991},"   `context/assets/...asset.yml` files you used.\n",{"type":37,"tag":275,"props":6993,"children":6994},{"class":277,"line":5450},[6995],{"type":37,"tag":275,"props":6996,"children":6997},{"emptyLinePlaceholder":862},[6998],{"type":43,"value":865},{"type":37,"tag":275,"props":7000,"children":7001},{"class":277,"line":5470},[7002],{"type":37,"tag":275,"props":7003,"children":7004},{},[7005],{"type":43,"value":7006},"## Data access\n",{"type":37,"tag":275,"props":7008,"children":7009},{"class":277,"line":5486},[7010],{"type":37,"tag":275,"props":7011,"children":7012},{"emptyLinePlaceholder":862},[7013],{"type":43,"value":865},{"type":37,"tag":275,"props":7015,"children":7016},{"class":277,"line":5503},[7017],{"type":37,"tag":275,"props":7018,"children":7019},{},[7020],{"type":43,"value":7021},"- Connection name: `contoso_dbt_bq`\n",{"type":37,"tag":275,"props":7023,"children":7024},{"class":277,"line":5515},[7025],{"type":37,"tag":275,"props":7026,"children":7027},{},[7028],{"type":43,"value":7029},"- Auth: Application Default Credentials (inherits `gcloud auth application-default login`)\n",{"type":37,"tag":275,"props":7031,"children":7032},{"class":277,"line":5535},[7033],{"type":37,"tag":275,"props":7034,"children":7035},{},[7036],{"type":43,"value":7037},"- This is **read-only.** Never INSERT, UPDATE, DELETE, MERGE, or DROP.\n",{"type":37,"tag":275,"props":7039,"children":7040},{"class":277,"line":5555},[7041],{"type":37,"tag":275,"props":7042,"children":7043},{},[7044],{"type":43,"value":7045},"- Always show the SQL before executing it.\n",{"type":37,"tag":275,"props":7047,"children":7048},{"class":277,"line":5571},[7049],{"type":37,"tag":275,"props":7050,"children":7051},{},[7052],{"type":43,"value":7053},"- Use `LIMIT 100` (or smaller) when exploring an unfamiliar table.\n",{"type":37,"tag":275,"props":7055,"children":7056},{"class":277,"line":5588},[7057],{"type":37,"tag":275,"props":7058,"children":7059},{"emptyLinePlaceholder":862},[7060],{"type":43,"value":865},{"type":37,"tag":275,"props":7062,"children":7063},{"class":277,"line":5608},[7064],{"type":37,"tag":275,"props":7065,"children":7066},{},[7067],{"type":43,"value":7068},"## Layout\n",{"type":37,"tag":275,"props":7070,"children":7071},{"class":277,"line":5624},[7072],{"type":37,"tag":275,"props":7073,"children":7074},{"emptyLinePlaceholder":862},[7075],{"type":43,"value":865},{"type":37,"tag":275,"props":7077,"children":7079},{"class":277,"line":7078},29,[7080],{"type":37,"tag":275,"props":7081,"children":7082},{},[7083],{"type":43,"value":7084},"- `models/` — dbt models. Don't run `dbt` for analysis questions; the\n",{"type":37,"tag":275,"props":7086,"children":7088},{"class":277,"line":7087},30,[7089],{"type":37,"tag":275,"props":7090,"children":7091},{},[7092],{"type":43,"value":7093},"  warehouse is already built. Read these only when asked about transformation logic.\n",{"type":37,"tag":275,"props":7095,"children":7097},{"class":277,"line":7096},31,[7098],{"type":37,"tag":275,"props":7099,"children":7100},{},[7101],{"type":43,"value":7102},"- `context/assets/contoso_dbt_raw/` — raw dlt-loaded tables (lowest level).\n",{"type":37,"tag":275,"props":7104,"children":7106},{"class":277,"line":7105},32,[7107],{"type":37,"tag":275,"props":7108,"children":7109},{},[7110],{"type":43,"value":7111},"- `context/assets/contoso_dbt_staging/` — `stg_*` cleaned/typed views.\n",{"type":37,"tag":275,"props":7113,"children":7115},{"class":277,"line":7114},33,[7116],{"type":37,"tag":275,"props":7117,"children":7118},{},[7119],{"type":43,"value":7120},"- `context/assets/contoso_dbt_reports/` — `rpt_*` mart-level reports.\n",{"type":37,"tag":275,"props":7122,"children":7124},{"class":277,"line":7123},34,[7125],{"type":37,"tag":275,"props":7126,"children":7127},{},[7128],{"type":43,"value":7129},"  Prefer these for business questions; staging is for ad-hoc deep dives.\n",{"type":37,"tag":275,"props":7131,"children":7133},{"class":277,"line":7132},35,[7134],{"type":37,"tag":275,"props":7135,"children":7136},{"emptyLinePlaceholder":862},[7137],{"type":43,"value":865},{"type":37,"tag":275,"props":7139,"children":7141},{"class":277,"line":7140},36,[7142],{"type":37,"tag":275,"props":7143,"children":7144},{},[7145],{"type":43,"value":7146},"## Things to avoid\n",{"type":37,"tag":275,"props":7148,"children":7150},{"class":277,"line":7149},37,[7151],{"type":37,"tag":275,"props":7152,"children":7153},{"emptyLinePlaceholder":862},[7154],{"type":43,"value":865},{"type":37,"tag":275,"props":7156,"children":7158},{"class":277,"line":7157},38,[7159],{"type":37,"tag":275,"props":7160,"children":7161},{},[7162],{"type":43,"value":7163},"- **Don't hand-edit `context/assets/*.asset.yml`.** They're regenerated by\n",{"type":37,"tag":275,"props":7165,"children":7167},{"class":277,"line":7166},39,[7168],{"type":37,"tag":275,"props":7169,"children":7170},{},[7171],{"type":43,"value":7172},"  `generate_context.sh`. Improve descriptions in the dbt model's `schema.yml`\n",{"type":37,"tag":275,"props":7174,"children":7176},{"class":277,"line":7175},40,[7177],{"type":37,"tag":275,"props":7178,"children":7179},{},[7180],{"type":43,"value":7181},"  upstream and re-run the generator.\n",{"type":37,"tag":275,"props":7183,"children":7185},{"class":277,"line":7184},41,[7186],{"type":37,"tag":275,"props":7187,"children":7188},{},[7189],{"type":43,"value":7190},"- **Don't mix configs across pipelines.** This project's connection lives in\n",{"type":37,"tag":275,"props":7192,"children":7194},{"class":277,"line":7193},42,[7195],{"type":37,"tag":275,"props":7196,"children":7197},{},[7198],{"type":43,"value":7199},"  `context/.bruin.yml`; other Bruin pipelines in the repo have their own.\n",{"type":37,"tag":275,"props":7201,"children":7203},{"class":277,"line":7202},43,[7204],{"type":37,"tag":275,"props":7205,"children":7206},{},[7207],{"type":43,"value":7208},"  Always use `--config-file`.\n",{"type":37,"tag":275,"props":7210,"children":7212},{"class":277,"line":7211},44,[7213],{"type":37,"tag":275,"props":7214,"children":7215},{},[7216],{"type":43,"value":7217},"- **Don't trust row counts in descriptions.** They're snapshot-time and may\n",{"type":37,"tag":275,"props":7219,"children":7221},{"class":277,"line":7220},45,[7222],{"type":37,"tag":275,"props":7223,"children":7224},{},[7225],{"type":43,"value":7226},"  be stale. If a question hinges on exact size, run `SELECT COUNT(*)` yourself.\n",{"type":37,"tag":137,"props":7228,"children":7230},{"id":7229},"_4-try-the-loop-end-to-end",[7231],{"type":43,"value":7232},"4. Try the loop end-to-end",{"type":37,"tag":46,"props":7234,"children":7235},{},[7236],{"type":43,"value":7237},"Open your AI tool in this repo and ask a real question, e.g.:",{"type":37,"tag":492,"props":7239,"children":7240},{},[7241],{"type":37,"tag":46,"props":7242,"children":7243},{},[7244,7246,7252],{"type":43,"value":7245},"\"Which retail categories had the largest year-over-year revenue change in 2024 vs. 2023? Show me your SQL before running it, and cite which ",{"type":37,"tag":52,"props":7247,"children":7249},{"className":7248},[],[7250],{"type":43,"value":7251},"context/assets/...",{"type":43,"value":7253}," files you used.\"",{"type":37,"tag":46,"props":7255,"children":7256},{},[7257],{"type":43,"value":7258},"A correctly-wired agent will:",{"type":37,"tag":4811,"props":7260,"children":7261},{},[7262,7274,7287,7298],{"type":37,"tag":153,"props":7263,"children":7264},{},[7265,7266,7272],{"type":43,"value":6431},{"type":37,"tag":52,"props":7267,"children":7269},{"className":7268},[],[7270],{"type":43,"value":7271},"context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml",{"type":43,"value":7273}," and confirm the grain",{"type":37,"tag":153,"props":7275,"children":7276},{},[7277,7279,7285],{"type":43,"value":7278},"Draft a SQL query against ",{"type":37,"tag":52,"props":7280,"children":7282},{"className":7281},[],[7283],{"type":43,"value":7284},"contoso_dbt_reports.rpt_revenue_by_segment",{"type":43,"value":7286}," filtered by year",{"type":37,"tag":153,"props":7288,"children":7289},{},[7290,7292],{"type":43,"value":7291},"Show the SQL, wait for a go-ahead, then run ",{"type":37,"tag":52,"props":7293,"children":7295},{"className":7294},[],[7296],{"type":43,"value":7297},"bruin query --config-file context/.bruin.yml --connection contoso_dbt_bq --query \"...\"",{"type":37,"tag":153,"props":7299,"children":7300},{},[7301],{"type":43,"value":7302},"Cite the asset YAML it read",{"type":37,"tag":46,"props":7304,"children":7305},{},[7306,7308,7313],{"type":43,"value":7307},"If it skips step 1 (reading the asset), tighten ",{"type":37,"tag":52,"props":7309,"children":7311},{"className":7310},[],[7312],{"type":43,"value":6220},{"type":43,"value":7314}," — the canonical workflow section is what enforces this behavior.",{"type":37,"tag":38,"props":7316,"children":7318},{"id":7317},"lessons-learned",[7319],{"type":43,"value":7320},"Lessons learned",{"type":37,"tag":149,"props":7322,"children":7323},{},[7324,7346,7356,7372,7395,7412],{"type":37,"tag":153,"props":7325,"children":7326},{},[7327,7338,7340,7345],{"type":37,"tag":499,"props":7328,"children":7329},{},[7330,7332,7337],{"type":43,"value":7331},"Isolate ",{"type":37,"tag":52,"props":7333,"children":7335},{"className":7334},[],[7336],{"type":43,"value":1037},{"type":43,"value":98},{"type":43,"value":7339}," A broken sibling connection breaks every command. Always ",{"type":37,"tag":52,"props":7341,"children":7343},{"className":7342},[],[7344],{"type":43,"value":1029},{"type":43,"value":3810},{"type":37,"tag":153,"props":7347,"children":7348},{},[7349,7354],{"type":37,"tag":499,"props":7350,"children":7351},{},[7352],{"type":43,"value":7353},"ADC > keyfiles",{"type":43,"value":7355}," for agent workflows. No secrets to rotate, no files to gitignore, and the agent runs as the human's identity.",{"type":37,"tag":153,"props":7357,"children":7358},{},[7359,7364,7366,7371],{"type":37,"tag":499,"props":7360,"children":7361},{},[7362],{"type":43,"value":7363},"Filter loader-internal tables before enhance",{"type":43,"value":7365}," — otherwise Claude burns time describing ",{"type":37,"tag":52,"props":7367,"children":7369},{"className":7368},[],[7370],{"type":43,"value":810},{"type":43,"value":98},{"type":37,"tag":153,"props":7373,"children":7374},{},[7375,7393],{"type":37,"tag":499,"props":7376,"children":7377},{},[7378,7380,7385,7387,7392],{"type":43,"value":7379},"Always ",{"type":37,"tag":52,"props":7381,"children":7383},{"className":7382},[],[7384],{"type":43,"value":3706},{"type":43,"value":7386}," after ",{"type":37,"tag":52,"props":7388,"children":7390},{"className":7389},[],[7391],{"type":43,"value":4894},{"type":43,"value":98},{"type":43,"value":7394}," Cheap insurance against rare YAML corruption.",{"type":37,"tag":153,"props":7396,"children":7397},{},[7398,7410],{"type":37,"tag":499,"props":7399,"children":7400},{},[7401,7403,7408],{"type":43,"value":7402},"Re-run ",{"type":37,"tag":52,"props":7404,"children":7406},{"className":7405},[],[7407],{"type":43,"value":5751},{"type":43,"value":7409}," after schema changes.",{"type":43,"value":7411}," Descriptions are snapshot-time; a column rename without regeneration leaves the agent quietly wrong.",{"type":37,"tag":153,"props":7413,"children":7414},{},[7415,7419,7421,7426],{"type":37,"tag":499,"props":7416,"children":7417},{},[7418],{"type":43,"value":6114},{"type":43,"value":7420}," Improve them upstream in the dbt model's ",{"type":37,"tag":52,"props":7422,"children":7424},{"className":7423},[],[7425],{"type":43,"value":6122},{"type":43,"value":7427}," so the next import + enhance picks the change up.",{"type":37,"tag":38,"props":7429,"children":7431},{"id":7430},"adapting-this-to-a-different-dbt-project",[7432],{"type":43,"value":7433},"Adapting this to a different dbt project",{"type":37,"tag":46,"props":7435,"children":7436},{},[7437],{"type":43,"value":7438},"The minimal recipe for any existing dbt + warehouse setup:",{"type":37,"tag":4811,"props":7440,"children":7441},{},[7442,7451,7468,7477,7482,7491,7500],{"type":37,"tag":153,"props":7443,"children":7444},{},[7445],{"type":37,"tag":52,"props":7446,"children":7448},{"className":7447},[],[7449],{"type":43,"value":7450},"mkdir -p context/assets",{"type":37,"tag":153,"props":7452,"children":7453},{},[7454,7456,7461,7463],{"type":43,"value":7455},"Write ",{"type":37,"tag":52,"props":7457,"children":7459},{"className":7458},[],[7460],{"type":43,"value":2803},{"type":43,"value":7462}," (scoped) and ",{"type":37,"tag":52,"props":7464,"children":7466},{"className":7465},[],[7467],{"type":43,"value":2810},{"type":37,"tag":153,"props":7469,"children":7470},{},[7471],{"type":37,"tag":52,"props":7472,"children":7474},{"className":7473},[],[7475],{"type":43,"value":7476},"bruin import database --schemas \u003Cyours...> context",{"type":37,"tag":153,"props":7478,"children":7479},{},[7480],{"type":43,"value":7481},"Delete loader-internal asset YAMLs",{"type":37,"tag":153,"props":7483,"children":7484},{},[7485],{"type":37,"tag":52,"props":7486,"children":7488},{"className":7487},[],[7489],{"type":43,"value":7490},"bruin ai enhance --claude context/assets",{"type":37,"tag":153,"props":7492,"children":7493},{},[7494],{"type":37,"tag":52,"props":7495,"children":7497},{"className":7496},[],[7498],{"type":43,"value":7499},"bruin validate --config-file context/.bruin.yml context",{"type":37,"tag":153,"props":7501,"children":7502},{},[7503,7504,7509,7511,7516,7517],{"type":43,"value":6214},{"type":37,"tag":52,"props":7505,"children":7507},{"className":7506},[],[7508],{"type":43,"value":6220},{"type":43,"value":7510}," that points agents at ",{"type":37,"tag":52,"props":7512,"children":7514},{"className":7513},[],[7515],{"type":43,"value":96},{"type":43,"value":6229},{"type":37,"tag":52,"props":7518,"children":7520},{"className":7519},[],[7521],{"type":43,"value":6235},{"type":37,"tag":46,"props":7523,"children":7524},{},[7525,7527,7532],{"type":43,"value":7526},"That's the whole context layer. Everything else (",{"type":37,"tag":52,"props":7528,"children":7530},{"className":7529},[],[7531],{"type":43,"value":5751},{"type":43,"value":7533},", parity scripts, the contoso reference) is ergonomics on top.",{"type":37,"tag":38,"props":7535,"children":7536},{"id":1129},[7537],{"type":43,"value":1132},{"type":37,"tag":46,"props":7539,"children":7540},{},[7541,7543,7548,7550,7555],{"type":43,"value":7542},"You've turned an existing dbt + warehouse setup into something an AI agent can navigate confidently: it knows your tables (from import), understands what they mean (from enhancement), can ask Bruin tooling questions (from MCP), can run SQL safely (from ",{"type":37,"tag":52,"props":7544,"children":7546},{"className":7545},[],[7547],{"type":43,"value":6235},{"type":43,"value":7549}," + ADC), and follows a canonical workflow (from ",{"type":37,"tag":52,"props":7551,"children":7553},{"className":7552},[],[7554],{"type":43,"value":6220},{"type":43,"value":7556},"). The dbt project keeps doing its job — building tables — and the Bruin context layer keeps doing the new one: making those tables legible to AI.",{"type":37,"tag":1144,"props":7558,"children":7559},{},[7560],{"type":43,"value":1148},{"title":7,"searchDepth":305,"depth":305,"links":7562},[7563,7564,7565,7573,7574,7575],{"id":40,"depth":305,"text":44},{"id":101,"depth":305,"text":104},{"id":132,"depth":305,"text":135,"children":7566},[7567,7568,7570,7572],{"id":6312,"depth":17,"text":6315},{"id":6649,"depth":17,"text":7569},"2. Confirm bruin query works as the agent will use it",{"id":6807,"depth":17,"text":7571},"3. Add an AGENTS.md at the repo root",{"id":7229,"depth":17,"text":7232},{"id":7317,"depth":305,"text":7320},{"id":7430,"depth":305,"text":7433},{"id":1129,"depth":305,"text":1132},"content:tutorials:dbt-bruin-analyst:wire-up-agent.md","tutorials/dbt-bruin-analyst/wire-up-agent.md","tutorials/dbt-bruin-analyst/wire-up-agent",1777400108784]