[{"data":1,"prerenderedAt":7791},["ShallowReactive",2],{"tutorial-dbt-bruin-analyst/isolated-context":3,"content-query-YMCBmR72ue":1274,"content-query-g5ZKLlKTWc":2319},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":13,"difficulty":17,"module":5,"step":18,"journeys":19,"learnMore":22,"stepGif":32,"author":33,"body":37,"_type":1268,"_id":1269,"_source":1270,"_file":1271,"_stem":1272,"_extension":1273},"/tutorials/dbt-bruin-analyst/isolated-context","dbt-bruin-analyst",false,"","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.","2026-04-28",6,"Tutorial",[14,15,16],"Bruin CLI","dbt","BigQuery","Beginner",2,[20,21],"Data Analyst","Data Engineer",[23,26,29],{"label":24,"url":25},"Connections reference (docs)","https://getbruin.com/docs/bruin/core-concepts/connections.html",{"label":27,"url":28},"Pipeline configuration (docs)","https://getbruin.com/docs/bruin/core-concepts/pipeline.html",{"label":30,"url":31},"Application Default Credentials","https://cloud.google.com/docs/authentication/application-default-credentials","/img/learn/contoso-dbt-bruin-analyst.gif",{"name":34,"role":35,"image":36},"Bruin Team","Bruin Data","/bruin-logo-2025.svg",{"type":38,"children":39,"toc":1255},"root",[40,49,80,86,106,126,132,145,152,186,215,226,238,405,424,454,489,494,656,792,944,955,966,1060,1101,1125,1131,1136,1175,1180,1190,1202,1231,1237,1249],{"type":41,"tag":42,"props":43,"children":45},"element","h2",{"id":44},"what-youll-do",[46],{"type":47,"value":48},"text","What you'll do",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53,55,62,64,70,72,78],{"type":47,"value":54},"Inside your dbt repo, create a ",{"type":41,"tag":56,"props":57,"children":59},"code",{"className":58},[],[60],{"type":47,"value":61},"context/",{"type":47,"value":63}," directory with its own ",{"type":41,"tag":56,"props":65,"children":67},{"className":66},[],[68],{"type":47,"value":69},".bruin.yml",{"type":47,"value":71}," and ",{"type":41,"tag":56,"props":73,"children":75},{"className":74},[],[76],{"type":47,"value":77},"pipeline.yml",{"type":47,"value":79},". 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":41,"tag":42,"props":81,"children":83},{"id":82},"why-this-step-matters",[84],{"type":47,"value":85},"Why this step matters",{"type":41,"tag":50,"props":87,"children":88},{},[89,91,96,98,104],{"type":47,"value":90},"Bruin will happily share a ",{"type":41,"tag":56,"props":92,"children":94},{"className":93},[],[95],{"type":47,"value":69},{"type":47,"value":97}," 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":41,"tag":56,"props":99,"children":101},{"className":100},[],[102],{"type":47,"value":103},"bruin",{"type":47,"value":105}," 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":41,"tag":50,"props":107,"children":108},{},[109,111,117,119,124],{"type":47,"value":110},"The context layer is ",{"type":41,"tag":112,"props":113,"children":114},"strong",{},[115],{"type":47,"value":116},"its own pipeline",{"type":47,"value":118},", even though it never runs transforms. It's documentation that happens to live in ",{"type":41,"tag":56,"props":120,"children":122},{"className":121},[],[123],{"type":47,"value":77},{"type":47,"value":125}," form so Bruin can validate it.",{"type":41,"tag":42,"props":127,"children":129},{"id":128},"instructions",[130],{"type":47,"value":131},"Instructions",{"type":41,"tag":50,"props":133,"children":134},{},[135,137,143],{"type":47,"value":136},"Run all of these from the root of your dbt project (the directory containing ",{"type":41,"tag":56,"props":138,"children":140},{"className":139},[],[141],{"type":47,"value":142},"dbt_project.yml",{"type":47,"value":144},").",{"type":41,"tag":146,"props":147,"children":149},"h3",{"id":148},"_1-create-the-context-directory",[150],{"type":47,"value":151},"1. Create the context directory",{"type":41,"tag":153,"props":154,"children":158},"pre",{"className":155,"code":156,"language":157,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","mkdir -p context/assets\n","bash",[159],{"type":41,"tag":56,"props":160,"children":161},{"__ignoreMap":7},[162],{"type":41,"tag":163,"props":164,"children":167},"span",{"class":165,"line":166},"line",1,[168,174,180],{"type":41,"tag":163,"props":169,"children":171},{"style":170},"--shiki-default:#B392F0",[172],{"type":47,"value":173},"mkdir",{"type":41,"tag":163,"props":175,"children":177},{"style":176},"--shiki-default:#79B8FF",[178],{"type":47,"value":179}," -p",{"type":41,"tag":163,"props":181,"children":183},{"style":182},"--shiki-default:#9ECBFF",[184],{"type":47,"value":185}," context/assets\n",{"type":41,"tag":50,"props":187,"children":188},{},[189,191,197,199,205,207,213],{"type":47,"value":190},"You'll end up with ",{"type":41,"tag":56,"props":192,"children":194},{"className":193},[],[195],{"type":47,"value":196},"context/.bruin.yml",{"type":47,"value":198},", ",{"type":41,"tag":56,"props":200,"children":202},{"className":201},[],[203],{"type":47,"value":204},"context/pipeline.yml",{"type":47,"value":206},", and a populated ",{"type":41,"tag":56,"props":208,"children":210},{"className":209},[],[211],{"type":47,"value":212},"context/assets/",{"type":47,"value":214}," after the next step.",{"type":41,"tag":146,"props":216,"children":218},{"id":217},"_2-write-a-scoped-bruinyml",[219,221],{"type":47,"value":220},"2. Write a scoped ",{"type":41,"tag":56,"props":222,"children":224},{"className":223},[],[225],{"type":47,"value":69},{"type":41,"tag":50,"props":227,"children":228},{},[229,231,236],{"type":47,"value":230},"Drop this into ",{"type":41,"tag":56,"props":232,"children":234},{"className":233},[],[235],{"type":47,"value":196},{"type":47,"value":237},". Replace the project ID with your own warehouse's:",{"type":41,"tag":153,"props":239,"children":243},{"className":240,"code":241,"language":242,"meta":7,"style":7},"language-yaml shiki shiki-themes github-dark","# 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","yaml",[244],{"type":41,"tag":56,"props":245,"children":246},{"__ignoreMap":7},[247,256,276,290,303,316,328,351,369,387],{"type":41,"tag":163,"props":248,"children":249},{"class":165,"line":166},[250],{"type":41,"tag":163,"props":251,"children":253},{"style":252},"--shiki-default:#6A737D",[254],{"type":47,"value":255},"# context/.bruin.yml\n",{"type":41,"tag":163,"props":257,"children":258},{"class":165,"line":18},[259,265,271],{"type":41,"tag":163,"props":260,"children":262},{"style":261},"--shiki-default:#85E89D",[263],{"type":47,"value":264},"default_environment",{"type":41,"tag":163,"props":266,"children":268},{"style":267},"--shiki-default:#E1E4E8",[269],{"type":47,"value":270},": ",{"type":41,"tag":163,"props":272,"children":273},{"style":182},[274],{"type":47,"value":275},"default\n",{"type":41,"tag":163,"props":277,"children":279},{"class":165,"line":278},3,[280,285],{"type":41,"tag":163,"props":281,"children":282},{"style":261},[283],{"type":47,"value":284},"environments",{"type":41,"tag":163,"props":286,"children":287},{"style":267},[288],{"type":47,"value":289},":\n",{"type":41,"tag":163,"props":291,"children":293},{"class":165,"line":292},4,[294,299],{"type":41,"tag":163,"props":295,"children":296},{"style":261},[297],{"type":47,"value":298},"  default",{"type":41,"tag":163,"props":300,"children":301},{"style":267},[302],{"type":47,"value":289},{"type":41,"tag":163,"props":304,"children":306},{"class":165,"line":305},5,[307,312],{"type":41,"tag":163,"props":308,"children":309},{"style":261},[310],{"type":47,"value":311},"    connections",{"type":41,"tag":163,"props":313,"children":314},{"style":267},[315],{"type":47,"value":289},{"type":41,"tag":163,"props":317,"children":318},{"class":165,"line":11},[319,324],{"type":41,"tag":163,"props":320,"children":321},{"style":261},[322],{"type":47,"value":323},"      google_cloud_platform",{"type":41,"tag":163,"props":325,"children":326},{"style":267},[327],{"type":47,"value":289},{"type":41,"tag":163,"props":329,"children":331},{"class":165,"line":330},7,[332,337,342,346],{"type":41,"tag":163,"props":333,"children":334},{"style":267},[335],{"type":47,"value":336},"        - ",{"type":41,"tag":163,"props":338,"children":339},{"style":261},[340],{"type":47,"value":341},"name",{"type":41,"tag":163,"props":343,"children":344},{"style":267},[345],{"type":47,"value":270},{"type":41,"tag":163,"props":347,"children":348},{"style":182},[349],{"type":47,"value":350},"contoso_dbt_bq\n",{"type":41,"tag":163,"props":352,"children":354},{"class":165,"line":353},8,[355,360,364],{"type":41,"tag":163,"props":356,"children":357},{"style":261},[358],{"type":47,"value":359},"          project_id",{"type":41,"tag":163,"props":361,"children":362},{"style":267},[363],{"type":47,"value":270},{"type":41,"tag":163,"props":365,"children":366},{"style":182},[367],{"type":47,"value":368},"bruin-playground-arsalan\n",{"type":41,"tag":163,"props":370,"children":372},{"class":165,"line":371},9,[373,378,382],{"type":41,"tag":163,"props":374,"children":375},{"style":261},[376],{"type":47,"value":377},"          location",{"type":41,"tag":163,"props":379,"children":380},{"style":267},[381],{"type":47,"value":270},{"type":41,"tag":163,"props":383,"children":384},{"style":182},[385],{"type":47,"value":386},"EU\n",{"type":41,"tag":163,"props":388,"children":390},{"class":165,"line":389},10,[391,396,400],{"type":41,"tag":163,"props":392,"children":393},{"style":261},[394],{"type":47,"value":395},"          use_application_default_credentials",{"type":41,"tag":163,"props":397,"children":398},{"style":267},[399],{"type":47,"value":270},{"type":41,"tag":163,"props":401,"children":402},{"style":176},[403],{"type":47,"value":404},"true\n",{"type":41,"tag":50,"props":406,"children":407},{},[408,410,414,416,422],{"type":47,"value":409},"This connection uses ",{"type":41,"tag":112,"props":411,"children":412},{},[413],{"type":47,"value":30},{"type":47,"value":415}," — the same ",{"type":41,"tag":56,"props":417,"children":419},{"className":418},[],[420],{"type":47,"value":421},"gcloud auth application-default login",{"type":47,"value":423}," 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":41,"tag":425,"props":426,"children":427},"blockquote",{},[428],{"type":41,"tag":50,"props":429,"children":430},{},[431,436,438,444,446,452],{"type":41,"tag":112,"props":432,"children":433},{},[434],{"type":47,"value":435},"Gotcha — wrong field name.",{"type":47,"value":437}," The field is ",{"type":41,"tag":56,"props":439,"children":441},{"className":440},[],[442],{"type":47,"value":443},"use_application_default_credentials",{"type":47,"value":445},", not ",{"type":41,"tag":56,"props":447,"children":449},{"className":448},[],[450],{"type":47,"value":451},"use_default_credentials",{"type":47,"value":453},". The latter is silently ignored and Bruin will look for a keyfile that isn't there.",{"type":41,"tag":425,"props":455,"children":456},{},[457],{"type":41,"tag":50,"props":458,"children":459},{},[460,465,467,472,474,479,481,487],{"type":41,"tag":112,"props":461,"children":462},{},[463],{"type":47,"value":464},"Gotcha — sibling configs.",{"type":47,"value":466}," ",{"type":41,"tag":56,"props":468,"children":470},{"className":469},[],[471],{"type":47,"value":103},{"type":47,"value":473}," walks up looking for ",{"type":41,"tag":56,"props":475,"children":477},{"className":476},[],[478],{"type":47,"value":69},{"type":47,"value":480},". If a parent directory has one with a broken connection, every command in this scope will error. Always pass ",{"type":41,"tag":56,"props":482,"children":484},{"className":483},[],[485],{"type":47,"value":486},"--config-file context/.bruin.yml",{"type":47,"value":488}," so Bruin only loads this file.",{"type":41,"tag":50,"props":490,"children":491},{},[492],{"type":47,"value":493},"For Redshift, ClickHouse, or Postgres, swap the connection block. Examples:",{"type":41,"tag":153,"props":495,"children":497},{"className":240,"code":496,"language":242,"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",[498],{"type":41,"tag":56,"props":499,"children":500},{"__ignoreMap":7},[501,509,521,533,554,571,588,605,622,639],{"type":41,"tag":163,"props":502,"children":503},{"class":165,"line":166},[504],{"type":41,"tag":163,"props":505,"children":506},{"style":252},[507],{"type":47,"value":508},"# Postgres\n",{"type":41,"tag":163,"props":510,"children":511},{"class":165,"line":18},[512,517],{"type":41,"tag":163,"props":513,"children":514},{"style":261},[515],{"type":47,"value":516},"connections",{"type":41,"tag":163,"props":518,"children":519},{"style":267},[520],{"type":47,"value":289},{"type":41,"tag":163,"props":522,"children":523},{"class":165,"line":278},[524,529],{"type":41,"tag":163,"props":525,"children":526},{"style":261},[527],{"type":47,"value":528},"  postgres",{"type":41,"tag":163,"props":530,"children":531},{"style":267},[532],{"type":47,"value":289},{"type":41,"tag":163,"props":534,"children":535},{"class":165,"line":292},[536,541,545,549],{"type":41,"tag":163,"props":537,"children":538},{"style":267},[539],{"type":47,"value":540},"    - ",{"type":41,"tag":163,"props":542,"children":543},{"style":261},[544],{"type":47,"value":341},{"type":41,"tag":163,"props":546,"children":547},{"style":267},[548],{"type":47,"value":270},{"type":41,"tag":163,"props":550,"children":551},{"style":182},[552],{"type":47,"value":553},"contoso_dbt_pg\n",{"type":41,"tag":163,"props":555,"children":556},{"class":165,"line":305},[557,562,566],{"type":41,"tag":163,"props":558,"children":559},{"style":261},[560],{"type":47,"value":561},"      host",{"type":41,"tag":163,"props":563,"children":564},{"style":267},[565],{"type":47,"value":270},{"type":41,"tag":163,"props":567,"children":568},{"style":182},[569],{"type":47,"value":570},"db.example.internal\n",{"type":41,"tag":163,"props":572,"children":573},{"class":165,"line":11},[574,579,583],{"type":41,"tag":163,"props":575,"children":576},{"style":261},[577],{"type":47,"value":578},"      port",{"type":41,"tag":163,"props":580,"children":581},{"style":267},[582],{"type":47,"value":270},{"type":41,"tag":163,"props":584,"children":585},{"style":176},[586],{"type":47,"value":587},"5432\n",{"type":41,"tag":163,"props":589,"children":590},{"class":165,"line":330},[591,596,600],{"type":41,"tag":163,"props":592,"children":593},{"style":261},[594],{"type":47,"value":595},"      username",{"type":41,"tag":163,"props":597,"children":598},{"style":267},[599],{"type":47,"value":270},{"type":41,"tag":163,"props":601,"children":602},{"style":182},[603],{"type":47,"value":604},"analyst_ro\n",{"type":41,"tag":163,"props":606,"children":607},{"class":165,"line":353},[608,613,617],{"type":41,"tag":163,"props":609,"children":610},{"style":261},[611],{"type":47,"value":612},"      password",{"type":41,"tag":163,"props":614,"children":615},{"style":267},[616],{"type":47,"value":270},{"type":41,"tag":163,"props":618,"children":619},{"style":182},[620],{"type":47,"value":621},"${POSTGRES_PASSWORD}\n",{"type":41,"tag":163,"props":623,"children":624},{"class":165,"line":371},[625,630,634],{"type":41,"tag":163,"props":626,"children":627},{"style":261},[628],{"type":47,"value":629},"      database",{"type":41,"tag":163,"props":631,"children":632},{"style":267},[633],{"type":47,"value":270},{"type":41,"tag":163,"props":635,"children":636},{"style":182},[637],{"type":47,"value":638},"contoso\n",{"type":41,"tag":163,"props":640,"children":641},{"class":165,"line":389},[642,647,651],{"type":41,"tag":163,"props":643,"children":644},{"style":261},[645],{"type":47,"value":646},"      ssl_mode",{"type":41,"tag":163,"props":648,"children":649},{"style":267},[650],{"type":47,"value":270},{"type":41,"tag":163,"props":652,"children":653},{"style":182},[654],{"type":47,"value":655},"require\n",{"type":41,"tag":153,"props":657,"children":659},{"className":240,"code":658,"language":242,"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",[660],{"type":41,"tag":56,"props":661,"children":662},{"__ignoreMap":7},[663,671,682,694,714,730,746,761,777],{"type":41,"tag":163,"props":664,"children":665},{"class":165,"line":166},[666],{"type":41,"tag":163,"props":667,"children":668},{"style":252},[669],{"type":47,"value":670},"# Redshift\n",{"type":41,"tag":163,"props":672,"children":673},{"class":165,"line":18},[674,678],{"type":41,"tag":163,"props":675,"children":676},{"style":261},[677],{"type":47,"value":516},{"type":41,"tag":163,"props":679,"children":680},{"style":267},[681],{"type":47,"value":289},{"type":41,"tag":163,"props":683,"children":684},{"class":165,"line":278},[685,690],{"type":41,"tag":163,"props":686,"children":687},{"style":261},[688],{"type":47,"value":689},"  redshift",{"type":41,"tag":163,"props":691,"children":692},{"style":267},[693],{"type":47,"value":289},{"type":41,"tag":163,"props":695,"children":696},{"class":165,"line":292},[697,701,705,709],{"type":41,"tag":163,"props":698,"children":699},{"style":267},[700],{"type":47,"value":540},{"type":41,"tag":163,"props":702,"children":703},{"style":261},[704],{"type":47,"value":341},{"type":41,"tag":163,"props":706,"children":707},{"style":267},[708],{"type":47,"value":270},{"type":41,"tag":163,"props":710,"children":711},{"style":182},[712],{"type":47,"value":713},"contoso_dbt_rs\n",{"type":41,"tag":163,"props":715,"children":716},{"class":165,"line":305},[717,721,725],{"type":41,"tag":163,"props":718,"children":719},{"style":261},[720],{"type":47,"value":561},{"type":41,"tag":163,"props":722,"children":723},{"style":267},[724],{"type":47,"value":270},{"type":41,"tag":163,"props":726,"children":727},{"style":182},[728],{"type":47,"value":729},"contoso.abcd1234.eu-west-1.redshift.amazonaws.com\n",{"type":41,"tag":163,"props":731,"children":732},{"class":165,"line":11},[733,737,741],{"type":41,"tag":163,"props":734,"children":735},{"style":261},[736],{"type":47,"value":578},{"type":41,"tag":163,"props":738,"children":739},{"style":267},[740],{"type":47,"value":270},{"type":41,"tag":163,"props":742,"children":743},{"style":176},[744],{"type":47,"value":745},"5439\n",{"type":41,"tag":163,"props":747,"children":748},{"class":165,"line":330},[749,753,757],{"type":41,"tag":163,"props":750,"children":751},{"style":261},[752],{"type":47,"value":595},{"type":41,"tag":163,"props":754,"children":755},{"style":267},[756],{"type":47,"value":270},{"type":41,"tag":163,"props":758,"children":759},{"style":182},[760],{"type":47,"value":604},{"type":41,"tag":163,"props":762,"children":763},{"class":165,"line":353},[764,768,772],{"type":41,"tag":163,"props":765,"children":766},{"style":261},[767],{"type":47,"value":612},{"type":41,"tag":163,"props":769,"children":770},{"style":267},[771],{"type":47,"value":270},{"type":41,"tag":163,"props":773,"children":774},{"style":182},[775],{"type":47,"value":776},"${REDSHIFT_PASSWORD}\n",{"type":41,"tag":163,"props":778,"children":779},{"class":165,"line":371},[780,784,788],{"type":41,"tag":163,"props":781,"children":782},{"style":261},[783],{"type":47,"value":629},{"type":41,"tag":163,"props":785,"children":786},{"style":267},[787],{"type":47,"value":270},{"type":41,"tag":163,"props":789,"children":790},{"style":182},[791],{"type":47,"value":638},{"type":41,"tag":153,"props":793,"children":795},{"className":240,"code":794,"language":242,"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",[796],{"type":41,"tag":56,"props":797,"children":798},{"__ignoreMap":7},[799,807,818,830,850,866,882,897,913,928],{"type":41,"tag":163,"props":800,"children":801},{"class":165,"line":166},[802],{"type":41,"tag":163,"props":803,"children":804},{"style":252},[805],{"type":47,"value":806},"# ClickHouse\n",{"type":41,"tag":163,"props":808,"children":809},{"class":165,"line":18},[810,814],{"type":41,"tag":163,"props":811,"children":812},{"style":261},[813],{"type":47,"value":516},{"type":41,"tag":163,"props":815,"children":816},{"style":267},[817],{"type":47,"value":289},{"type":41,"tag":163,"props":819,"children":820},{"class":165,"line":278},[821,826],{"type":41,"tag":163,"props":822,"children":823},{"style":261},[824],{"type":47,"value":825},"  clickhouse",{"type":41,"tag":163,"props":827,"children":828},{"style":267},[829],{"type":47,"value":289},{"type":41,"tag":163,"props":831,"children":832},{"class":165,"line":292},[833,837,841,845],{"type":41,"tag":163,"props":834,"children":835},{"style":267},[836],{"type":47,"value":540},{"type":41,"tag":163,"props":838,"children":839},{"style":261},[840],{"type":47,"value":341},{"type":41,"tag":163,"props":842,"children":843},{"style":267},[844],{"type":47,"value":270},{"type":41,"tag":163,"props":846,"children":847},{"style":182},[848],{"type":47,"value":849},"contoso_dbt_ch\n",{"type":41,"tag":163,"props":851,"children":852},{"class":165,"line":305},[853,857,861],{"type":41,"tag":163,"props":854,"children":855},{"style":261},[856],{"type":47,"value":561},{"type":41,"tag":163,"props":858,"children":859},{"style":267},[860],{"type":47,"value":270},{"type":41,"tag":163,"props":862,"children":863},{"style":182},[864],{"type":47,"value":865},"contoso.eu-central-1.aws.clickhouse.cloud\n",{"type":41,"tag":163,"props":867,"children":868},{"class":165,"line":11},[869,873,877],{"type":41,"tag":163,"props":870,"children":871},{"style":261},[872],{"type":47,"value":578},{"type":41,"tag":163,"props":874,"children":875},{"style":267},[876],{"type":47,"value":270},{"type":41,"tag":163,"props":878,"children":879},{"style":176},[880],{"type":47,"value":881},"9440\n",{"type":41,"tag":163,"props":883,"children":884},{"class":165,"line":330},[885,889,893],{"type":41,"tag":163,"props":886,"children":887},{"style":261},[888],{"type":47,"value":595},{"type":41,"tag":163,"props":890,"children":891},{"style":267},[892],{"type":47,"value":270},{"type":41,"tag":163,"props":894,"children":895},{"style":182},[896],{"type":47,"value":604},{"type":41,"tag":163,"props":898,"children":899},{"class":165,"line":353},[900,904,908],{"type":41,"tag":163,"props":901,"children":902},{"style":261},[903],{"type":47,"value":612},{"type":41,"tag":163,"props":905,"children":906},{"style":267},[907],{"type":47,"value":270},{"type":41,"tag":163,"props":909,"children":910},{"style":182},[911],{"type":47,"value":912},"${CLICKHOUSE_PASSWORD}\n",{"type":41,"tag":163,"props":914,"children":915},{"class":165,"line":371},[916,920,924],{"type":41,"tag":163,"props":917,"children":918},{"style":261},[919],{"type":47,"value":629},{"type":41,"tag":163,"props":921,"children":922},{"style":267},[923],{"type":47,"value":270},{"type":41,"tag":163,"props":925,"children":926},{"style":182},[927],{"type":47,"value":275},{"type":41,"tag":163,"props":929,"children":930},{"class":165,"line":389},[931,936,940],{"type":41,"tag":163,"props":932,"children":933},{"style":261},[934],{"type":47,"value":935},"      secure",{"type":41,"tag":163,"props":937,"children":938},{"style":267},[939],{"type":47,"value":270},{"type":41,"tag":163,"props":941,"children":942},{"style":176},[943],{"type":47,"value":404},{"type":41,"tag":146,"props":945,"children":947},{"id":946},"_3-write-a-pipelineyml",[948,950],{"type":47,"value":949},"3. Write a ",{"type":41,"tag":56,"props":951,"children":953},{"className":952},[],[954],{"type":47,"value":77},{"type":41,"tag":50,"props":956,"children":957},{},[958,959,964],{"type":47,"value":230},{"type":41,"tag":56,"props":960,"children":962},{"className":961},[],[963],{"type":47,"value":204},{"type":47,"value":965},":",{"type":41,"tag":153,"props":967,"children":969},{"className":240,"code":968,"language":242,"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",[970],{"type":41,"tag":56,"props":971,"children":972},{"__ignoreMap":7},[973,981,997,1014,1031,1043],{"type":41,"tag":163,"props":974,"children":975},{"class":165,"line":166},[976],{"type":41,"tag":163,"props":977,"children":978},{"style":252},[979],{"type":47,"value":980},"# context/pipeline.yml\n",{"type":41,"tag":163,"props":982,"children":983},{"class":165,"line":18},[984,988,992],{"type":41,"tag":163,"props":985,"children":986},{"style":261},[987],{"type":47,"value":341},{"type":41,"tag":163,"props":989,"children":990},{"style":267},[991],{"type":47,"value":270},{"type":41,"tag":163,"props":993,"children":994},{"style":182},[995],{"type":47,"value":996},"contoso_dbt_context\n",{"type":41,"tag":163,"props":998,"children":999},{"class":165,"line":278},[1000,1005,1009],{"type":41,"tag":163,"props":1001,"children":1002},{"style":261},[1003],{"type":47,"value":1004},"schedule",{"type":41,"tag":163,"props":1006,"children":1007},{"style":267},[1008],{"type":47,"value":270},{"type":41,"tag":163,"props":1010,"children":1011},{"style":182},[1012],{"type":47,"value":1013},"daily\n",{"type":41,"tag":163,"props":1015,"children":1016},{"class":165,"line":292},[1017,1022,1026],{"type":41,"tag":163,"props":1018,"children":1019},{"style":261},[1020],{"type":47,"value":1021},"start_date",{"type":41,"tag":163,"props":1023,"children":1024},{"style":267},[1025],{"type":47,"value":270},{"type":41,"tag":163,"props":1027,"children":1028},{"style":182},[1029],{"type":47,"value":1030},"\"2016-01-01\"\n",{"type":41,"tag":163,"props":1032,"children":1033},{"class":165,"line":305},[1034,1039],{"type":41,"tag":163,"props":1035,"children":1036},{"style":261},[1037],{"type":47,"value":1038},"default_connections",{"type":41,"tag":163,"props":1040,"children":1041},{"style":267},[1042],{"type":47,"value":289},{"type":41,"tag":163,"props":1044,"children":1045},{"class":165,"line":11},[1046,1051,1055],{"type":41,"tag":163,"props":1047,"children":1048},{"style":261},[1049],{"type":47,"value":1050},"  google_cloud_platform",{"type":41,"tag":163,"props":1052,"children":1053},{"style":267},[1054],{"type":47,"value":270},{"type":41,"tag":163,"props":1056,"children":1057},{"style":182},[1058],{"type":47,"value":1059},"\"contoso_dbt_bq\"\n",{"type":41,"tag":50,"props":1061,"children":1062},{},[1063,1065,1070,1072,1078,1080,1086,1087,1093,1094,1100],{"type":47,"value":1064},"The ",{"type":41,"tag":56,"props":1066,"children":1068},{"className":1067},[],[1069],{"type":47,"value":1038},{"type":47,"value":1071}," block makes the connection name implicit for every asset Bruin generates in the next step — you won't have to repeat ",{"type":41,"tag":56,"props":1073,"children":1075},{"className":1074},[],[1076],{"type":47,"value":1077},"connection: contoso_dbt_bq",{"type":47,"value":1079}," in 40 separate YAMLs. For non-BigQuery warehouses, use the matching key (",{"type":41,"tag":56,"props":1081,"children":1083},{"className":1082},[],[1084],{"type":47,"value":1085},"postgres",{"type":47,"value":198},{"type":41,"tag":56,"props":1088,"children":1090},{"className":1089},[],[1091],{"type":47,"value":1092},"redshift",{"type":47,"value":198},{"type":41,"tag":56,"props":1095,"children":1097},{"className":1096},[],[1098],{"type":47,"value":1099},"clickhouse",{"type":47,"value":144},{"type":41,"tag":425,"props":1102,"children":1103},{},[1104],{"type":41,"tag":50,"props":1105,"children":1106},{},[1107,1109,1115,1117,1123],{"type":47,"value":1108},"The pipeline never ",{"type":41,"tag":1110,"props":1111,"children":1112},"em",{},[1113],{"type":47,"value":1114},"runs",{"type":47,"value":1116}," anything — but Bruin still treats it as a pipeline, which gives you ",{"type":41,"tag":56,"props":1118,"children":1120},{"className":1119},[],[1121],{"type":47,"value":1122},"bruin validate",{"type":47,"value":1124},", lineage, and docs generation for free.",{"type":41,"tag":146,"props":1126,"children":1128},{"id":1127},"_4-test-the-connection",[1129],{"type":47,"value":1130},"4. Test the connection",{"type":41,"tag":50,"props":1132,"children":1133},{},[1134],{"type":47,"value":1135},"Confirm Bruin can reach the warehouse before going further:",{"type":41,"tag":153,"props":1137,"children":1139},{"className":155,"code":1138,"language":157,"meta":7,"style":7},"bruin connections ping --config-file context/.bruin.yml contoso_dbt_bq\n",[1140],{"type":41,"tag":56,"props":1141,"children":1142},{"__ignoreMap":7},[1143],{"type":41,"tag":163,"props":1144,"children":1145},{"class":165,"line":166},[1146,1150,1155,1160,1165,1170],{"type":41,"tag":163,"props":1147,"children":1148},{"style":170},[1149],{"type":47,"value":103},{"type":41,"tag":163,"props":1151,"children":1152},{"style":182},[1153],{"type":47,"value":1154}," connections",{"type":41,"tag":163,"props":1156,"children":1157},{"style":182},[1158],{"type":47,"value":1159}," ping",{"type":41,"tag":163,"props":1161,"children":1162},{"style":176},[1163],{"type":47,"value":1164}," --config-file",{"type":41,"tag":163,"props":1166,"children":1167},{"style":182},[1168],{"type":47,"value":1169}," context/.bruin.yml",{"type":41,"tag":163,"props":1171,"children":1172},{"style":182},[1173],{"type":47,"value":1174}," contoso_dbt_bq\n",{"type":41,"tag":50,"props":1176,"children":1177},{},[1178],{"type":47,"value":1179},"Expected output:",{"type":41,"tag":153,"props":1181,"children":1185},{"className":1182,"code":1184,"language":47},[1183],"language-text","Successfully connected to 'contoso_dbt_bq'.\n",[1186],{"type":41,"tag":56,"props":1187,"children":1188},{"__ignoreMap":7},[1189],{"type":47,"value":1184},{"type":41,"tag":50,"props":1191,"children":1192},{},[1193,1195,1200],{"type":47,"value":1194},"If you see an authentication error, run ",{"type":41,"tag":56,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":47,"value":421},{"type":47,"value":1201}," (BigQuery) or check your env vars (Postgres / Redshift / ClickHouse) and try again.",{"type":41,"tag":425,"props":1203,"children":1204},{},[1205],{"type":41,"tag":50,"props":1206,"children":1207},{},[1208,1221,1223,1229],{"type":41,"tag":112,"props":1209,"children":1210},{},[1211,1213,1219],{"type":47,"value":1212},"Gotcha — ",{"type":41,"tag":56,"props":1214,"children":1216},{"className":1215},[],[1217],{"type":47,"value":1218},"bruin connections test",{"type":47,"value":1220}," loads everything.",{"type":47,"value":1222}," It walks every connection in scope, so a broken sibling connection breaks the test. Always ",{"type":41,"tag":56,"props":1224,"children":1226},{"className":1225},[],[1227],{"type":47,"value":1228},"--config-file",{"type":47,"value":1230},"-scope when working in a sub-pipeline.",{"type":41,"tag":42,"props":1232,"children":1234},{"id":1233},"what-just-happened",[1235],{"type":47,"value":1236},"What just happened",{"type":41,"tag":50,"props":1238,"children":1239},{},[1240,1242,1247],{"type":47,"value":1241},"You now have a self-contained Bruin pipeline at ",{"type":41,"tag":56,"props":1243,"children":1245},{"className":1244},[],[1246],{"type":47,"value":61},{"type":47,"value":1248}," — 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":41,"tag":1250,"props":1251,"children":1252},"style",{},[1253],{"type":47,"value":1254},"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":18,"depth":18,"links":1256},[1257,1258,1259,1267],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":1260},[1261,1262,1264,1266],{"id":148,"depth":278,"text":151},{"id":217,"depth":278,"text":1263},"2. Write a scoped .bruin.yml",{"id":946,"depth":278,"text":1265},"3. Write a pipeline.yml",{"id":1127,"depth":278,"text":1130},{"id":1233,"depth":18,"text":1236},"markdown","content:tutorials:dbt-bruin-analyst:isolated-context.md","content","tutorials/dbt-bruin-analyst/isolated-context.md","tutorials/dbt-bruin-analyst/isolated-context","md",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":1275,"difficulty":17,"module":5,"step":18,"journeys":1276,"learnMore":1277,"stepGif":32,"author":1281,"body":1282,"_type":1268,"_id":1269,"_source":1270,"_file":1271,"_stem":1272,"_extension":1273},[14,15,16],[20,21],[1278,1279,1280],{"label":24,"url":25},{"label":27,"url":28},{"label":30,"url":31},{"name":34,"role":35,"image":36},{"type":38,"children":1283,"toc":2308},[1284,1288,1310,1314,1330,1345,1349,1359,1363,1384,1406,1415,1425,1561,1576,1599,1628,1632,1776,1905,2049,2058,2068,2152,2186,2204,2208,2212,2245,2249,2257,2267,2290,2294,2304],{"type":41,"tag":42,"props":1285,"children":1286},{"id":44},[1287],{"type":47,"value":48},{"type":41,"tag":50,"props":1289,"children":1290},{},[1291,1292,1297,1298,1303,1304,1309],{"type":47,"value":54},{"type":41,"tag":56,"props":1293,"children":1295},{"className":1294},[],[1296],{"type":47,"value":61},{"type":47,"value":63},{"type":41,"tag":56,"props":1299,"children":1301},{"className":1300},[],[1302],{"type":47,"value":69},{"type":47,"value":71},{"type":41,"tag":56,"props":1305,"children":1307},{"className":1306},[],[1308],{"type":47,"value":77},{"type":47,"value":79},{"type":41,"tag":42,"props":1311,"children":1312},{"id":82},[1313],{"type":47,"value":85},{"type":41,"tag":50,"props":1315,"children":1316},{},[1317,1318,1323,1324,1329],{"type":47,"value":90},{"type":41,"tag":56,"props":1319,"children":1321},{"className":1320},[],[1322],{"type":47,"value":69},{"type":47,"value":97},{"type":41,"tag":56,"props":1325,"children":1327},{"className":1326},[],[1328],{"type":47,"value":103},{"type":47,"value":105},{"type":41,"tag":50,"props":1331,"children":1332},{},[1333,1334,1338,1339,1344],{"type":47,"value":110},{"type":41,"tag":112,"props":1335,"children":1336},{},[1337],{"type":47,"value":116},{"type":47,"value":118},{"type":41,"tag":56,"props":1340,"children":1342},{"className":1341},[],[1343],{"type":47,"value":77},{"type":47,"value":125},{"type":41,"tag":42,"props":1346,"children":1347},{"id":128},[1348],{"type":47,"value":131},{"type":41,"tag":50,"props":1350,"children":1351},{},[1352,1353,1358],{"type":47,"value":136},{"type":41,"tag":56,"props":1354,"children":1356},{"className":1355},[],[1357],{"type":47,"value":142},{"type":47,"value":144},{"type":41,"tag":146,"props":1360,"children":1361},{"id":148},[1362],{"type":47,"value":151},{"type":41,"tag":153,"props":1364,"children":1365},{"className":155,"code":156,"language":157,"meta":7,"style":7},[1366],{"type":41,"tag":56,"props":1367,"children":1368},{"__ignoreMap":7},[1369],{"type":41,"tag":163,"props":1370,"children":1371},{"class":165,"line":166},[1372,1376,1380],{"type":41,"tag":163,"props":1373,"children":1374},{"style":170},[1375],{"type":47,"value":173},{"type":41,"tag":163,"props":1377,"children":1378},{"style":176},[1379],{"type":47,"value":179},{"type":41,"tag":163,"props":1381,"children":1382},{"style":182},[1383],{"type":47,"value":185},{"type":41,"tag":50,"props":1385,"children":1386},{},[1387,1388,1393,1394,1399,1400,1405],{"type":47,"value":190},{"type":41,"tag":56,"props":1389,"children":1391},{"className":1390},[],[1392],{"type":47,"value":196},{"type":47,"value":198},{"type":41,"tag":56,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":47,"value":204},{"type":47,"value":206},{"type":41,"tag":56,"props":1401,"children":1403},{"className":1402},[],[1404],{"type":47,"value":212},{"type":47,"value":214},{"type":41,"tag":146,"props":1407,"children":1408},{"id":217},[1409,1410],{"type":47,"value":220},{"type":41,"tag":56,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":47,"value":69},{"type":41,"tag":50,"props":1416,"children":1417},{},[1418,1419,1424],{"type":47,"value":230},{"type":41,"tag":56,"props":1420,"children":1422},{"className":1421},[],[1423],{"type":47,"value":196},{"type":47,"value":237},{"type":41,"tag":153,"props":1426,"children":1427},{"className":240,"code":241,"language":242,"meta":7,"style":7},[1428],{"type":41,"tag":56,"props":1429,"children":1430},{"__ignoreMap":7},[1431,1438,1453,1464,1475,1486,1497,1516,1531,1546],{"type":41,"tag":163,"props":1432,"children":1433},{"class":165,"line":166},[1434],{"type":41,"tag":163,"props":1435,"children":1436},{"style":252},[1437],{"type":47,"value":255},{"type":41,"tag":163,"props":1439,"children":1440},{"class":165,"line":18},[1441,1445,1449],{"type":41,"tag":163,"props":1442,"children":1443},{"style":261},[1444],{"type":47,"value":264},{"type":41,"tag":163,"props":1446,"children":1447},{"style":267},[1448],{"type":47,"value":270},{"type":41,"tag":163,"props":1450,"children":1451},{"style":182},[1452],{"type":47,"value":275},{"type":41,"tag":163,"props":1454,"children":1455},{"class":165,"line":278},[1456,1460],{"type":41,"tag":163,"props":1457,"children":1458},{"style":261},[1459],{"type":47,"value":284},{"type":41,"tag":163,"props":1461,"children":1462},{"style":267},[1463],{"type":47,"value":289},{"type":41,"tag":163,"props":1465,"children":1466},{"class":165,"line":292},[1467,1471],{"type":41,"tag":163,"props":1468,"children":1469},{"style":261},[1470],{"type":47,"value":298},{"type":41,"tag":163,"props":1472,"children":1473},{"style":267},[1474],{"type":47,"value":289},{"type":41,"tag":163,"props":1476,"children":1477},{"class":165,"line":305},[1478,1482],{"type":41,"tag":163,"props":1479,"children":1480},{"style":261},[1481],{"type":47,"value":311},{"type":41,"tag":163,"props":1483,"children":1484},{"style":267},[1485],{"type":47,"value":289},{"type":41,"tag":163,"props":1487,"children":1488},{"class":165,"line":11},[1489,1493],{"type":41,"tag":163,"props":1490,"children":1491},{"style":261},[1492],{"type":47,"value":323},{"type":41,"tag":163,"props":1494,"children":1495},{"style":267},[1496],{"type":47,"value":289},{"type":41,"tag":163,"props":1498,"children":1499},{"class":165,"line":330},[1500,1504,1508,1512],{"type":41,"tag":163,"props":1501,"children":1502},{"style":267},[1503],{"type":47,"value":336},{"type":41,"tag":163,"props":1505,"children":1506},{"style":261},[1507],{"type":47,"value":341},{"type":41,"tag":163,"props":1509,"children":1510},{"style":267},[1511],{"type":47,"value":270},{"type":41,"tag":163,"props":1513,"children":1514},{"style":182},[1515],{"type":47,"value":350},{"type":41,"tag":163,"props":1517,"children":1518},{"class":165,"line":353},[1519,1523,1527],{"type":41,"tag":163,"props":1520,"children":1521},{"style":261},[1522],{"type":47,"value":359},{"type":41,"tag":163,"props":1524,"children":1525},{"style":267},[1526],{"type":47,"value":270},{"type":41,"tag":163,"props":1528,"children":1529},{"style":182},[1530],{"type":47,"value":368},{"type":41,"tag":163,"props":1532,"children":1533},{"class":165,"line":371},[1534,1538,1542],{"type":41,"tag":163,"props":1535,"children":1536},{"style":261},[1537],{"type":47,"value":377},{"type":41,"tag":163,"props":1539,"children":1540},{"style":267},[1541],{"type":47,"value":270},{"type":41,"tag":163,"props":1543,"children":1544},{"style":182},[1545],{"type":47,"value":386},{"type":41,"tag":163,"props":1547,"children":1548},{"class":165,"line":389},[1549,1553,1557],{"type":41,"tag":163,"props":1550,"children":1551},{"style":261},[1552],{"type":47,"value":395},{"type":41,"tag":163,"props":1554,"children":1555},{"style":267},[1556],{"type":47,"value":270},{"type":41,"tag":163,"props":1558,"children":1559},{"style":176},[1560],{"type":47,"value":404},{"type":41,"tag":50,"props":1562,"children":1563},{},[1564,1565,1569,1570,1575],{"type":47,"value":409},{"type":41,"tag":112,"props":1566,"children":1567},{},[1568],{"type":47,"value":30},{"type":47,"value":415},{"type":41,"tag":56,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":47,"value":421},{"type":47,"value":423},{"type":41,"tag":425,"props":1577,"children":1578},{},[1579],{"type":41,"tag":50,"props":1580,"children":1581},{},[1582,1586,1587,1592,1593,1598],{"type":41,"tag":112,"props":1583,"children":1584},{},[1585],{"type":47,"value":435},{"type":47,"value":437},{"type":41,"tag":56,"props":1588,"children":1590},{"className":1589},[],[1591],{"type":47,"value":443},{"type":47,"value":445},{"type":41,"tag":56,"props":1594,"children":1596},{"className":1595},[],[1597],{"type":47,"value":451},{"type":47,"value":453},{"type":41,"tag":425,"props":1600,"children":1601},{},[1602],{"type":41,"tag":50,"props":1603,"children":1604},{},[1605,1609,1610,1615,1616,1621,1622,1627],{"type":41,"tag":112,"props":1606,"children":1607},{},[1608],{"type":47,"value":464},{"type":47,"value":466},{"type":41,"tag":56,"props":1611,"children":1613},{"className":1612},[],[1614],{"type":47,"value":103},{"type":47,"value":473},{"type":41,"tag":56,"props":1617,"children":1619},{"className":1618},[],[1620],{"type":47,"value":69},{"type":47,"value":480},{"type":41,"tag":56,"props":1623,"children":1625},{"className":1624},[],[1626],{"type":47,"value":486},{"type":47,"value":488},{"type":41,"tag":50,"props":1629,"children":1630},{},[1631],{"type":47,"value":493},{"type":41,"tag":153,"props":1633,"children":1634},{"className":240,"code":496,"language":242,"meta":7,"style":7},[1635],{"type":41,"tag":56,"props":1636,"children":1637},{"__ignoreMap":7},[1638,1645,1656,1667,1686,1701,1716,1731,1746,1761],{"type":41,"tag":163,"props":1639,"children":1640},{"class":165,"line":166},[1641],{"type":41,"tag":163,"props":1642,"children":1643},{"style":252},[1644],{"type":47,"value":508},{"type":41,"tag":163,"props":1646,"children":1647},{"class":165,"line":18},[1648,1652],{"type":41,"tag":163,"props":1649,"children":1650},{"style":261},[1651],{"type":47,"value":516},{"type":41,"tag":163,"props":1653,"children":1654},{"style":267},[1655],{"type":47,"value":289},{"type":41,"tag":163,"props":1657,"children":1658},{"class":165,"line":278},[1659,1663],{"type":41,"tag":163,"props":1660,"children":1661},{"style":261},[1662],{"type":47,"value":528},{"type":41,"tag":163,"props":1664,"children":1665},{"style":267},[1666],{"type":47,"value":289},{"type":41,"tag":163,"props":1668,"children":1669},{"class":165,"line":292},[1670,1674,1678,1682],{"type":41,"tag":163,"props":1671,"children":1672},{"style":267},[1673],{"type":47,"value":540},{"type":41,"tag":163,"props":1675,"children":1676},{"style":261},[1677],{"type":47,"value":341},{"type":41,"tag":163,"props":1679,"children":1680},{"style":267},[1681],{"type":47,"value":270},{"type":41,"tag":163,"props":1683,"children":1684},{"style":182},[1685],{"type":47,"value":553},{"type":41,"tag":163,"props":1687,"children":1688},{"class":165,"line":305},[1689,1693,1697],{"type":41,"tag":163,"props":1690,"children":1691},{"style":261},[1692],{"type":47,"value":561},{"type":41,"tag":163,"props":1694,"children":1695},{"style":267},[1696],{"type":47,"value":270},{"type":41,"tag":163,"props":1698,"children":1699},{"style":182},[1700],{"type":47,"value":570},{"type":41,"tag":163,"props":1702,"children":1703},{"class":165,"line":11},[1704,1708,1712],{"type":41,"tag":163,"props":1705,"children":1706},{"style":261},[1707],{"type":47,"value":578},{"type":41,"tag":163,"props":1709,"children":1710},{"style":267},[1711],{"type":47,"value":270},{"type":41,"tag":163,"props":1713,"children":1714},{"style":176},[1715],{"type":47,"value":587},{"type":41,"tag":163,"props":1717,"children":1718},{"class":165,"line":330},[1719,1723,1727],{"type":41,"tag":163,"props":1720,"children":1721},{"style":261},[1722],{"type":47,"value":595},{"type":41,"tag":163,"props":1724,"children":1725},{"style":267},[1726],{"type":47,"value":270},{"type":41,"tag":163,"props":1728,"children":1729},{"style":182},[1730],{"type":47,"value":604},{"type":41,"tag":163,"props":1732,"children":1733},{"class":165,"line":353},[1734,1738,1742],{"type":41,"tag":163,"props":1735,"children":1736},{"style":261},[1737],{"type":47,"value":612},{"type":41,"tag":163,"props":1739,"children":1740},{"style":267},[1741],{"type":47,"value":270},{"type":41,"tag":163,"props":1743,"children":1744},{"style":182},[1745],{"type":47,"value":621},{"type":41,"tag":163,"props":1747,"children":1748},{"class":165,"line":371},[1749,1753,1757],{"type":41,"tag":163,"props":1750,"children":1751},{"style":261},[1752],{"type":47,"value":629},{"type":41,"tag":163,"props":1754,"children":1755},{"style":267},[1756],{"type":47,"value":270},{"type":41,"tag":163,"props":1758,"children":1759},{"style":182},[1760],{"type":47,"value":638},{"type":41,"tag":163,"props":1762,"children":1763},{"class":165,"line":389},[1764,1768,1772],{"type":41,"tag":163,"props":1765,"children":1766},{"style":261},[1767],{"type":47,"value":646},{"type":41,"tag":163,"props":1769,"children":1770},{"style":267},[1771],{"type":47,"value":270},{"type":41,"tag":163,"props":1773,"children":1774},{"style":182},[1775],{"type":47,"value":655},{"type":41,"tag":153,"props":1777,"children":1778},{"className":240,"code":658,"language":242,"meta":7,"style":7},[1779],{"type":41,"tag":56,"props":1780,"children":1781},{"__ignoreMap":7},[1782,1789,1800,1811,1830,1845,1860,1875,1890],{"type":41,"tag":163,"props":1783,"children":1784},{"class":165,"line":166},[1785],{"type":41,"tag":163,"props":1786,"children":1787},{"style":252},[1788],{"type":47,"value":670},{"type":41,"tag":163,"props":1790,"children":1791},{"class":165,"line":18},[1792,1796],{"type":41,"tag":163,"props":1793,"children":1794},{"style":261},[1795],{"type":47,"value":516},{"type":41,"tag":163,"props":1797,"children":1798},{"style":267},[1799],{"type":47,"value":289},{"type":41,"tag":163,"props":1801,"children":1802},{"class":165,"line":278},[1803,1807],{"type":41,"tag":163,"props":1804,"children":1805},{"style":261},[1806],{"type":47,"value":689},{"type":41,"tag":163,"props":1808,"children":1809},{"style":267},[1810],{"type":47,"value":289},{"type":41,"tag":163,"props":1812,"children":1813},{"class":165,"line":292},[1814,1818,1822,1826],{"type":41,"tag":163,"props":1815,"children":1816},{"style":267},[1817],{"type":47,"value":540},{"type":41,"tag":163,"props":1819,"children":1820},{"style":261},[1821],{"type":47,"value":341},{"type":41,"tag":163,"props":1823,"children":1824},{"style":267},[1825],{"type":47,"value":270},{"type":41,"tag":163,"props":1827,"children":1828},{"style":182},[1829],{"type":47,"value":713},{"type":41,"tag":163,"props":1831,"children":1832},{"class":165,"line":305},[1833,1837,1841],{"type":41,"tag":163,"props":1834,"children":1835},{"style":261},[1836],{"type":47,"value":561},{"type":41,"tag":163,"props":1838,"children":1839},{"style":267},[1840],{"type":47,"value":270},{"type":41,"tag":163,"props":1842,"children":1843},{"style":182},[1844],{"type":47,"value":729},{"type":41,"tag":163,"props":1846,"children":1847},{"class":165,"line":11},[1848,1852,1856],{"type":41,"tag":163,"props":1849,"children":1850},{"style":261},[1851],{"type":47,"value":578},{"type":41,"tag":163,"props":1853,"children":1854},{"style":267},[1855],{"type":47,"value":270},{"type":41,"tag":163,"props":1857,"children":1858},{"style":176},[1859],{"type":47,"value":745},{"type":41,"tag":163,"props":1861,"children":1862},{"class":165,"line":330},[1863,1867,1871],{"type":41,"tag":163,"props":1864,"children":1865},{"style":261},[1866],{"type":47,"value":595},{"type":41,"tag":163,"props":1868,"children":1869},{"style":267},[1870],{"type":47,"value":270},{"type":41,"tag":163,"props":1872,"children":1873},{"style":182},[1874],{"type":47,"value":604},{"type":41,"tag":163,"props":1876,"children":1877},{"class":165,"line":353},[1878,1882,1886],{"type":41,"tag":163,"props":1879,"children":1880},{"style":261},[1881],{"type":47,"value":612},{"type":41,"tag":163,"props":1883,"children":1884},{"style":267},[1885],{"type":47,"value":270},{"type":41,"tag":163,"props":1887,"children":1888},{"style":182},[1889],{"type":47,"value":776},{"type":41,"tag":163,"props":1891,"children":1892},{"class":165,"line":371},[1893,1897,1901],{"type":41,"tag":163,"props":1894,"children":1895},{"style":261},[1896],{"type":47,"value":629},{"type":41,"tag":163,"props":1898,"children":1899},{"style":267},[1900],{"type":47,"value":270},{"type":41,"tag":163,"props":1902,"children":1903},{"style":182},[1904],{"type":47,"value":638},{"type":41,"tag":153,"props":1906,"children":1907},{"className":240,"code":794,"language":242,"meta":7,"style":7},[1908],{"type":41,"tag":56,"props":1909,"children":1910},{"__ignoreMap":7},[1911,1918,1929,1940,1959,1974,1989,2004,2019,2034],{"type":41,"tag":163,"props":1912,"children":1913},{"class":165,"line":166},[1914],{"type":41,"tag":163,"props":1915,"children":1916},{"style":252},[1917],{"type":47,"value":806},{"type":41,"tag":163,"props":1919,"children":1920},{"class":165,"line":18},[1921,1925],{"type":41,"tag":163,"props":1922,"children":1923},{"style":261},[1924],{"type":47,"value":516},{"type":41,"tag":163,"props":1926,"children":1927},{"style":267},[1928],{"type":47,"value":289},{"type":41,"tag":163,"props":1930,"children":1931},{"class":165,"line":278},[1932,1936],{"type":41,"tag":163,"props":1933,"children":1934},{"style":261},[1935],{"type":47,"value":825},{"type":41,"tag":163,"props":1937,"children":1938},{"style":267},[1939],{"type":47,"value":289},{"type":41,"tag":163,"props":1941,"children":1942},{"class":165,"line":292},[1943,1947,1951,1955],{"type":41,"tag":163,"props":1944,"children":1945},{"style":267},[1946],{"type":47,"value":540},{"type":41,"tag":163,"props":1948,"children":1949},{"style":261},[1950],{"type":47,"value":341},{"type":41,"tag":163,"props":1952,"children":1953},{"style":267},[1954],{"type":47,"value":270},{"type":41,"tag":163,"props":1956,"children":1957},{"style":182},[1958],{"type":47,"value":849},{"type":41,"tag":163,"props":1960,"children":1961},{"class":165,"line":305},[1962,1966,1970],{"type":41,"tag":163,"props":1963,"children":1964},{"style":261},[1965],{"type":47,"value":561},{"type":41,"tag":163,"props":1967,"children":1968},{"style":267},[1969],{"type":47,"value":270},{"type":41,"tag":163,"props":1971,"children":1972},{"style":182},[1973],{"type":47,"value":865},{"type":41,"tag":163,"props":1975,"children":1976},{"class":165,"line":11},[1977,1981,1985],{"type":41,"tag":163,"props":1978,"children":1979},{"style":261},[1980],{"type":47,"value":578},{"type":41,"tag":163,"props":1982,"children":1983},{"style":267},[1984],{"type":47,"value":270},{"type":41,"tag":163,"props":1986,"children":1987},{"style":176},[1988],{"type":47,"value":881},{"type":41,"tag":163,"props":1990,"children":1991},{"class":165,"line":330},[1992,1996,2000],{"type":41,"tag":163,"props":1993,"children":1994},{"style":261},[1995],{"type":47,"value":595},{"type":41,"tag":163,"props":1997,"children":1998},{"style":267},[1999],{"type":47,"value":270},{"type":41,"tag":163,"props":2001,"children":2002},{"style":182},[2003],{"type":47,"value":604},{"type":41,"tag":163,"props":2005,"children":2006},{"class":165,"line":353},[2007,2011,2015],{"type":41,"tag":163,"props":2008,"children":2009},{"style":261},[2010],{"type":47,"value":612},{"type":41,"tag":163,"props":2012,"children":2013},{"style":267},[2014],{"type":47,"value":270},{"type":41,"tag":163,"props":2016,"children":2017},{"style":182},[2018],{"type":47,"value":912},{"type":41,"tag":163,"props":2020,"children":2021},{"class":165,"line":371},[2022,2026,2030],{"type":41,"tag":163,"props":2023,"children":2024},{"style":261},[2025],{"type":47,"value":629},{"type":41,"tag":163,"props":2027,"children":2028},{"style":267},[2029],{"type":47,"value":270},{"type":41,"tag":163,"props":2031,"children":2032},{"style":182},[2033],{"type":47,"value":275},{"type":41,"tag":163,"props":2035,"children":2036},{"class":165,"line":389},[2037,2041,2045],{"type":41,"tag":163,"props":2038,"children":2039},{"style":261},[2040],{"type":47,"value":935},{"type":41,"tag":163,"props":2042,"children":2043},{"style":267},[2044],{"type":47,"value":270},{"type":41,"tag":163,"props":2046,"children":2047},{"style":176},[2048],{"type":47,"value":404},{"type":41,"tag":146,"props":2050,"children":2051},{"id":946},[2052,2053],{"type":47,"value":949},{"type":41,"tag":56,"props":2054,"children":2056},{"className":2055},[],[2057],{"type":47,"value":77},{"type":41,"tag":50,"props":2059,"children":2060},{},[2061,2062,2067],{"type":47,"value":230},{"type":41,"tag":56,"props":2063,"children":2065},{"className":2064},[],[2066],{"type":47,"value":204},{"type":47,"value":965},{"type":41,"tag":153,"props":2069,"children":2070},{"className":240,"code":968,"language":242,"meta":7,"style":7},[2071],{"type":41,"tag":56,"props":2072,"children":2073},{"__ignoreMap":7},[2074,2081,2096,2111,2126,2137],{"type":41,"tag":163,"props":2075,"children":2076},{"class":165,"line":166},[2077],{"type":41,"tag":163,"props":2078,"children":2079},{"style":252},[2080],{"type":47,"value":980},{"type":41,"tag":163,"props":2082,"children":2083},{"class":165,"line":18},[2084,2088,2092],{"type":41,"tag":163,"props":2085,"children":2086},{"style":261},[2087],{"type":47,"value":341},{"type":41,"tag":163,"props":2089,"children":2090},{"style":267},[2091],{"type":47,"value":270},{"type":41,"tag":163,"props":2093,"children":2094},{"style":182},[2095],{"type":47,"value":996},{"type":41,"tag":163,"props":2097,"children":2098},{"class":165,"line":278},[2099,2103,2107],{"type":41,"tag":163,"props":2100,"children":2101},{"style":261},[2102],{"type":47,"value":1004},{"type":41,"tag":163,"props":2104,"children":2105},{"style":267},[2106],{"type":47,"value":270},{"type":41,"tag":163,"props":2108,"children":2109},{"style":182},[2110],{"type":47,"value":1013},{"type":41,"tag":163,"props":2112,"children":2113},{"class":165,"line":292},[2114,2118,2122],{"type":41,"tag":163,"props":2115,"children":2116},{"style":261},[2117],{"type":47,"value":1021},{"type":41,"tag":163,"props":2119,"children":2120},{"style":267},[2121],{"type":47,"value":270},{"type":41,"tag":163,"props":2123,"children":2124},{"style":182},[2125],{"type":47,"value":1030},{"type":41,"tag":163,"props":2127,"children":2128},{"class":165,"line":305},[2129,2133],{"type":41,"tag":163,"props":2130,"children":2131},{"style":261},[2132],{"type":47,"value":1038},{"type":41,"tag":163,"props":2134,"children":2135},{"style":267},[2136],{"type":47,"value":289},{"type":41,"tag":163,"props":2138,"children":2139},{"class":165,"line":11},[2140,2144,2148],{"type":41,"tag":163,"props":2141,"children":2142},{"style":261},[2143],{"type":47,"value":1050},{"type":41,"tag":163,"props":2145,"children":2146},{"style":267},[2147],{"type":47,"value":270},{"type":41,"tag":163,"props":2149,"children":2150},{"style":182},[2151],{"type":47,"value":1059},{"type":41,"tag":50,"props":2153,"children":2154},{},[2155,2156,2161,2162,2167,2168,2173,2174,2179,2180,2185],{"type":47,"value":1064},{"type":41,"tag":56,"props":2157,"children":2159},{"className":2158},[],[2160],{"type":47,"value":1038},{"type":47,"value":1071},{"type":41,"tag":56,"props":2163,"children":2165},{"className":2164},[],[2166],{"type":47,"value":1077},{"type":47,"value":1079},{"type":41,"tag":56,"props":2169,"children":2171},{"className":2170},[],[2172],{"type":47,"value":1085},{"type":47,"value":198},{"type":41,"tag":56,"props":2175,"children":2177},{"className":2176},[],[2178],{"type":47,"value":1092},{"type":47,"value":198},{"type":41,"tag":56,"props":2181,"children":2183},{"className":2182},[],[2184],{"type":47,"value":1099},{"type":47,"value":144},{"type":41,"tag":425,"props":2187,"children":2188},{},[2189],{"type":41,"tag":50,"props":2190,"children":2191},{},[2192,2193,2197,2198,2203],{"type":47,"value":1108},{"type":41,"tag":1110,"props":2194,"children":2195},{},[2196],{"type":47,"value":1114},{"type":47,"value":1116},{"type":41,"tag":56,"props":2199,"children":2201},{"className":2200},[],[2202],{"type":47,"value":1122},{"type":47,"value":1124},{"type":41,"tag":146,"props":2205,"children":2206},{"id":1127},[2207],{"type":47,"value":1130},{"type":41,"tag":50,"props":2209,"children":2210},{},[2211],{"type":47,"value":1135},{"type":41,"tag":153,"props":2213,"children":2214},{"className":155,"code":1138,"language":157,"meta":7,"style":7},[2215],{"type":41,"tag":56,"props":2216,"children":2217},{"__ignoreMap":7},[2218],{"type":41,"tag":163,"props":2219,"children":2220},{"class":165,"line":166},[2221,2225,2229,2233,2237,2241],{"type":41,"tag":163,"props":2222,"children":2223},{"style":170},[2224],{"type":47,"value":103},{"type":41,"tag":163,"props":2226,"children":2227},{"style":182},[2228],{"type":47,"value":1154},{"type":41,"tag":163,"props":2230,"children":2231},{"style":182},[2232],{"type":47,"value":1159},{"type":41,"tag":163,"props":2234,"children":2235},{"style":176},[2236],{"type":47,"value":1164},{"type":41,"tag":163,"props":2238,"children":2239},{"style":182},[2240],{"type":47,"value":1169},{"type":41,"tag":163,"props":2242,"children":2243},{"style":182},[2244],{"type":47,"value":1174},{"type":41,"tag":50,"props":2246,"children":2247},{},[2248],{"type":47,"value":1179},{"type":41,"tag":153,"props":2250,"children":2252},{"className":2251,"code":1184,"language":47},[1183],[2253],{"type":41,"tag":56,"props":2254,"children":2255},{"__ignoreMap":7},[2256],{"type":47,"value":1184},{"type":41,"tag":50,"props":2258,"children":2259},{},[2260,2261,2266],{"type":47,"value":1194},{"type":41,"tag":56,"props":2262,"children":2264},{"className":2263},[],[2265],{"type":47,"value":421},{"type":47,"value":1201},{"type":41,"tag":425,"props":2268,"children":2269},{},[2270],{"type":41,"tag":50,"props":2271,"children":2272},{},[2273,2283,2284,2289],{"type":41,"tag":112,"props":2274,"children":2275},{},[2276,2277,2282],{"type":47,"value":1212},{"type":41,"tag":56,"props":2278,"children":2280},{"className":2279},[],[2281],{"type":47,"value":1218},{"type":47,"value":1220},{"type":47,"value":1222},{"type":41,"tag":56,"props":2285,"children":2287},{"className":2286},[],[2288],{"type":47,"value":1228},{"type":47,"value":1230},{"type":41,"tag":42,"props":2291,"children":2292},{"id":1233},[2293],{"type":47,"value":1236},{"type":41,"tag":50,"props":2295,"children":2296},{},[2297,2298,2303],{"type":47,"value":1241},{"type":41,"tag":56,"props":2299,"children":2301},{"className":2300},[],[2302],{"type":47,"value":61},{"type":47,"value":1248},{"type":41,"tag":1250,"props":2305,"children":2306},{},[2307],{"type":47,"value":1254},{"title":7,"searchDepth":18,"depth":18,"links":2309},[2310,2311,2312,2318],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":2313},[2314,2315,2316,2317],{"id":148,"depth":278,"text":151},{"id":217,"depth":278,"text":1263},{"id":946,"depth":278,"text":1265},{"id":1127,"depth":278,"text":1130},{"id":1233,"depth":18,"text":1236},[2320,2874,3919,4998,6386],{"_path":2321,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2322,"description":2323,"date":10,"readingTime":292,"category":12,"tags":2324,"difficulty":17,"module":5,"step":166,"journeys":2325,"learnMore":2326,"stepGif":32,"author":2336,"body":2337,"_type":1268,"_id":2871,"_source":1270,"_file":2872,"_stem":2873,"_extension":1273},"/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,16],[20,21],[2327,2330,2333],{"label":2328,"url":2329},"Reference project: contoso-dbt on GitHub","https://github.com/arsalann/data_playground/tree/main/contoso-dbt",{"label":2331,"url":2332},"dbt + BigQuery profile setup","https://docs.getdbt.com/docs/core/connect-data-platform/bigquery-setup",{"label":2334,"url":2335},"Generating custom schema names in dbt","https://docs.getdbt.com/docs/build/custom-schemas",{"name":34,"role":35,"image":36},{"type":38,"children":2338,"toc":2861},[2339,2343,2348,2352,2372,2394,2410,2414,2420,2432,2441,2453,2459,2464,2606,2642,2648,2653,2672,2677,2718,2723,2837,2842,2846,2857],{"type":41,"tag":42,"props":2340,"children":2341},{"id":44},[2342],{"type":47,"value":48},{"type":41,"tag":50,"props":2344,"children":2345},{},[2346],{"type":47,"value":2347},"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":41,"tag":42,"props":2349,"children":2350},{"id":82},[2351],{"type":47,"value":85},{"type":41,"tag":50,"props":2353,"children":2354},{},[2355,2357,2362,2364,2370],{"type":47,"value":2356},"The Bruin context layer is ",{"type":41,"tag":112,"props":2358,"children":2359},{},[2360],{"type":47,"value":2361},"documentation-only",{"type":47,"value":2363}," 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":41,"tag":56,"props":2365,"children":2367},{"className":2366},[],[2368],{"type":47,"value":2369},"dbt build",{"type":47,"value":2371}," green first, then come back.",{"type":41,"tag":50,"props":2373,"children":2374},{},[2375,2377,2385,2387,2392],{"type":47,"value":2376},"If you don't already have a project to follow along with, the ",{"type":41,"tag":2378,"props":2379,"children":2382},"a",{"href":2329,"rel":2380},[2381],"nofollow",[2383],{"type":47,"value":2384},"contoso-dbt reference repo",{"type":47,"value":2386}," 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":41,"tag":56,"props":2388,"children":2390},{"className":2389},[],[2391],{"type":47,"value":61},{"type":47,"value":2393}," directory holds the Bruin layer we'll build in the next steps.",{"type":41,"tag":425,"props":2395,"children":2396},{},[2397],{"type":41,"tag":50,"props":2398,"children":2399},{},[2400,2402,2408],{"type":47,"value":2401},"If you already have a dbt project building cleanly into a warehouse, skim this page and skip ahead to ",{"type":41,"tag":2378,"props":2403,"children":2405},{"href":2404},"/learn/dbt-bruin-analyst/isolated-context",[2406],{"type":47,"value":2407},"Step 2: Create an Isolated Bruin Context",{"type":47,"value":2409},".",{"type":41,"tag":42,"props":2411,"children":2412},{"id":128},[2413],{"type":47,"value":131},{"type":41,"tag":146,"props":2415,"children":2417},{"id":2416},"reference-project-layout",[2418],{"type":47,"value":2419},"Reference project layout",{"type":41,"tag":50,"props":2421,"children":2422},{},[2423,2425,2430],{"type":47,"value":2424},"The reference project ends up looking like this. The ",{"type":41,"tag":56,"props":2426,"children":2428},{"className":2427},[],[2429],{"type":47,"value":61},{"type":47,"value":2431}," directory is what this module produces — everything else is dbt prerequisites:",{"type":41,"tag":153,"props":2433,"children":2436},{"className":2434,"code":2435,"language":47},[1183],"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",[2437],{"type":41,"tag":56,"props":2438,"children":2439},{"__ignoreMap":7},[2440],{"type":47,"value":2435},{"type":41,"tag":50,"props":2442,"children":2443},{},[2444,2446,2451],{"type":47,"value":2445},"The end state is ",{"type":41,"tag":112,"props":2447,"children":2448},{},[2449],{"type":47,"value":2450},"40 YAMLs",{"type":47,"value":2452}," — one per materialized table — covering raw ingest, staging, and reports.",{"type":41,"tag":146,"props":2454,"children":2456},{"id":2455},"what-the-dbt-half-looks-like",[2457],{"type":47,"value":2458},"What the dbt half looks like",{"type":41,"tag":50,"props":2460,"children":2461},{},[2462],{"type":47,"value":2463},"The contoso-dbt project uses a fairly standard dbt-on-BigQuery setup. If yours looks similar, you're ready:",{"type":41,"tag":2465,"props":2466,"children":2467},"ul",{},[2468,2504,2524,2544,2563,2596],{"type":41,"tag":2469,"props":2470,"children":2471},"li",{},[2472,2474,2479,2481,2487,2489,2494,2496,2502],{"type":47,"value":2473},"A ",{"type":41,"tag":56,"props":2475,"children":2477},{"className":2476},[],[2478],{"type":47,"value":142},{"type":47,"value":2480}," and a ",{"type":41,"tag":56,"props":2482,"children":2484},{"className":2483},[],[2485],{"type":47,"value":2486},"profiles.yml",{"type":47,"value":2488}," (the reference uses OAuth via ",{"type":41,"tag":56,"props":2490,"children":2492},{"className":2491},[],[2493],{"type":47,"value":421},{"type":47,"value":2495},", location ",{"type":41,"tag":56,"props":2497,"children":2499},{"className":2498},[],[2500],{"type":47,"value":2501},"EU",{"type":47,"value":2503},")",{"type":41,"tag":2469,"props":2505,"children":2506},{},[2507,2508,2514,2516,2522],{"type":47,"value":2473},{"type":41,"tag":56,"props":2509,"children":2511},{"className":2510},[],[2512],{"type":47,"value":2513},"models/sources.yml",{"type":47,"value":2515}," declaring raw tables loaded by dlt into a ",{"type":41,"tag":56,"props":2517,"children":2519},{"className":2518},[],[2520],{"type":47,"value":2521},"*_raw",{"type":47,"value":2523}," schema",{"type":41,"tag":2469,"props":2525,"children":2526},{},[2527,2529,2535,2537,2543],{"type":47,"value":2528},"Staging models (",{"type":41,"tag":56,"props":2530,"children":2532},{"className":2531},[],[2533],{"type":47,"value":2534},"stg_*.sql",{"type":47,"value":2536},") materialized into a ",{"type":41,"tag":56,"props":2538,"children":2540},{"className":2539},[],[2541],{"type":47,"value":2542},"*_staging",{"type":47,"value":2523},{"type":41,"tag":2469,"props":2545,"children":2546},{},[2547,2549,2555,2556,2562],{"type":47,"value":2548},"Report / mart models (",{"type":41,"tag":56,"props":2550,"children":2552},{"className":2551},[],[2553],{"type":47,"value":2554},"rpt_*.sql",{"type":47,"value":2536},{"type":41,"tag":56,"props":2557,"children":2559},{"className":2558},[],[2560],{"type":47,"value":2561},"*_reports",{"type":47,"value":2523},{"type":41,"tag":2469,"props":2564,"children":2565},{},[2566,2567,2573,2575,2581,2583,2589,2590],{"type":47,"value":2473},{"type":41,"tag":56,"props":2568,"children":2570},{"className":2569},[],[2571],{"type":47,"value":2572},"generate_schema_name.sql",{"type":47,"value":2574}," macro so a ",{"type":41,"tag":56,"props":2576,"children":2578},{"className":2577},[],[2579],{"type":47,"value":2580},"+schema: staging",{"type":47,"value":2582}," config lands as ",{"type":41,"tag":56,"props":2584,"children":2586},{"className":2585},[],[2587],{"type":47,"value":2588},"contoso_dbt_staging",{"type":47,"value":445},{"type":41,"tag":56,"props":2591,"children":2593},{"className":2592},[],[2594],{"type":47,"value":2595},"contoso_dbt_contoso_dbt_staging",{"type":41,"tag":2469,"props":2597,"children":2598},{},[2599,2604],{"type":41,"tag":56,"props":2600,"children":2602},{"className":2601},[],[2603],{"type":47,"value":2369},{"type":47,"value":2605}," runs cleanly and the tables exist in the warehouse",{"type":41,"tag":425,"props":2607,"children":2608},{},[2609],{"type":41,"tag":50,"props":2610,"children":2611},{},[2612,2617,2619,2625,2627,2633,2635,2640],{"type":41,"tag":112,"props":2613,"children":2614},{},[2615],{"type":47,"value":2616},"Heads up on schema naming.",{"type":47,"value":2618}," dbt's default ",{"type":41,"tag":56,"props":2620,"children":2622},{"className":2621},[],[2623],{"type":47,"value":2624},"generate_schema_name",{"type":47,"value":2626}," macro concatenates the target schema with the ",{"type":41,"tag":56,"props":2628,"children":2630},{"className":2629},[],[2631],{"type":47,"value":2632},"+schema",{"type":47,"value":2634}," config, which is rarely what you want. The reference project overrides it to use the ",{"type":41,"tag":56,"props":2636,"children":2638},{"className":2637},[],[2639],{"type":47,"value":2632},{"type":47,"value":2641}," value directly. If your final schema names look doubled-up, this is usually why.",{"type":41,"tag":146,"props":2643,"children":2645},{"id":2644},"verify-the-warehouse-has-data",[2646],{"type":47,"value":2647},"Verify the warehouse has data",{"type":41,"tag":50,"props":2649,"children":2650},{},[2651],{"type":47,"value":2652},"Before moving to the Bruin steps, make sure your dbt-built tables actually exist. From your dbt project root:",{"type":41,"tag":153,"props":2654,"children":2656},{"className":155,"code":2655,"language":157,"meta":7,"style":7},"dbt build\n",[2657],{"type":41,"tag":56,"props":2658,"children":2659},{"__ignoreMap":7},[2660],{"type":41,"tag":163,"props":2661,"children":2662},{"class":165,"line":166},[2663,2667],{"type":41,"tag":163,"props":2664,"children":2665},{"style":170},[2666],{"type":47,"value":15},{"type":41,"tag":163,"props":2668,"children":2669},{"style":182},[2670],{"type":47,"value":2671}," build\n",{"type":41,"tag":50,"props":2673,"children":2674},{},[2675],{"type":47,"value":2676},"Then spot-check the warehouse. For BigQuery:",{"type":41,"tag":153,"props":2678,"children":2680},{"className":155,"code":2679,"language":157,"meta":7,"style":7},"bq ls bruin-playground-arsalan:contoso_dbt_staging\nbq ls bruin-playground-arsalan:contoso_dbt_reports\n",[2681],{"type":41,"tag":56,"props":2682,"children":2683},{"__ignoreMap":7},[2684,2702],{"type":41,"tag":163,"props":2685,"children":2686},{"class":165,"line":166},[2687,2692,2697],{"type":41,"tag":163,"props":2688,"children":2689},{"style":170},[2690],{"type":47,"value":2691},"bq",{"type":41,"tag":163,"props":2693,"children":2694},{"style":182},[2695],{"type":47,"value":2696}," ls",{"type":41,"tag":163,"props":2698,"children":2699},{"style":182},[2700],{"type":47,"value":2701}," bruin-playground-arsalan:contoso_dbt_staging\n",{"type":41,"tag":163,"props":2703,"children":2704},{"class":165,"line":18},[2705,2709,2713],{"type":41,"tag":163,"props":2706,"children":2707},{"style":170},[2708],{"type":47,"value":2691},{"type":41,"tag":163,"props":2710,"children":2711},{"style":182},[2712],{"type":47,"value":2696},{"type":41,"tag":163,"props":2714,"children":2715},{"style":182},[2716],{"type":47,"value":2717}," bruin-playground-arsalan:contoso_dbt_reports\n",{"type":41,"tag":50,"props":2719,"children":2720},{},[2721],{"type":47,"value":2722},"For Postgres / Redshift:",{"type":41,"tag":153,"props":2724,"children":2728},{"className":2725,"code":2726,"language":2727,"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",[2729],{"type":41,"tag":56,"props":2730,"children":2731},{"__ignoreMap":7},[2732,2746,2768,2810],{"type":41,"tag":163,"props":2733,"children":2734},{"class":165,"line":166},[2735,2741],{"type":41,"tag":163,"props":2736,"children":2738},{"style":2737},"--shiki-default:#F97583",[2739],{"type":47,"value":2740},"SELECT",{"type":41,"tag":163,"props":2742,"children":2743},{"style":267},[2744],{"type":47,"value":2745}," table_schema, table_name\n",{"type":41,"tag":163,"props":2747,"children":2748},{"class":165,"line":18},[2749,2754,2759,2763],{"type":41,"tag":163,"props":2750,"children":2751},{"style":2737},[2752],{"type":47,"value":2753},"FROM",{"type":41,"tag":163,"props":2755,"children":2756},{"style":176},[2757],{"type":47,"value":2758}," information_schema",{"type":41,"tag":163,"props":2760,"children":2761},{"style":267},[2762],{"type":47,"value":2409},{"type":41,"tag":163,"props":2764,"children":2765},{"style":176},[2766],{"type":47,"value":2767},"tables\n",{"type":41,"tag":163,"props":2769,"children":2770},{"class":165,"line":278},[2771,2776,2781,2786,2791,2796,2800,2805],{"type":41,"tag":163,"props":2772,"children":2773},{"style":2737},[2774],{"type":47,"value":2775},"WHERE",{"type":41,"tag":163,"props":2777,"children":2778},{"style":267},[2779],{"type":47,"value":2780}," table_schema ",{"type":41,"tag":163,"props":2782,"children":2783},{"style":2737},[2784],{"type":47,"value":2785},"IN",{"type":41,"tag":163,"props":2787,"children":2788},{"style":267},[2789],{"type":47,"value":2790}," (",{"type":41,"tag":163,"props":2792,"children":2793},{"style":182},[2794],{"type":47,"value":2795},"'contoso_dbt_staging'",{"type":41,"tag":163,"props":2797,"children":2798},{"style":267},[2799],{"type":47,"value":198},{"type":41,"tag":163,"props":2801,"children":2802},{"style":182},[2803],{"type":47,"value":2804},"'contoso_dbt_reports'",{"type":41,"tag":163,"props":2806,"children":2807},{"style":267},[2808],{"type":47,"value":2809},")\n",{"type":41,"tag":163,"props":2811,"children":2812},{"class":165,"line":292},[2813,2818,2823,2827,2832],{"type":41,"tag":163,"props":2814,"children":2815},{"style":2737},[2816],{"type":47,"value":2817},"ORDER BY",{"type":41,"tag":163,"props":2819,"children":2820},{"style":176},[2821],{"type":47,"value":2822}," 1",{"type":41,"tag":163,"props":2824,"children":2825},{"style":267},[2826],{"type":47,"value":198},{"type":41,"tag":163,"props":2828,"children":2829},{"style":176},[2830],{"type":47,"value":2831},"2",{"type":41,"tag":163,"props":2833,"children":2834},{"style":267},[2835],{"type":47,"value":2836},";\n",{"type":41,"tag":50,"props":2838,"children":2839},{},[2840],{"type":47,"value":2841},"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":41,"tag":42,"props":2843,"children":2844},{"id":1233},[2845],{"type":47,"value":1236},{"type":41,"tag":50,"props":2847,"children":2848},{},[2849,2851,2856],{"type":47,"value":2850},"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":41,"tag":56,"props":2852,"children":2854},{"className":2853},[],[2855],{"type":47,"value":103},{"type":47,"value":2409},{"type":41,"tag":1250,"props":2858,"children":2859},{},[2860],{"type":47,"value":1254},{"title":7,"searchDepth":18,"depth":18,"links":2862},[2863,2864,2865,2870],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":2866},[2867,2868,2869],{"id":2416,"depth":278,"text":2419},{"id":2455,"depth":278,"text":2458},{"id":2644,"depth":278,"text":2647},{"id":1233,"depth":18,"text":1236},"content:tutorials:dbt-bruin-analyst:dbt-prerequisite.md","tutorials/dbt-bruin-analyst/dbt-prerequisite.md","tutorials/dbt-bruin-analyst/dbt-prerequisite",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":2875,"difficulty":17,"module":5,"step":18,"journeys":2876,"learnMore":2877,"stepGif":32,"author":2881,"body":2882,"_type":1268,"_id":1269,"_source":1270,"_file":1271,"_stem":1272,"_extension":1273},[14,15,16],[20,21],[2878,2879,2880],{"label":24,"url":25},{"label":27,"url":28},{"label":30,"url":31},{"name":34,"role":35,"image":36},{"type":38,"children":2883,"toc":3908},[2884,2888,2910,2914,2930,2945,2949,2959,2963,2984,3006,3015,3025,3161,3176,3199,3228,3232,3376,3505,3649,3658,3668,3752,3786,3804,3808,3812,3845,3849,3857,3867,3890,3894,3904],{"type":41,"tag":42,"props":2885,"children":2886},{"id":44},[2887],{"type":47,"value":48},{"type":41,"tag":50,"props":2889,"children":2890},{},[2891,2892,2897,2898,2903,2904,2909],{"type":47,"value":54},{"type":41,"tag":56,"props":2893,"children":2895},{"className":2894},[],[2896],{"type":47,"value":61},{"type":47,"value":63},{"type":41,"tag":56,"props":2899,"children":2901},{"className":2900},[],[2902],{"type":47,"value":69},{"type":47,"value":71},{"type":41,"tag":56,"props":2905,"children":2907},{"className":2906},[],[2908],{"type":47,"value":77},{"type":47,"value":79},{"type":41,"tag":42,"props":2911,"children":2912},{"id":82},[2913],{"type":47,"value":85},{"type":41,"tag":50,"props":2915,"children":2916},{},[2917,2918,2923,2924,2929],{"type":47,"value":90},{"type":41,"tag":56,"props":2919,"children":2921},{"className":2920},[],[2922],{"type":47,"value":69},{"type":47,"value":97},{"type":41,"tag":56,"props":2925,"children":2927},{"className":2926},[],[2928],{"type":47,"value":103},{"type":47,"value":105},{"type":41,"tag":50,"props":2931,"children":2932},{},[2933,2934,2938,2939,2944],{"type":47,"value":110},{"type":41,"tag":112,"props":2935,"children":2936},{},[2937],{"type":47,"value":116},{"type":47,"value":118},{"type":41,"tag":56,"props":2940,"children":2942},{"className":2941},[],[2943],{"type":47,"value":77},{"type":47,"value":125},{"type":41,"tag":42,"props":2946,"children":2947},{"id":128},[2948],{"type":47,"value":131},{"type":41,"tag":50,"props":2950,"children":2951},{},[2952,2953,2958],{"type":47,"value":136},{"type":41,"tag":56,"props":2954,"children":2956},{"className":2955},[],[2957],{"type":47,"value":142},{"type":47,"value":144},{"type":41,"tag":146,"props":2960,"children":2961},{"id":148},[2962],{"type":47,"value":151},{"type":41,"tag":153,"props":2964,"children":2965},{"className":155,"code":156,"language":157,"meta":7,"style":7},[2966],{"type":41,"tag":56,"props":2967,"children":2968},{"__ignoreMap":7},[2969],{"type":41,"tag":163,"props":2970,"children":2971},{"class":165,"line":166},[2972,2976,2980],{"type":41,"tag":163,"props":2973,"children":2974},{"style":170},[2975],{"type":47,"value":173},{"type":41,"tag":163,"props":2977,"children":2978},{"style":176},[2979],{"type":47,"value":179},{"type":41,"tag":163,"props":2981,"children":2982},{"style":182},[2983],{"type":47,"value":185},{"type":41,"tag":50,"props":2985,"children":2986},{},[2987,2988,2993,2994,2999,3000,3005],{"type":47,"value":190},{"type":41,"tag":56,"props":2989,"children":2991},{"className":2990},[],[2992],{"type":47,"value":196},{"type":47,"value":198},{"type":41,"tag":56,"props":2995,"children":2997},{"className":2996},[],[2998],{"type":47,"value":204},{"type":47,"value":206},{"type":41,"tag":56,"props":3001,"children":3003},{"className":3002},[],[3004],{"type":47,"value":212},{"type":47,"value":214},{"type":41,"tag":146,"props":3007,"children":3008},{"id":217},[3009,3010],{"type":47,"value":220},{"type":41,"tag":56,"props":3011,"children":3013},{"className":3012},[],[3014],{"type":47,"value":69},{"type":41,"tag":50,"props":3016,"children":3017},{},[3018,3019,3024],{"type":47,"value":230},{"type":41,"tag":56,"props":3020,"children":3022},{"className":3021},[],[3023],{"type":47,"value":196},{"type":47,"value":237},{"type":41,"tag":153,"props":3026,"children":3027},{"className":240,"code":241,"language":242,"meta":7,"style":7},[3028],{"type":41,"tag":56,"props":3029,"children":3030},{"__ignoreMap":7},[3031,3038,3053,3064,3075,3086,3097,3116,3131,3146],{"type":41,"tag":163,"props":3032,"children":3033},{"class":165,"line":166},[3034],{"type":41,"tag":163,"props":3035,"children":3036},{"style":252},[3037],{"type":47,"value":255},{"type":41,"tag":163,"props":3039,"children":3040},{"class":165,"line":18},[3041,3045,3049],{"type":41,"tag":163,"props":3042,"children":3043},{"style":261},[3044],{"type":47,"value":264},{"type":41,"tag":163,"props":3046,"children":3047},{"style":267},[3048],{"type":47,"value":270},{"type":41,"tag":163,"props":3050,"children":3051},{"style":182},[3052],{"type":47,"value":275},{"type":41,"tag":163,"props":3054,"children":3055},{"class":165,"line":278},[3056,3060],{"type":41,"tag":163,"props":3057,"children":3058},{"style":261},[3059],{"type":47,"value":284},{"type":41,"tag":163,"props":3061,"children":3062},{"style":267},[3063],{"type":47,"value":289},{"type":41,"tag":163,"props":3065,"children":3066},{"class":165,"line":292},[3067,3071],{"type":41,"tag":163,"props":3068,"children":3069},{"style":261},[3070],{"type":47,"value":298},{"type":41,"tag":163,"props":3072,"children":3073},{"style":267},[3074],{"type":47,"value":289},{"type":41,"tag":163,"props":3076,"children":3077},{"class":165,"line":305},[3078,3082],{"type":41,"tag":163,"props":3079,"children":3080},{"style":261},[3081],{"type":47,"value":311},{"type":41,"tag":163,"props":3083,"children":3084},{"style":267},[3085],{"type":47,"value":289},{"type":41,"tag":163,"props":3087,"children":3088},{"class":165,"line":11},[3089,3093],{"type":41,"tag":163,"props":3090,"children":3091},{"style":261},[3092],{"type":47,"value":323},{"type":41,"tag":163,"props":3094,"children":3095},{"style":267},[3096],{"type":47,"value":289},{"type":41,"tag":163,"props":3098,"children":3099},{"class":165,"line":330},[3100,3104,3108,3112],{"type":41,"tag":163,"props":3101,"children":3102},{"style":267},[3103],{"type":47,"value":336},{"type":41,"tag":163,"props":3105,"children":3106},{"style":261},[3107],{"type":47,"value":341},{"type":41,"tag":163,"props":3109,"children":3110},{"style":267},[3111],{"type":47,"value":270},{"type":41,"tag":163,"props":3113,"children":3114},{"style":182},[3115],{"type":47,"value":350},{"type":41,"tag":163,"props":3117,"children":3118},{"class":165,"line":353},[3119,3123,3127],{"type":41,"tag":163,"props":3120,"children":3121},{"style":261},[3122],{"type":47,"value":359},{"type":41,"tag":163,"props":3124,"children":3125},{"style":267},[3126],{"type":47,"value":270},{"type":41,"tag":163,"props":3128,"children":3129},{"style":182},[3130],{"type":47,"value":368},{"type":41,"tag":163,"props":3132,"children":3133},{"class":165,"line":371},[3134,3138,3142],{"type":41,"tag":163,"props":3135,"children":3136},{"style":261},[3137],{"type":47,"value":377},{"type":41,"tag":163,"props":3139,"children":3140},{"style":267},[3141],{"type":47,"value":270},{"type":41,"tag":163,"props":3143,"children":3144},{"style":182},[3145],{"type":47,"value":386},{"type":41,"tag":163,"props":3147,"children":3148},{"class":165,"line":389},[3149,3153,3157],{"type":41,"tag":163,"props":3150,"children":3151},{"style":261},[3152],{"type":47,"value":395},{"type":41,"tag":163,"props":3154,"children":3155},{"style":267},[3156],{"type":47,"value":270},{"type":41,"tag":163,"props":3158,"children":3159},{"style":176},[3160],{"type":47,"value":404},{"type":41,"tag":50,"props":3162,"children":3163},{},[3164,3165,3169,3170,3175],{"type":47,"value":409},{"type":41,"tag":112,"props":3166,"children":3167},{},[3168],{"type":47,"value":30},{"type":47,"value":415},{"type":41,"tag":56,"props":3171,"children":3173},{"className":3172},[],[3174],{"type":47,"value":421},{"type":47,"value":423},{"type":41,"tag":425,"props":3177,"children":3178},{},[3179],{"type":41,"tag":50,"props":3180,"children":3181},{},[3182,3186,3187,3192,3193,3198],{"type":41,"tag":112,"props":3183,"children":3184},{},[3185],{"type":47,"value":435},{"type":47,"value":437},{"type":41,"tag":56,"props":3188,"children":3190},{"className":3189},[],[3191],{"type":47,"value":443},{"type":47,"value":445},{"type":41,"tag":56,"props":3194,"children":3196},{"className":3195},[],[3197],{"type":47,"value":451},{"type":47,"value":453},{"type":41,"tag":425,"props":3200,"children":3201},{},[3202],{"type":41,"tag":50,"props":3203,"children":3204},{},[3205,3209,3210,3215,3216,3221,3222,3227],{"type":41,"tag":112,"props":3206,"children":3207},{},[3208],{"type":47,"value":464},{"type":47,"value":466},{"type":41,"tag":56,"props":3211,"children":3213},{"className":3212},[],[3214],{"type":47,"value":103},{"type":47,"value":473},{"type":41,"tag":56,"props":3217,"children":3219},{"className":3218},[],[3220],{"type":47,"value":69},{"type":47,"value":480},{"type":41,"tag":56,"props":3223,"children":3225},{"className":3224},[],[3226],{"type":47,"value":486},{"type":47,"value":488},{"type":41,"tag":50,"props":3229,"children":3230},{},[3231],{"type":47,"value":493},{"type":41,"tag":153,"props":3233,"children":3234},{"className":240,"code":496,"language":242,"meta":7,"style":7},[3235],{"type":41,"tag":56,"props":3236,"children":3237},{"__ignoreMap":7},[3238,3245,3256,3267,3286,3301,3316,3331,3346,3361],{"type":41,"tag":163,"props":3239,"children":3240},{"class":165,"line":166},[3241],{"type":41,"tag":163,"props":3242,"children":3243},{"style":252},[3244],{"type":47,"value":508},{"type":41,"tag":163,"props":3246,"children":3247},{"class":165,"line":18},[3248,3252],{"type":41,"tag":163,"props":3249,"children":3250},{"style":261},[3251],{"type":47,"value":516},{"type":41,"tag":163,"props":3253,"children":3254},{"style":267},[3255],{"type":47,"value":289},{"type":41,"tag":163,"props":3257,"children":3258},{"class":165,"line":278},[3259,3263],{"type":41,"tag":163,"props":3260,"children":3261},{"style":261},[3262],{"type":47,"value":528},{"type":41,"tag":163,"props":3264,"children":3265},{"style":267},[3266],{"type":47,"value":289},{"type":41,"tag":163,"props":3268,"children":3269},{"class":165,"line":292},[3270,3274,3278,3282],{"type":41,"tag":163,"props":3271,"children":3272},{"style":267},[3273],{"type":47,"value":540},{"type":41,"tag":163,"props":3275,"children":3276},{"style":261},[3277],{"type":47,"value":341},{"type":41,"tag":163,"props":3279,"children":3280},{"style":267},[3281],{"type":47,"value":270},{"type":41,"tag":163,"props":3283,"children":3284},{"style":182},[3285],{"type":47,"value":553},{"type":41,"tag":163,"props":3287,"children":3288},{"class":165,"line":305},[3289,3293,3297],{"type":41,"tag":163,"props":3290,"children":3291},{"style":261},[3292],{"type":47,"value":561},{"type":41,"tag":163,"props":3294,"children":3295},{"style":267},[3296],{"type":47,"value":270},{"type":41,"tag":163,"props":3298,"children":3299},{"style":182},[3300],{"type":47,"value":570},{"type":41,"tag":163,"props":3302,"children":3303},{"class":165,"line":11},[3304,3308,3312],{"type":41,"tag":163,"props":3305,"children":3306},{"style":261},[3307],{"type":47,"value":578},{"type":41,"tag":163,"props":3309,"children":3310},{"style":267},[3311],{"type":47,"value":270},{"type":41,"tag":163,"props":3313,"children":3314},{"style":176},[3315],{"type":47,"value":587},{"type":41,"tag":163,"props":3317,"children":3318},{"class":165,"line":330},[3319,3323,3327],{"type":41,"tag":163,"props":3320,"children":3321},{"style":261},[3322],{"type":47,"value":595},{"type":41,"tag":163,"props":3324,"children":3325},{"style":267},[3326],{"type":47,"value":270},{"type":41,"tag":163,"props":3328,"children":3329},{"style":182},[3330],{"type":47,"value":604},{"type":41,"tag":163,"props":3332,"children":3333},{"class":165,"line":353},[3334,3338,3342],{"type":41,"tag":163,"props":3335,"children":3336},{"style":261},[3337],{"type":47,"value":612},{"type":41,"tag":163,"props":3339,"children":3340},{"style":267},[3341],{"type":47,"value":270},{"type":41,"tag":163,"props":3343,"children":3344},{"style":182},[3345],{"type":47,"value":621},{"type":41,"tag":163,"props":3347,"children":3348},{"class":165,"line":371},[3349,3353,3357],{"type":41,"tag":163,"props":3350,"children":3351},{"style":261},[3352],{"type":47,"value":629},{"type":41,"tag":163,"props":3354,"children":3355},{"style":267},[3356],{"type":47,"value":270},{"type":41,"tag":163,"props":3358,"children":3359},{"style":182},[3360],{"type":47,"value":638},{"type":41,"tag":163,"props":3362,"children":3363},{"class":165,"line":389},[3364,3368,3372],{"type":41,"tag":163,"props":3365,"children":3366},{"style":261},[3367],{"type":47,"value":646},{"type":41,"tag":163,"props":3369,"children":3370},{"style":267},[3371],{"type":47,"value":270},{"type":41,"tag":163,"props":3373,"children":3374},{"style":182},[3375],{"type":47,"value":655},{"type":41,"tag":153,"props":3377,"children":3378},{"className":240,"code":658,"language":242,"meta":7,"style":7},[3379],{"type":41,"tag":56,"props":3380,"children":3381},{"__ignoreMap":7},[3382,3389,3400,3411,3430,3445,3460,3475,3490],{"type":41,"tag":163,"props":3383,"children":3384},{"class":165,"line":166},[3385],{"type":41,"tag":163,"props":3386,"children":3387},{"style":252},[3388],{"type":47,"value":670},{"type":41,"tag":163,"props":3390,"children":3391},{"class":165,"line":18},[3392,3396],{"type":41,"tag":163,"props":3393,"children":3394},{"style":261},[3395],{"type":47,"value":516},{"type":41,"tag":163,"props":3397,"children":3398},{"style":267},[3399],{"type":47,"value":289},{"type":41,"tag":163,"props":3401,"children":3402},{"class":165,"line":278},[3403,3407],{"type":41,"tag":163,"props":3404,"children":3405},{"style":261},[3406],{"type":47,"value":689},{"type":41,"tag":163,"props":3408,"children":3409},{"style":267},[3410],{"type":47,"value":289},{"type":41,"tag":163,"props":3412,"children":3413},{"class":165,"line":292},[3414,3418,3422,3426],{"type":41,"tag":163,"props":3415,"children":3416},{"style":267},[3417],{"type":47,"value":540},{"type":41,"tag":163,"props":3419,"children":3420},{"style":261},[3421],{"type":47,"value":341},{"type":41,"tag":163,"props":3423,"children":3424},{"style":267},[3425],{"type":47,"value":270},{"type":41,"tag":163,"props":3427,"children":3428},{"style":182},[3429],{"type":47,"value":713},{"type":41,"tag":163,"props":3431,"children":3432},{"class":165,"line":305},[3433,3437,3441],{"type":41,"tag":163,"props":3434,"children":3435},{"style":261},[3436],{"type":47,"value":561},{"type":41,"tag":163,"props":3438,"children":3439},{"style":267},[3440],{"type":47,"value":270},{"type":41,"tag":163,"props":3442,"children":3443},{"style":182},[3444],{"type":47,"value":729},{"type":41,"tag":163,"props":3446,"children":3447},{"class":165,"line":11},[3448,3452,3456],{"type":41,"tag":163,"props":3449,"children":3450},{"style":261},[3451],{"type":47,"value":578},{"type":41,"tag":163,"props":3453,"children":3454},{"style":267},[3455],{"type":47,"value":270},{"type":41,"tag":163,"props":3457,"children":3458},{"style":176},[3459],{"type":47,"value":745},{"type":41,"tag":163,"props":3461,"children":3462},{"class":165,"line":330},[3463,3467,3471],{"type":41,"tag":163,"props":3464,"children":3465},{"style":261},[3466],{"type":47,"value":595},{"type":41,"tag":163,"props":3468,"children":3469},{"style":267},[3470],{"type":47,"value":270},{"type":41,"tag":163,"props":3472,"children":3473},{"style":182},[3474],{"type":47,"value":604},{"type":41,"tag":163,"props":3476,"children":3477},{"class":165,"line":353},[3478,3482,3486],{"type":41,"tag":163,"props":3479,"children":3480},{"style":261},[3481],{"type":47,"value":612},{"type":41,"tag":163,"props":3483,"children":3484},{"style":267},[3485],{"type":47,"value":270},{"type":41,"tag":163,"props":3487,"children":3488},{"style":182},[3489],{"type":47,"value":776},{"type":41,"tag":163,"props":3491,"children":3492},{"class":165,"line":371},[3493,3497,3501],{"type":41,"tag":163,"props":3494,"children":3495},{"style":261},[3496],{"type":47,"value":629},{"type":41,"tag":163,"props":3498,"children":3499},{"style":267},[3500],{"type":47,"value":270},{"type":41,"tag":163,"props":3502,"children":3503},{"style":182},[3504],{"type":47,"value":638},{"type":41,"tag":153,"props":3506,"children":3507},{"className":240,"code":794,"language":242,"meta":7,"style":7},[3508],{"type":41,"tag":56,"props":3509,"children":3510},{"__ignoreMap":7},[3511,3518,3529,3540,3559,3574,3589,3604,3619,3634],{"type":41,"tag":163,"props":3512,"children":3513},{"class":165,"line":166},[3514],{"type":41,"tag":163,"props":3515,"children":3516},{"style":252},[3517],{"type":47,"value":806},{"type":41,"tag":163,"props":3519,"children":3520},{"class":165,"line":18},[3521,3525],{"type":41,"tag":163,"props":3522,"children":3523},{"style":261},[3524],{"type":47,"value":516},{"type":41,"tag":163,"props":3526,"children":3527},{"style":267},[3528],{"type":47,"value":289},{"type":41,"tag":163,"props":3530,"children":3531},{"class":165,"line":278},[3532,3536],{"type":41,"tag":163,"props":3533,"children":3534},{"style":261},[3535],{"type":47,"value":825},{"type":41,"tag":163,"props":3537,"children":3538},{"style":267},[3539],{"type":47,"value":289},{"type":41,"tag":163,"props":3541,"children":3542},{"class":165,"line":292},[3543,3547,3551,3555],{"type":41,"tag":163,"props":3544,"children":3545},{"style":267},[3546],{"type":47,"value":540},{"type":41,"tag":163,"props":3548,"children":3549},{"style":261},[3550],{"type":47,"value":341},{"type":41,"tag":163,"props":3552,"children":3553},{"style":267},[3554],{"type":47,"value":270},{"type":41,"tag":163,"props":3556,"children":3557},{"style":182},[3558],{"type":47,"value":849},{"type":41,"tag":163,"props":3560,"children":3561},{"class":165,"line":305},[3562,3566,3570],{"type":41,"tag":163,"props":3563,"children":3564},{"style":261},[3565],{"type":47,"value":561},{"type":41,"tag":163,"props":3567,"children":3568},{"style":267},[3569],{"type":47,"value":270},{"type":41,"tag":163,"props":3571,"children":3572},{"style":182},[3573],{"type":47,"value":865},{"type":41,"tag":163,"props":3575,"children":3576},{"class":165,"line":11},[3577,3581,3585],{"type":41,"tag":163,"props":3578,"children":3579},{"style":261},[3580],{"type":47,"value":578},{"type":41,"tag":163,"props":3582,"children":3583},{"style":267},[3584],{"type":47,"value":270},{"type":41,"tag":163,"props":3586,"children":3587},{"style":176},[3588],{"type":47,"value":881},{"type":41,"tag":163,"props":3590,"children":3591},{"class":165,"line":330},[3592,3596,3600],{"type":41,"tag":163,"props":3593,"children":3594},{"style":261},[3595],{"type":47,"value":595},{"type":41,"tag":163,"props":3597,"children":3598},{"style":267},[3599],{"type":47,"value":270},{"type":41,"tag":163,"props":3601,"children":3602},{"style":182},[3603],{"type":47,"value":604},{"type":41,"tag":163,"props":3605,"children":3606},{"class":165,"line":353},[3607,3611,3615],{"type":41,"tag":163,"props":3608,"children":3609},{"style":261},[3610],{"type":47,"value":612},{"type":41,"tag":163,"props":3612,"children":3613},{"style":267},[3614],{"type":47,"value":270},{"type":41,"tag":163,"props":3616,"children":3617},{"style":182},[3618],{"type":47,"value":912},{"type":41,"tag":163,"props":3620,"children":3621},{"class":165,"line":371},[3622,3626,3630],{"type":41,"tag":163,"props":3623,"children":3624},{"style":261},[3625],{"type":47,"value":629},{"type":41,"tag":163,"props":3627,"children":3628},{"style":267},[3629],{"type":47,"value":270},{"type":41,"tag":163,"props":3631,"children":3632},{"style":182},[3633],{"type":47,"value":275},{"type":41,"tag":163,"props":3635,"children":3636},{"class":165,"line":389},[3637,3641,3645],{"type":41,"tag":163,"props":3638,"children":3639},{"style":261},[3640],{"type":47,"value":935},{"type":41,"tag":163,"props":3642,"children":3643},{"style":267},[3644],{"type":47,"value":270},{"type":41,"tag":163,"props":3646,"children":3647},{"style":176},[3648],{"type":47,"value":404},{"type":41,"tag":146,"props":3650,"children":3651},{"id":946},[3652,3653],{"type":47,"value":949},{"type":41,"tag":56,"props":3654,"children":3656},{"className":3655},[],[3657],{"type":47,"value":77},{"type":41,"tag":50,"props":3659,"children":3660},{},[3661,3662,3667],{"type":47,"value":230},{"type":41,"tag":56,"props":3663,"children":3665},{"className":3664},[],[3666],{"type":47,"value":204},{"type":47,"value":965},{"type":41,"tag":153,"props":3669,"children":3670},{"className":240,"code":968,"language":242,"meta":7,"style":7},[3671],{"type":41,"tag":56,"props":3672,"children":3673},{"__ignoreMap":7},[3674,3681,3696,3711,3726,3737],{"type":41,"tag":163,"props":3675,"children":3676},{"class":165,"line":166},[3677],{"type":41,"tag":163,"props":3678,"children":3679},{"style":252},[3680],{"type":47,"value":980},{"type":41,"tag":163,"props":3682,"children":3683},{"class":165,"line":18},[3684,3688,3692],{"type":41,"tag":163,"props":3685,"children":3686},{"style":261},[3687],{"type":47,"value":341},{"type":41,"tag":163,"props":3689,"children":3690},{"style":267},[3691],{"type":47,"value":270},{"type":41,"tag":163,"props":3693,"children":3694},{"style":182},[3695],{"type":47,"value":996},{"type":41,"tag":163,"props":3697,"children":3698},{"class":165,"line":278},[3699,3703,3707],{"type":41,"tag":163,"props":3700,"children":3701},{"style":261},[3702],{"type":47,"value":1004},{"type":41,"tag":163,"props":3704,"children":3705},{"style":267},[3706],{"type":47,"value":270},{"type":41,"tag":163,"props":3708,"children":3709},{"style":182},[3710],{"type":47,"value":1013},{"type":41,"tag":163,"props":3712,"children":3713},{"class":165,"line":292},[3714,3718,3722],{"type":41,"tag":163,"props":3715,"children":3716},{"style":261},[3717],{"type":47,"value":1021},{"type":41,"tag":163,"props":3719,"children":3720},{"style":267},[3721],{"type":47,"value":270},{"type":41,"tag":163,"props":3723,"children":3724},{"style":182},[3725],{"type":47,"value":1030},{"type":41,"tag":163,"props":3727,"children":3728},{"class":165,"line":305},[3729,3733],{"type":41,"tag":163,"props":3730,"children":3731},{"style":261},[3732],{"type":47,"value":1038},{"type":41,"tag":163,"props":3734,"children":3735},{"style":267},[3736],{"type":47,"value":289},{"type":41,"tag":163,"props":3738,"children":3739},{"class":165,"line":11},[3740,3744,3748],{"type":41,"tag":163,"props":3741,"children":3742},{"style":261},[3743],{"type":47,"value":1050},{"type":41,"tag":163,"props":3745,"children":3746},{"style":267},[3747],{"type":47,"value":270},{"type":41,"tag":163,"props":3749,"children":3750},{"style":182},[3751],{"type":47,"value":1059},{"type":41,"tag":50,"props":3753,"children":3754},{},[3755,3756,3761,3762,3767,3768,3773,3774,3779,3780,3785],{"type":47,"value":1064},{"type":41,"tag":56,"props":3757,"children":3759},{"className":3758},[],[3760],{"type":47,"value":1038},{"type":47,"value":1071},{"type":41,"tag":56,"props":3763,"children":3765},{"className":3764},[],[3766],{"type":47,"value":1077},{"type":47,"value":1079},{"type":41,"tag":56,"props":3769,"children":3771},{"className":3770},[],[3772],{"type":47,"value":1085},{"type":47,"value":198},{"type":41,"tag":56,"props":3775,"children":3777},{"className":3776},[],[3778],{"type":47,"value":1092},{"type":47,"value":198},{"type":41,"tag":56,"props":3781,"children":3783},{"className":3782},[],[3784],{"type":47,"value":1099},{"type":47,"value":144},{"type":41,"tag":425,"props":3787,"children":3788},{},[3789],{"type":41,"tag":50,"props":3790,"children":3791},{},[3792,3793,3797,3798,3803],{"type":47,"value":1108},{"type":41,"tag":1110,"props":3794,"children":3795},{},[3796],{"type":47,"value":1114},{"type":47,"value":1116},{"type":41,"tag":56,"props":3799,"children":3801},{"className":3800},[],[3802],{"type":47,"value":1122},{"type":47,"value":1124},{"type":41,"tag":146,"props":3805,"children":3806},{"id":1127},[3807],{"type":47,"value":1130},{"type":41,"tag":50,"props":3809,"children":3810},{},[3811],{"type":47,"value":1135},{"type":41,"tag":153,"props":3813,"children":3814},{"className":155,"code":1138,"language":157,"meta":7,"style":7},[3815],{"type":41,"tag":56,"props":3816,"children":3817},{"__ignoreMap":7},[3818],{"type":41,"tag":163,"props":3819,"children":3820},{"class":165,"line":166},[3821,3825,3829,3833,3837,3841],{"type":41,"tag":163,"props":3822,"children":3823},{"style":170},[3824],{"type":47,"value":103},{"type":41,"tag":163,"props":3826,"children":3827},{"style":182},[3828],{"type":47,"value":1154},{"type":41,"tag":163,"props":3830,"children":3831},{"style":182},[3832],{"type":47,"value":1159},{"type":41,"tag":163,"props":3834,"children":3835},{"style":176},[3836],{"type":47,"value":1164},{"type":41,"tag":163,"props":3838,"children":3839},{"style":182},[3840],{"type":47,"value":1169},{"type":41,"tag":163,"props":3842,"children":3843},{"style":182},[3844],{"type":47,"value":1174},{"type":41,"tag":50,"props":3846,"children":3847},{},[3848],{"type":47,"value":1179},{"type":41,"tag":153,"props":3850,"children":3852},{"className":3851,"code":1184,"language":47},[1183],[3853],{"type":41,"tag":56,"props":3854,"children":3855},{"__ignoreMap":7},[3856],{"type":47,"value":1184},{"type":41,"tag":50,"props":3858,"children":3859},{},[3860,3861,3866],{"type":47,"value":1194},{"type":41,"tag":56,"props":3862,"children":3864},{"className":3863},[],[3865],{"type":47,"value":421},{"type":47,"value":1201},{"type":41,"tag":425,"props":3868,"children":3869},{},[3870],{"type":41,"tag":50,"props":3871,"children":3872},{},[3873,3883,3884,3889],{"type":41,"tag":112,"props":3874,"children":3875},{},[3876,3877,3882],{"type":47,"value":1212},{"type":41,"tag":56,"props":3878,"children":3880},{"className":3879},[],[3881],{"type":47,"value":1218},{"type":47,"value":1220},{"type":47,"value":1222},{"type":41,"tag":56,"props":3885,"children":3887},{"className":3886},[],[3888],{"type":47,"value":1228},{"type":47,"value":1230},{"type":41,"tag":42,"props":3891,"children":3892},{"id":1233},[3893],{"type":47,"value":1236},{"type":41,"tag":50,"props":3895,"children":3896},{},[3897,3898,3903],{"type":47,"value":1241},{"type":41,"tag":56,"props":3899,"children":3901},{"className":3900},[],[3902],{"type":47,"value":61},{"type":47,"value":1248},{"type":41,"tag":1250,"props":3905,"children":3906},{},[3907],{"type":47,"value":1254},{"title":7,"searchDepth":18,"depth":18,"links":3909},[3910,3911,3912,3918],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":3913},[3914,3915,3916,3917],{"id":148,"depth":278,"text":151},{"id":217,"depth":278,"text":1263},{"id":946,"depth":278,"text":1265},{"id":1127,"depth":278,"text":1130},{"id":1233,"depth":18,"text":1236},{"_path":3920,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":3921,"description":3922,"date":10,"readingTime":305,"category":12,"tags":3923,"difficulty":17,"module":5,"step":278,"journeys":3924,"learnMore":3925,"stepGif":32,"author":3932,"body":3933,"_type":1268,"_id":4995,"_source":1270,"_file":4996,"_stem":4997,"_extension":1273},"/tutorials/dbt-bruin-analyst/import-schemas","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.",[14,15],[20,21],[3926,3929],{"label":3927,"url":3928},"bruin import database (docs)","https://getbruin.com/docs/bruin/commands/import.html",{"label":3930,"url":3931},"Asset definition schema","https://getbruin.com/docs/bruin/assets/definition-schema.html",{"name":34,"role":35,"image":36},{"type":38,"children":3934,"toc":4982},[3935,3939,3985,3989,3994,4013,4017,4023,4028,4077,4112,4118,4138,4257,4270,4350,4384,4390,4410,4422,4431,4436,4634,4639,4645,4657,4780,4785,4791,4796,4828,4833,4842,4847,4853,4861,4886,4894,4914,4927,4951,4959,4964,4968,4978],{"type":41,"tag":42,"props":3936,"children":3937},{"id":44},[3938],{"type":47,"value":48},{"type":41,"tag":50,"props":3940,"children":3941},{},[3942,3944,3950,3952,3957,3958,3963,3964,3969,3971,3977,3979,3984],{"type":47,"value":3943},"Run ",{"type":41,"tag":56,"props":3945,"children":3947},{"className":3946},[],[3948],{"type":47,"value":3949},"bruin import database",{"type":47,"value":3951}," against the schemas your dbt project materializes (e.g., ",{"type":41,"tag":56,"props":3953,"children":3955},{"className":3954},[],[3956],{"type":47,"value":2521},{"type":47,"value":198},{"type":41,"tag":56,"props":3959,"children":3961},{"className":3960},[],[3962],{"type":47,"value":2542},{"type":47,"value":198},{"type":41,"tag":56,"props":3965,"children":3967},{"className":3966},[],[3968],{"type":47,"value":2561},{"type":47,"value":3970},"). Bruin connects to the warehouse, reads each table's column list and types, and writes one ",{"type":41,"tag":56,"props":3972,"children":3974},{"className":3973},[],[3975],{"type":47,"value":3976},".asset.yml",{"type":47,"value":3978}," per table under ",{"type":41,"tag":56,"props":3980,"children":3982},{"className":3981},[],[3983],{"type":47,"value":212},{"type":47,"value":2409},{"type":41,"tag":42,"props":3986,"children":3987},{"id":82},[3988],{"type":47,"value":85},{"type":41,"tag":50,"props":3990,"children":3991},{},[3992],{"type":47,"value":3993},"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":41,"tag":50,"props":3995,"children":3996},{},[3997,3999,4004,4006,4011],{"type":47,"value":3998},"What you get out of this step is ",{"type":41,"tag":1110,"props":4000,"children":4001},{},[4002],{"type":47,"value":4003},"structure",{"type":47,"value":4005},": tables, columns, types. The next step (AI enhance) adds the ",{"type":41,"tag":1110,"props":4007,"children":4008},{},[4009],{"type":47,"value":4010},"meaning",{"type":47,"value":4012},": descriptions, tags, quality checks. Both halves matter — but the structure has to come from the warehouse, not from a guess.",{"type":41,"tag":42,"props":4014,"children":4015},{"id":128},[4016],{"type":47,"value":131},{"type":41,"tag":146,"props":4018,"children":4020},{"id":4019},"_1-identify-your-dbt-schemas",[4021],{"type":47,"value":4022},"1. Identify your dbt schemas",{"type":41,"tag":50,"props":4024,"children":4025},{},[4026],{"type":47,"value":4027},"You need the actual warehouse schema names. If you used the reference contoso project's schema convention, they're:",{"type":41,"tag":2465,"props":4029,"children":4030},{},[4031,4042,4060],{"type":41,"tag":2469,"props":4032,"children":4033},{},[4034,4040],{"type":41,"tag":56,"props":4035,"children":4037},{"className":4036},[],[4038],{"type":47,"value":4039},"contoso_dbt_raw",{"type":47,"value":4041}," — what dlt loads",{"type":41,"tag":2469,"props":4043,"children":4044},{},[4045,4050,4052,4058],{"type":41,"tag":56,"props":4046,"children":4048},{"className":4047},[],[4049],{"type":47,"value":2588},{"type":47,"value":4051}," — ",{"type":41,"tag":56,"props":4053,"children":4055},{"className":4054},[],[4056],{"type":47,"value":4057},"stg_*",{"type":47,"value":4059}," models",{"type":41,"tag":2469,"props":4061,"children":4062},{},[4063,4069,4070,4076],{"type":41,"tag":56,"props":4064,"children":4066},{"className":4065},[],[4067],{"type":47,"value":4068},"contoso_dbt_reports",{"type":47,"value":4051},{"type":41,"tag":56,"props":4071,"children":4073},{"className":4072},[],[4074],{"type":47,"value":4075},"rpt_*",{"type":47,"value":4059},{"type":41,"tag":50,"props":4078,"children":4079},{},[4080,4082,4087,4089,4095,4097,4103,4105,4110],{"type":47,"value":4081},"If you're not sure what your dbt project lands as, check ",{"type":41,"tag":56,"props":4083,"children":4085},{"className":4084},[],[4086],{"type":47,"value":142},{"type":47,"value":4088},". The full schema name is ",{"type":41,"tag":56,"props":4090,"children":4092},{"className":4091},[],[4093],{"type":47,"value":4094},"\u003Ctarget.schema>_\u003C+schema>",{"type":47,"value":4096}," by default, or just ",{"type":41,"tag":56,"props":4098,"children":4100},{"className":4099},[],[4101],{"type":47,"value":4102},"\u003C+schema>",{"type":47,"value":4104}," if you've overridden ",{"type":41,"tag":56,"props":4106,"children":4108},{"className":4107},[],[4109],{"type":47,"value":2624},{"type":47,"value":4111}," (the contoso project does).",{"type":41,"tag":146,"props":4113,"children":4115},{"id":4114},"_2-run-the-import",[4116],{"type":47,"value":4117},"2. Run the import",{"type":41,"tag":50,"props":4119,"children":4120},{},[4121,4123,4128,4130,4136],{"type":47,"value":4122},"From the dbt project root, point the import at your ",{"type":41,"tag":56,"props":4124,"children":4126},{"className":4125},[],[4127],{"type":47,"value":61},{"type":47,"value":4129}," pipeline folder. The ",{"type":41,"tag":56,"props":4131,"children":4133},{"className":4132},[],[4134],{"type":47,"value":4135},"--schemas",{"type":47,"value":4137}," flag is repeatable for BigQuery — pass it once per schema:",{"type":41,"tag":153,"props":4139,"children":4141},{"className":155,"code":4140,"language":157,"meta":7,"style":7},"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",[4142],{"type":41,"tag":56,"props":4143,"children":4144},{"__ignoreMap":7},[4145,4167,4183,4200,4217,4233,4249],{"type":41,"tag":163,"props":4146,"children":4147},{"class":165,"line":166},[4148,4152,4157,4162],{"type":41,"tag":163,"props":4149,"children":4150},{"style":170},[4151],{"type":47,"value":103},{"type":41,"tag":163,"props":4153,"children":4154},{"style":182},[4155],{"type":47,"value":4156}," import",{"type":41,"tag":163,"props":4158,"children":4159},{"style":182},[4160],{"type":47,"value":4161}," database",{"type":41,"tag":163,"props":4163,"children":4164},{"style":176},[4165],{"type":47,"value":4166}," \\\n",{"type":41,"tag":163,"props":4168,"children":4169},{"class":165,"line":18},[4170,4175,4179],{"type":41,"tag":163,"props":4171,"children":4172},{"style":176},[4173],{"type":47,"value":4174},"  --config-file",{"type":41,"tag":163,"props":4176,"children":4177},{"style":182},[4178],{"type":47,"value":1169},{"type":41,"tag":163,"props":4180,"children":4181},{"style":176},[4182],{"type":47,"value":4166},{"type":41,"tag":163,"props":4184,"children":4185},{"class":165,"line":278},[4186,4191,4196],{"type":41,"tag":163,"props":4187,"children":4188},{"style":176},[4189],{"type":47,"value":4190},"  --connection",{"type":41,"tag":163,"props":4192,"children":4193},{"style":182},[4194],{"type":47,"value":4195}," contoso_dbt_bq",{"type":41,"tag":163,"props":4197,"children":4198},{"style":176},[4199],{"type":47,"value":4166},{"type":41,"tag":163,"props":4201,"children":4202},{"class":165,"line":292},[4203,4208,4213],{"type":41,"tag":163,"props":4204,"children":4205},{"style":176},[4206],{"type":47,"value":4207},"  --schemas",{"type":41,"tag":163,"props":4209,"children":4210},{"style":182},[4211],{"type":47,"value":4212}," contoso_dbt_raw",{"type":41,"tag":163,"props":4214,"children":4215},{"style":176},[4216],{"type":47,"value":4166},{"type":41,"tag":163,"props":4218,"children":4219},{"class":165,"line":305},[4220,4224,4229],{"type":41,"tag":163,"props":4221,"children":4222},{"style":176},[4223],{"type":47,"value":4207},{"type":41,"tag":163,"props":4225,"children":4226},{"style":182},[4227],{"type":47,"value":4228}," contoso_dbt_staging",{"type":41,"tag":163,"props":4230,"children":4231},{"style":176},[4232],{"type":47,"value":4166},{"type":41,"tag":163,"props":4234,"children":4235},{"class":165,"line":11},[4236,4240,4245],{"type":41,"tag":163,"props":4237,"children":4238},{"style":176},[4239],{"type":47,"value":4207},{"type":41,"tag":163,"props":4241,"children":4242},{"style":182},[4243],{"type":47,"value":4244}," contoso_dbt_reports",{"type":41,"tag":163,"props":4246,"children":4247},{"style":176},[4248],{"type":47,"value":4166},{"type":41,"tag":163,"props":4250,"children":4251},{"class":165,"line":330},[4252],{"type":41,"tag":163,"props":4253,"children":4254},{"style":182},[4255],{"type":47,"value":4256},"  context\n",{"type":41,"tag":50,"props":4258,"children":4259},{},[4260,4262,4268],{"type":47,"value":4261},"For Postgres, Redshift, or ClickHouse, use ",{"type":41,"tag":56,"props":4263,"children":4265},{"className":4264},[],[4266],{"type":47,"value":4267},"--schema",{"type":47,"value":4269}," (singular) once per run:",{"type":41,"tag":153,"props":4271,"children":4273},{"className":155,"code":4272,"language":157,"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",[4274],{"type":41,"tag":56,"props":4275,"children":4276},{"__ignoreMap":7},[4277,4296,4311,4327,4343],{"type":41,"tag":163,"props":4278,"children":4279},{"class":165,"line":166},[4280,4284,4288,4292],{"type":41,"tag":163,"props":4281,"children":4282},{"style":170},[4283],{"type":47,"value":103},{"type":41,"tag":163,"props":4285,"children":4286},{"style":182},[4287],{"type":47,"value":4156},{"type":41,"tag":163,"props":4289,"children":4290},{"style":182},[4291],{"type":47,"value":4161},{"type":41,"tag":163,"props":4293,"children":4294},{"style":176},[4295],{"type":47,"value":4166},{"type":41,"tag":163,"props":4297,"children":4298},{"class":165,"line":18},[4299,4303,4307],{"type":41,"tag":163,"props":4300,"children":4301},{"style":176},[4302],{"type":47,"value":4174},{"type":41,"tag":163,"props":4304,"children":4305},{"style":182},[4306],{"type":47,"value":1169},{"type":41,"tag":163,"props":4308,"children":4309},{"style":176},[4310],{"type":47,"value":4166},{"type":41,"tag":163,"props":4312,"children":4313},{"class":165,"line":278},[4314,4318,4323],{"type":41,"tag":163,"props":4315,"children":4316},{"style":176},[4317],{"type":47,"value":4190},{"type":41,"tag":163,"props":4319,"children":4320},{"style":182},[4321],{"type":47,"value":4322}," contoso_dbt_pg",{"type":41,"tag":163,"props":4324,"children":4325},{"style":176},[4326],{"type":47,"value":4166},{"type":41,"tag":163,"props":4328,"children":4329},{"class":165,"line":292},[4330,4335,4339],{"type":41,"tag":163,"props":4331,"children":4332},{"style":176},[4333],{"type":47,"value":4334},"  --schema",{"type":41,"tag":163,"props":4336,"children":4337},{"style":182},[4338],{"type":47,"value":4228},{"type":41,"tag":163,"props":4340,"children":4341},{"style":176},[4342],{"type":47,"value":4166},{"type":41,"tag":163,"props":4344,"children":4345},{"class":165,"line":305},[4346],{"type":41,"tag":163,"props":4347,"children":4348},{"style":182},[4349],{"type":47,"value":4256},{"type":41,"tag":425,"props":4351,"children":4352},{},[4353],{"type":41,"tag":50,"props":4354,"children":4355},{},[4356,4361,4363,4368,4370,4376,4378,4383],{"type":41,"tag":112,"props":4357,"children":4358},{},[4359],{"type":47,"value":4360},"Note:",{"type":47,"value":4362}," The trailing positional argument is the ",{"type":41,"tag":112,"props":4364,"children":4365},{},[4366],{"type":47,"value":4367},"pipeline path",{"type":47,"value":4369},", not the project root. That's ",{"type":41,"tag":56,"props":4371,"children":4373},{"className":4372},[],[4374],{"type":47,"value":4375},"context",{"type":47,"value":4377}," in our setup — the directory containing ",{"type":41,"tag":56,"props":4379,"children":4381},{"className":4380},[],[4382],{"type":47,"value":77},{"type":47,"value":2409},{"type":41,"tag":146,"props":4385,"children":4387},{"id":4386},"_3-inspect-what-was-generated",[4388],{"type":47,"value":4389},"3. Inspect what was generated",{"type":41,"tag":153,"props":4391,"children":4393},{"className":155,"code":4392,"language":157,"meta":7,"style":7},"ls context/assets/\n",[4394],{"type":41,"tag":56,"props":4395,"children":4396},{"__ignoreMap":7},[4397],{"type":41,"tag":163,"props":4398,"children":4399},{"class":165,"line":166},[4400,4405],{"type":41,"tag":163,"props":4401,"children":4402},{"style":170},[4403],{"type":47,"value":4404},"ls",{"type":41,"tag":163,"props":4406,"children":4407},{"style":182},[4408],{"type":47,"value":4409}," context/assets/\n",{"type":41,"tag":50,"props":4411,"children":4412},{},[4413,4415,4420],{"type":47,"value":4414},"You should see one folder per schema, each containing one ",{"type":41,"tag":56,"props":4416,"children":4418},{"className":4417},[],[4419],{"type":47,"value":3976},{"type":47,"value":4421}," per table:",{"type":41,"tag":153,"props":4423,"children":4426},{"className":4424,"code":4425,"language":47},[1183],"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",[4427],{"type":41,"tag":56,"props":4428,"children":4429},{"__ignoreMap":7},[4430],{"type":47,"value":4425},{"type":41,"tag":50,"props":4432,"children":4433},{},[4434],{"type":47,"value":4435},"Open one — they look like this:",{"type":41,"tag":153,"props":4437,"children":4439},{"className":240,"code":4438,"language":242,"meta":7,"style":7},"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",[4440],{"type":41,"tag":56,"props":4441,"children":4442},{"__ignoreMap":7},[4443,4459,4476,4488,4509,4526,4546,4561,4581,4597,4617],{"type":41,"tag":163,"props":4444,"children":4445},{"class":165,"line":166},[4446,4450,4454],{"type":41,"tag":163,"props":4447,"children":4448},{"style":261},[4449],{"type":47,"value":341},{"type":41,"tag":163,"props":4451,"children":4452},{"style":267},[4453],{"type":47,"value":270},{"type":41,"tag":163,"props":4455,"children":4456},{"style":182},[4457],{"type":47,"value":4458},"contoso_dbt_reports.rpt_revenue_by_segment\n",{"type":41,"tag":163,"props":4460,"children":4461},{"class":165,"line":18},[4462,4467,4471],{"type":41,"tag":163,"props":4463,"children":4464},{"style":261},[4465],{"type":47,"value":4466},"type",{"type":41,"tag":163,"props":4468,"children":4469},{"style":267},[4470],{"type":47,"value":270},{"type":41,"tag":163,"props":4472,"children":4473},{"style":182},[4474],{"type":47,"value":4475},"bq.source\n",{"type":41,"tag":163,"props":4477,"children":4478},{"class":165,"line":278},[4479,4484],{"type":41,"tag":163,"props":4480,"children":4481},{"style":261},[4482],{"type":47,"value":4483},"columns",{"type":41,"tag":163,"props":4485,"children":4486},{"style":267},[4487],{"type":47,"value":289},{"type":41,"tag":163,"props":4489,"children":4490},{"class":165,"line":292},[4491,4496,4500,4504],{"type":41,"tag":163,"props":4492,"children":4493},{"style":267},[4494],{"type":47,"value":4495},"  - ",{"type":41,"tag":163,"props":4497,"children":4498},{"style":261},[4499],{"type":47,"value":341},{"type":41,"tag":163,"props":4501,"children":4502},{"style":267},[4503],{"type":47,"value":270},{"type":41,"tag":163,"props":4505,"children":4506},{"style":182},[4507],{"type":47,"value":4508},"segment_id\n",{"type":41,"tag":163,"props":4510,"children":4511},{"class":165,"line":305},[4512,4517,4521],{"type":41,"tag":163,"props":4513,"children":4514},{"style":261},[4515],{"type":47,"value":4516},"    type",{"type":41,"tag":163,"props":4518,"children":4519},{"style":267},[4520],{"type":47,"value":270},{"type":41,"tag":163,"props":4522,"children":4523},{"style":182},[4524],{"type":47,"value":4525},"STRING\n",{"type":41,"tag":163,"props":4527,"children":4528},{"class":165,"line":11},[4529,4533,4537,4541],{"type":41,"tag":163,"props":4530,"children":4531},{"style":267},[4532],{"type":47,"value":4495},{"type":41,"tag":163,"props":4534,"children":4535},{"style":261},[4536],{"type":47,"value":341},{"type":41,"tag":163,"props":4538,"children":4539},{"style":267},[4540],{"type":47,"value":270},{"type":41,"tag":163,"props":4542,"children":4543},{"style":182},[4544],{"type":47,"value":4545},"category_name\n",{"type":41,"tag":163,"props":4547,"children":4548},{"class":165,"line":330},[4549,4553,4557],{"type":41,"tag":163,"props":4550,"children":4551},{"style":261},[4552],{"type":47,"value":4516},{"type":41,"tag":163,"props":4554,"children":4555},{"style":267},[4556],{"type":47,"value":270},{"type":41,"tag":163,"props":4558,"children":4559},{"style":182},[4560],{"type":47,"value":4525},{"type":41,"tag":163,"props":4562,"children":4563},{"class":165,"line":353},[4564,4568,4572,4576],{"type":41,"tag":163,"props":4565,"children":4566},{"style":267},[4567],{"type":47,"value":4495},{"type":41,"tag":163,"props":4569,"children":4570},{"style":261},[4571],{"type":47,"value":341},{"type":41,"tag":163,"props":4573,"children":4574},{"style":267},[4575],{"type":47,"value":270},{"type":41,"tag":163,"props":4577,"children":4578},{"style":182},[4579],{"type":47,"value":4580},"year\n",{"type":41,"tag":163,"props":4582,"children":4583},{"class":165,"line":371},[4584,4588,4592],{"type":41,"tag":163,"props":4585,"children":4586},{"style":261},[4587],{"type":47,"value":4516},{"type":41,"tag":163,"props":4589,"children":4590},{"style":267},[4591],{"type":47,"value":270},{"type":41,"tag":163,"props":4593,"children":4594},{"style":182},[4595],{"type":47,"value":4596},"INT64\n",{"type":41,"tag":163,"props":4598,"children":4599},{"class":165,"line":389},[4600,4604,4608,4612],{"type":41,"tag":163,"props":4601,"children":4602},{"style":267},[4603],{"type":47,"value":4495},{"type":41,"tag":163,"props":4605,"children":4606},{"style":261},[4607],{"type":47,"value":341},{"type":41,"tag":163,"props":4609,"children":4610},{"style":267},[4611],{"type":47,"value":270},{"type":41,"tag":163,"props":4613,"children":4614},{"style":182},[4615],{"type":47,"value":4616},"revenue_usd\n",{"type":41,"tag":163,"props":4618,"children":4620},{"class":165,"line":4619},11,[4621,4625,4629],{"type":41,"tag":163,"props":4622,"children":4623},{"style":261},[4624],{"type":47,"value":4516},{"type":41,"tag":163,"props":4626,"children":4627},{"style":267},[4628],{"type":47,"value":270},{"type":41,"tag":163,"props":4630,"children":4631},{"style":182},[4632],{"type":47,"value":4633},"NUMERIC\n",{"type":41,"tag":50,"props":4635,"children":4636},{},[4637],{"type":47,"value":4638},"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":41,"tag":146,"props":4640,"children":4642},{"id":4641},"_4-filter-out-loader-internal-tables",[4643],{"type":47,"value":4644},"4. Filter out loader-internal tables",{"type":41,"tag":50,"props":4646,"children":4647},{},[4648,4650,4656],{"type":47,"value":4649},"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":41,"tag":56,"props":4651,"children":4653},{"className":4652},[],[4654],{"type":47,"value":4655},"_dlt_pipeline_state",{"type":47,"value":965},{"type":41,"tag":153,"props":4658,"children":4660},{"className":155,"code":4659,"language":157,"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",[4661],{"type":41,"tag":56,"props":4662,"children":4663},{"__ignoreMap":7},[4664,4672,4700,4709,4717,4741,4748,4756],{"type":41,"tag":163,"props":4665,"children":4666},{"class":165,"line":166},[4667],{"type":41,"tag":163,"props":4668,"children":4669},{"style":252},[4670],{"type":47,"value":4671},"# dlt\n",{"type":41,"tag":163,"props":4673,"children":4674},{"class":165,"line":18},[4675,4680,4685,4690,4695],{"type":41,"tag":163,"props":4676,"children":4677},{"style":170},[4678],{"type":47,"value":4679},"find",{"type":41,"tag":163,"props":4681,"children":4682},{"style":182},[4683],{"type":47,"value":4684}," context/assets",{"type":41,"tag":163,"props":4686,"children":4687},{"style":176},[4688],{"type":47,"value":4689}," -name",{"type":41,"tag":163,"props":4691,"children":4692},{"style":182},[4693],{"type":47,"value":4694}," \"_dlt_*.asset.yml\"",{"type":41,"tag":163,"props":4696,"children":4697},{"style":176},[4698],{"type":47,"value":4699}," -delete\n",{"type":41,"tag":163,"props":4701,"children":4702},{"class":165,"line":278},[4703],{"type":41,"tag":163,"props":4704,"children":4706},{"emptyLinePlaceholder":4705},true,[4707],{"type":47,"value":4708},"\n",{"type":41,"tag":163,"props":4710,"children":4711},{"class":165,"line":292},[4712],{"type":41,"tag":163,"props":4713,"children":4714},{"style":252},[4715],{"type":47,"value":4716},"# Airbyte\n",{"type":41,"tag":163,"props":4718,"children":4719},{"class":165,"line":305},[4720,4724,4728,4732,4737],{"type":41,"tag":163,"props":4721,"children":4722},{"style":170},[4723],{"type":47,"value":4679},{"type":41,"tag":163,"props":4725,"children":4726},{"style":182},[4727],{"type":47,"value":4684},{"type":41,"tag":163,"props":4729,"children":4730},{"style":176},[4731],{"type":47,"value":4689},{"type":41,"tag":163,"props":4733,"children":4734},{"style":182},[4735],{"type":47,"value":4736}," \"_airbyte_*.asset.yml\"",{"type":41,"tag":163,"props":4738,"children":4739},{"style":176},[4740],{"type":47,"value":4699},{"type":41,"tag":163,"props":4742,"children":4743},{"class":165,"line":11},[4744],{"type":41,"tag":163,"props":4745,"children":4746},{"emptyLinePlaceholder":4705},[4747],{"type":47,"value":4708},{"type":41,"tag":163,"props":4749,"children":4750},{"class":165,"line":330},[4751],{"type":41,"tag":163,"props":4752,"children":4753},{"style":252},[4754],{"type":47,"value":4755},"# Fivetran\n",{"type":41,"tag":163,"props":4757,"children":4758},{"class":165,"line":353},[4759,4763,4767,4771,4776],{"type":41,"tag":163,"props":4760,"children":4761},{"style":170},[4762],{"type":47,"value":4679},{"type":41,"tag":163,"props":4764,"children":4765},{"style":182},[4766],{"type":47,"value":4684},{"type":41,"tag":163,"props":4768,"children":4769},{"style":176},[4770],{"type":47,"value":4689},{"type":41,"tag":163,"props":4772,"children":4773},{"style":182},[4774],{"type":47,"value":4775}," \"fivetran_*.asset.yml\"",{"type":41,"tag":163,"props":4777,"children":4778},{"style":176},[4779],{"type":47,"value":4699},{"type":41,"tag":50,"props":4781,"children":4782},{},[4783],{"type":47,"value":4784},"Run only the one(s) that match your loader. The contoso project uses dlt, so the first command applies.",{"type":41,"tag":146,"props":4786,"children":4788},{"id":4787},"_5-optional-validate-the-structure",[4789],{"type":47,"value":4790},"5. (Optional) Validate the structure",{"type":41,"tag":50,"props":4792,"children":4793},{},[4794],{"type":47,"value":4795},"Even before enhancement, you can sanity-check the YAMLs:",{"type":41,"tag":153,"props":4797,"children":4799},{"className":155,"code":4798,"language":157,"meta":7,"style":7},"bruin validate --config-file context/.bruin.yml context\n",[4800],{"type":41,"tag":56,"props":4801,"children":4802},{"__ignoreMap":7},[4803],{"type":41,"tag":163,"props":4804,"children":4805},{"class":165,"line":166},[4806,4810,4815,4819,4823],{"type":41,"tag":163,"props":4807,"children":4808},{"style":170},[4809],{"type":47,"value":103},{"type":41,"tag":163,"props":4811,"children":4812},{"style":182},[4813],{"type":47,"value":4814}," validate",{"type":41,"tag":163,"props":4816,"children":4817},{"style":176},[4818],{"type":47,"value":1164},{"type":41,"tag":163,"props":4820,"children":4821},{"style":182},[4822],{"type":47,"value":1169},{"type":41,"tag":163,"props":4824,"children":4825},{"style":182},[4826],{"type":47,"value":4827}," context\n",{"type":41,"tag":50,"props":4829,"children":4830},{},[4831],{"type":47,"value":4832},"You should see one line per asset and a summary like:",{"type":41,"tag":153,"props":4834,"children":4837},{"className":4835,"code":4836,"language":47},[1183],"✓ Successfully validated 40 assets across 1 pipeline, all good.\n",[4838],{"type":41,"tag":56,"props":4839,"children":4840},{"__ignoreMap":7},[4841],{"type":47,"value":4836},{"type":41,"tag":50,"props":4843,"children":4844},{},[4845],{"type":47,"value":4846},"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":41,"tag":42,"props":4848,"children":4850},{"id":4849},"troubleshooting",[4851],{"type":47,"value":4852},"Troubleshooting",{"type":41,"tag":50,"props":4854,"children":4855},{},[4856],{"type":41,"tag":112,"props":4857,"children":4858},{},[4859],{"type":47,"value":4860},"\"connection not found\"",{"type":41,"tag":50,"props":4862,"children":4863},{},[4864,4866,4871,4873,4878,4880,4885],{"type":47,"value":4865},"You didn't pass ",{"type":41,"tag":56,"props":4867,"children":4869},{"className":4868},[],[4870],{"type":47,"value":1228},{"type":47,"value":4872},", so Bruin loaded a different ",{"type":41,"tag":56,"props":4874,"children":4876},{"className":4875},[],[4877],{"type":47,"value":69},{"type":47,"value":4879}," from elsewhere in the repo. Always include ",{"type":41,"tag":56,"props":4881,"children":4883},{"className":4882},[],[4884],{"type":47,"value":486},{"type":47,"value":2409},{"type":41,"tag":50,"props":4887,"children":4888},{},[4889],{"type":41,"tag":112,"props":4890,"children":4891},{},[4892],{"type":47,"value":4893},"\"permission denied\" / \"access denied\" on a schema",{"type":41,"tag":50,"props":4895,"children":4896},{},[4897,4899,4905,4907,4912],{"type":47,"value":4898},"Your connection identity is missing read access. For BigQuery, the role is ",{"type":41,"tag":56,"props":4900,"children":4902},{"className":4901},[],[4903],{"type":47,"value":4904},"BigQuery Data Viewer",{"type":47,"value":4906}," on the dataset; for Postgres / Redshift, it's ",{"type":41,"tag":56,"props":4908,"children":4910},{"className":4909},[],[4911],{"type":47,"value":2740},{"type":47,"value":4913}," on the schema's tables.",{"type":41,"tag":50,"props":4915,"children":4916},{},[4917],{"type":41,"tag":112,"props":4918,"children":4919},{},[4920,4922],{"type":47,"value":4921},"Some tables are missing from ",{"type":41,"tag":56,"props":4923,"children":4925},{"className":4924},[],[4926],{"type":47,"value":212},{"type":41,"tag":50,"props":4928,"children":4929},{},[4930,4935,4937,4942,4944,4949],{"type":41,"tag":56,"props":4931,"children":4933},{"className":4932},[],[4934],{"type":47,"value":3949},{"type":47,"value":4936}," only writes assets for tables that exist ",{"type":41,"tag":1110,"props":4938,"children":4939},{},[4940],{"type":47,"value":4941},"right now",{"type":47,"value":4943},". If a dbt model failed to materialize, it won't be there. Re-run ",{"type":41,"tag":56,"props":4945,"children":4947},{"className":4946},[],[4948],{"type":47,"value":2369},{"type":47,"value":4950},", then re-run the import.",{"type":41,"tag":50,"props":4952,"children":4953},{},[4954],{"type":41,"tag":112,"props":4955,"children":4956},{},[4957],{"type":47,"value":4958},"Import is slow on a large schema",{"type":41,"tag":50,"props":4960,"children":4961},{},[4962],{"type":47,"value":4963},"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":41,"tag":42,"props":4965,"children":4966},{"id":1233},[4967],{"type":47,"value":1236},{"type":41,"tag":50,"props":4969,"children":4970},{},[4971,4976],{"type":41,"tag":56,"props":4972,"children":4974},{"className":4973},[],[4975],{"type":47,"value":212},{"type":47,"value":4977}," 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":41,"tag":1250,"props":4979,"children":4980},{},[4981],{"type":47,"value":1254},{"title":7,"searchDepth":18,"depth":18,"links":4983},[4984,4985,4986,4993,4994],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":4987},[4988,4989,4990,4991,4992],{"id":4019,"depth":278,"text":4022},{"id":4114,"depth":278,"text":4117},{"id":4386,"depth":278,"text":4389},{"id":4641,"depth":278,"text":4644},{"id":4787,"depth":278,"text":4790},{"id":4849,"depth":18,"text":4852},{"id":1233,"depth":18,"text":1236},"content:tutorials:dbt-bruin-analyst:import-schemas.md","tutorials/dbt-bruin-analyst/import-schemas.md","tutorials/dbt-bruin-analyst/import-schemas",{"_path":4999,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":5000,"description":5001,"date":10,"readingTime":11,"category":12,"tags":5002,"difficulty":17,"module":5,"step":292,"journeys":5004,"learnMore":5005,"stepGif":32,"author":5015,"body":5016,"_type":1268,"_id":6383,"_source":1270,"_file":6384,"_stem":6385,"_extension":1273},"/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,5003,15],"Bruin AI",[20,21],[5006,5009,5012],{"label":5007,"url":5008},"bruin ai enhance (docs)","https://getbruin.com/docs/bruin/commands/ai-enhance.html",{"label":5010,"url":5011},"Quality checks reference","https://getbruin.com/docs/bruin/quality/overview.html",{"label":5013,"url":5014},"bruin validate (docs)","https://getbruin.com/docs/bruin/commands/validate.html",{"name":34,"role":35,"image":36},{"type":38,"children":5017,"toc":6372},[5018,5022,5056,5060,5096,5116,5120,5126,5131,5164,5169,5261,5295,5316,5349,5391,5397,5402,5422,5427,5851,5856,5891,5897,5926,5930,5938,5943,5949,5982,6304,6316,6345,6349,6368],{"type":41,"tag":42,"props":5019,"children":5020},{"id":44},[5021],{"type":47,"value":48},{"type":41,"tag":5023,"props":5024,"children":5025},"ol",{},[5026,5045],{"type":41,"tag":2469,"props":5027,"children":5028},{},[5029,5030,5036,5038,5043],{"type":47,"value":3943},{"type":41,"tag":56,"props":5031,"children":5033},{"className":5032},[],[5034],{"type":47,"value":5035},"bruin ai enhance",{"type":47,"value":5037}," over ",{"type":41,"tag":56,"props":5039,"children":5041},{"className":5040},[],[5042],{"type":47,"value":212},{"type":47,"value":5044}," so every asset gets a description, semantic tags, per-column docs, and quality checks",{"type":41,"tag":2469,"props":5046,"children":5047},{},[5048,5049,5054],{"type":47,"value":3943},{"type":41,"tag":56,"props":5050,"children":5052},{"className":5051},[],[5053],{"type":47,"value":1122},{"type":47,"value":5055}," to confirm none of the YAMLs ended up malformed",{"type":41,"tag":42,"props":5057,"children":5058},{"id":82},[5059],{"type":47,"value":85},{"type":41,"tag":50,"props":5061,"children":5062},{},[5063,5065,5070,5072,5078,5080,5086,5088,5094],{"type":47,"value":5064},"Without descriptions, an AI agent can read your schema but doesn't know what it ",{"type":41,"tag":1110,"props":5066,"children":5067},{},[5068],{"type":47,"value":5069},"means",{"type":47,"value":5071},". It sees ",{"type":41,"tag":56,"props":5073,"children":5075},{"className":5074},[],[5076],{"type":47,"value":5077},"gmv",{"type":47,"value":5079}," and guesses; it sees ",{"type":41,"tag":56,"props":5081,"children":5083},{"className":5082},[],[5084],{"type":47,"value":5085},"status = 3",{"type":47,"value":5087}," and queries blindly; it sees a ",{"type":41,"tag":56,"props":5089,"children":5091},{"className":5090},[],[5092],{"type":47,"value":5093},"created_at",{"type":47,"value":5095}," column and assumes UTC. Enhancement is what turns the structural skeleton from the previous step into something an agent can actually reason about.",{"type":41,"tag":50,"props":5097,"children":5098},{},[5099,5101,5107,5109,5114],{"type":47,"value":5100},"Validation matters because ",{"type":41,"tag":56,"props":5102,"children":5104},{"className":5103},[],[5105],{"type":47,"value":5106},"ai enhance",{"type":47,"value":5108}," writes to YAML files at scale, and rare edge cases can produce malformed files. A 30-second ",{"type":41,"tag":56,"props":5110,"children":5112},{"className":5111},[],[5113],{"type":47,"value":1122},{"type":47,"value":5115}," is cheap insurance that catches them immediately, before they confuse an agent at query time.",{"type":41,"tag":42,"props":5117,"children":5118},{"id":128},[5119],{"type":47,"value":131},{"type":41,"tag":146,"props":5121,"children":5123},{"id":5122},"_1-run-the-ai-enhancement",[5124],{"type":47,"value":5125},"1. Run the AI enhancement",{"type":41,"tag":50,"props":5127,"children":5128},{},[5129],{"type":47,"value":5130},"From the dbt project root:",{"type":41,"tag":153,"props":5132,"children":5134},{"className":155,"code":5133,"language":157,"meta":7,"style":7},"bruin ai enhance --claude context/assets\n",[5135],{"type":41,"tag":56,"props":5136,"children":5137},{"__ignoreMap":7},[5138],{"type":41,"tag":163,"props":5139,"children":5140},{"class":165,"line":166},[5141,5145,5150,5155,5160],{"type":41,"tag":163,"props":5142,"children":5143},{"style":170},[5144],{"type":47,"value":103},{"type":41,"tag":163,"props":5146,"children":5147},{"style":182},[5148],{"type":47,"value":5149}," ai",{"type":41,"tag":163,"props":5151,"children":5152},{"style":182},[5153],{"type":47,"value":5154}," enhance",{"type":41,"tag":163,"props":5156,"children":5157},{"style":176},[5158],{"type":47,"value":5159}," --claude",{"type":41,"tag":163,"props":5161,"children":5162},{"style":182},[5163],{"type":47,"value":185},{"type":41,"tag":50,"props":5165,"children":5166},{},[5167],{"type":47,"value":5168},"For each asset, Bruin sends the column list + a sample of the data to Claude and fills in:",{"type":41,"tag":2465,"props":5170,"children":5171},{},[5172,5184,5216,5228],{"type":41,"tag":2469,"props":5173,"children":5174},{},[5175,5177,5182],{"type":47,"value":5176},"A multi-paragraph ",{"type":41,"tag":112,"props":5178,"children":5179},{},[5180],{"type":47,"value":5181},"description",{"type":47,"value":5183}," covering purpose, grain, lineage, and typical use",{"type":41,"tag":2469,"props":5185,"children":5186},{},[5187,5189,5194,5196,5202,5203,5209,5210],{"type":47,"value":5188},"Semantic ",{"type":41,"tag":112,"props":5190,"children":5191},{},[5192],{"type":47,"value":5193},"tags",{"type":47,"value":5195}," like ",{"type":41,"tag":56,"props":5197,"children":5199},{"className":5198},[],[5200],{"type":47,"value":5201},"domain:retail",{"type":47,"value":198},{"type":41,"tag":56,"props":5204,"children":5206},{"className":5205},[],[5207],{"type":47,"value":5208},"layer:staging",{"type":47,"value":198},{"type":41,"tag":56,"props":5211,"children":5213},{"className":5212},[],[5214],{"type":47,"value":5215},"sensitivity:pii",{"type":41,"tag":2469,"props":5217,"children":5218},{},[5219,5221,5226],{"type":47,"value":5220},"Per-column ",{"type":41,"tag":112,"props":5222,"children":5223},{},[5224],{"type":47,"value":5225},"descriptions",{"type":47,"value":5227}," with business meaning",{"type":41,"tag":2469,"props":5229,"children":5230},{},[5231,5236,5237,5243,5245,5251,5253,5259],{"type":41,"tag":112,"props":5232,"children":5233},{},[5234],{"type":47,"value":5235},"Quality checks",{"type":47,"value":4051},{"type":41,"tag":56,"props":5238,"children":5240},{"className":5239},[],[5241],{"type":47,"value":5242},"not_null",{"type":47,"value":5244}," on keys, ",{"type":41,"tag":56,"props":5246,"children":5248},{"className":5247},[],[5249],{"type":47,"value":5250},"unique",{"type":47,"value":5252}," on identifiers, ",{"type":41,"tag":56,"props":5254,"children":5256},{"className":5255},[],[5257],{"type":47,"value":5258},"accepted_values",{"type":47,"value":5260}," on enums",{"type":41,"tag":50,"props":5262,"children":5263},{},[5264,5266,5272,5273,5279,5280,5286,5288,5294],{"type":47,"value":5265},"The command auto-detects which AI CLI you have installed. If you have several, pass an explicit flag — ",{"type":41,"tag":56,"props":5267,"children":5269},{"className":5268},[],[5270],{"type":47,"value":5271},"--claude",{"type":47,"value":198},{"type":41,"tag":56,"props":5274,"children":5276},{"className":5275},[],[5277],{"type":47,"value":5278},"--opencode",{"type":47,"value":198},{"type":41,"tag":56,"props":5281,"children":5283},{"className":5282},[],[5284],{"type":47,"value":5285},"--codex",{"type":47,"value":5287},", or ",{"type":41,"tag":56,"props":5289,"children":5291},{"className":5290},[],[5292],{"type":47,"value":5293},"--cursor",{"type":47,"value":2409},{"type":41,"tag":425,"props":5296,"children":5297},{},[5298],{"type":41,"tag":50,"props":5299,"children":5300},{},[5301,5306,5308,5314],{"type":41,"tag":112,"props":5302,"children":5303},{},[5304],{"type":47,"value":5305},"Time estimate.",{"type":47,"value":5307}," 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":41,"tag":56,"props":5309,"children":5311},{"className":5310},[],[5312],{"type":47,"value":5313},"--concurrency 10",{"type":47,"value":5315}," if you want it faster and your AI quota tolerates it.",{"type":41,"tag":425,"props":5317,"children":5318},{},[5319],{"type":41,"tag":50,"props":5320,"children":5321},{},[5322,5339,5341,5347],{"type":41,"tag":112,"props":5323,"children":5324},{},[5325,5326,5331,5333,5338],{"type":47,"value":1212},{"type":41,"tag":56,"props":5327,"children":5329},{"className":5328},[],[5330],{"type":47,"value":5106},{"type":47,"value":5332}," doesn't always honor ",{"type":41,"tag":56,"props":5334,"children":5336},{"className":5335},[],[5337],{"type":47,"value":1228},{"type":47,"value":2409},{"type":47,"value":5340}," It can fall back to your global ",{"type":41,"tag":56,"props":5342,"children":5344},{"className":5343},[],[5345],{"type":47,"value":5346},"~/.bruin.yml",{"type":47,"value":5348}," 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":41,"tag":425,"props":5350,"children":5351},{},[5352],{"type":41,"tag":50,"props":5353,"children":5354},{},[5355,5360,5362,5367,5369,5375,5377,5382,5384,5390],{"type":41,"tag":112,"props":5356,"children":5357},{},[5358],{"type":47,"value":5359},"Gotcha — rare YAML corruption.",{"type":47,"value":5361}," On a small fraction of assets, ",{"type":41,"tag":56,"props":5363,"children":5365},{"className":5364},[],[5366],{"type":47,"value":5106},{"type":47,"value":5368}," has been known to mangle the ",{"type":41,"tag":56,"props":5370,"children":5372},{"className":5371},[],[5373],{"type":47,"value":5374},"columns:",{"type":47,"value":5376}," block. Always run ",{"type":41,"tag":56,"props":5378,"children":5380},{"className":5379},[],[5381],{"type":47,"value":1122},{"type":47,"value":5383}," afterward (next step). If a single asset breaks, regenerate just that file: ",{"type":41,"tag":56,"props":5385,"children":5387},{"className":5386},[],[5388],{"type":47,"value":5389},"bruin ai enhance --claude context/assets/\u003Cschema>/\u003Ctable>.asset.yml",{"type":47,"value":2409},{"type":41,"tag":146,"props":5392,"children":5394},{"id":5393},"_2-spot-check-a-single-asset",[5395],{"type":47,"value":5396},"2. Spot-check a single asset",{"type":41,"tag":50,"props":5398,"children":5399},{},[5400],{"type":47,"value":5401},"Open one of the report assets — these benefit most from enrichment because the column names alone don't tell the full story:",{"type":41,"tag":153,"props":5403,"children":5405},{"className":155,"code":5404,"language":157,"meta":7,"style":7},"cat context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml\n",[5406],{"type":41,"tag":56,"props":5407,"children":5408},{"__ignoreMap":7},[5409],{"type":41,"tag":163,"props":5410,"children":5411},{"class":165,"line":166},[5412,5417],{"type":41,"tag":163,"props":5413,"children":5414},{"style":170},[5415],{"type":47,"value":5416},"cat",{"type":41,"tag":163,"props":5418,"children":5419},{"style":182},[5420],{"type":47,"value":5421}," context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml\n",{"type":41,"tag":50,"props":5423,"children":5424},{},[5425],{"type":47,"value":5426},"You should now see something like:",{"type":41,"tag":153,"props":5428,"children":5430},{"className":240,"code":5429,"language":242,"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",[5431],{"type":41,"tag":56,"props":5432,"children":5433},{"__ignoreMap":7},[5434,5449,5464,5480,5488,5496,5504,5512,5523,5535,5547,5559,5571,5591,5607,5625,5638,5660,5680,5696,5713,5725,5745,5765,5781,5798,5818,5834],{"type":41,"tag":163,"props":5435,"children":5436},{"class":165,"line":166},[5437,5441,5445],{"type":41,"tag":163,"props":5438,"children":5439},{"style":261},[5440],{"type":47,"value":341},{"type":41,"tag":163,"props":5442,"children":5443},{"style":267},[5444],{"type":47,"value":270},{"type":41,"tag":163,"props":5446,"children":5447},{"style":182},[5448],{"type":47,"value":4458},{"type":41,"tag":163,"props":5450,"children":5451},{"class":165,"line":18},[5452,5456,5460],{"type":41,"tag":163,"props":5453,"children":5454},{"style":261},[5455],{"type":47,"value":4466},{"type":41,"tag":163,"props":5457,"children":5458},{"style":267},[5459],{"type":47,"value":270},{"type":41,"tag":163,"props":5461,"children":5462},{"style":182},[5463],{"type":47,"value":4475},{"type":41,"tag":163,"props":5465,"children":5466},{"class":165,"line":278},[5467,5471,5475],{"type":41,"tag":163,"props":5468,"children":5469},{"style":261},[5470],{"type":47,"value":5181},{"type":41,"tag":163,"props":5472,"children":5473},{"style":267},[5474],{"type":47,"value":270},{"type":41,"tag":163,"props":5476,"children":5477},{"style":2737},[5478],{"type":47,"value":5479},"|\n",{"type":41,"tag":163,"props":5481,"children":5482},{"class":165,"line":292},[5483],{"type":41,"tag":163,"props":5484,"children":5485},{"style":182},[5486],{"type":47,"value":5487},"  Yearly revenue rolled up by product segment and category. Built from the\n",{"type":41,"tag":163,"props":5489,"children":5490},{"class":165,"line":305},[5491],{"type":41,"tag":163,"props":5492,"children":5493},{"style":182},[5494],{"type":47,"value":5495},"  staging order-line table joined with the product dimension. One row per\n",{"type":41,"tag":163,"props":5497,"children":5498},{"class":165,"line":11},[5499],{"type":41,"tag":163,"props":5500,"children":5501},{"style":182},[5502],{"type":47,"value":5503},"  (segment_id, category_name, year). Used by retail merchandising and\n",{"type":41,"tag":163,"props":5505,"children":5506},{"class":165,"line":330},[5507],{"type":41,"tag":163,"props":5508,"children":5509},{"style":182},[5510],{"type":47,"value":5511},"  finance for category-level reporting.\n",{"type":41,"tag":163,"props":5513,"children":5514},{"class":165,"line":353},[5515,5519],{"type":41,"tag":163,"props":5516,"children":5517},{"style":261},[5518],{"type":47,"value":5193},{"type":41,"tag":163,"props":5520,"children":5521},{"style":267},[5522],{"type":47,"value":289},{"type":41,"tag":163,"props":5524,"children":5525},{"class":165,"line":371},[5526,5530],{"type":41,"tag":163,"props":5527,"children":5528},{"style":267},[5529],{"type":47,"value":4495},{"type":41,"tag":163,"props":5531,"children":5532},{"style":182},[5533],{"type":47,"value":5534},"domain:retail\n",{"type":41,"tag":163,"props":5536,"children":5537},{"class":165,"line":389},[5538,5542],{"type":41,"tag":163,"props":5539,"children":5540},{"style":267},[5541],{"type":47,"value":4495},{"type":41,"tag":163,"props":5543,"children":5544},{"style":182},[5545],{"type":47,"value":5546},"layer:reports\n",{"type":41,"tag":163,"props":5548,"children":5549},{"class":165,"line":4619},[5550,5554],{"type":41,"tag":163,"props":5551,"children":5552},{"style":267},[5553],{"type":47,"value":4495},{"type":41,"tag":163,"props":5555,"children":5556},{"style":182},[5557],{"type":47,"value":5558},"grain:segment_category_year\n",{"type":41,"tag":163,"props":5560,"children":5562},{"class":165,"line":5561},12,[5563,5567],{"type":41,"tag":163,"props":5564,"children":5565},{"style":261},[5566],{"type":47,"value":4483},{"type":41,"tag":163,"props":5568,"children":5569},{"style":267},[5570],{"type":47,"value":289},{"type":41,"tag":163,"props":5572,"children":5574},{"class":165,"line":5573},13,[5575,5579,5583,5587],{"type":41,"tag":163,"props":5576,"children":5577},{"style":267},[5578],{"type":47,"value":4495},{"type":41,"tag":163,"props":5580,"children":5581},{"style":261},[5582],{"type":47,"value":341},{"type":41,"tag":163,"props":5584,"children":5585},{"style":267},[5586],{"type":47,"value":270},{"type":41,"tag":163,"props":5588,"children":5589},{"style":182},[5590],{"type":47,"value":4508},{"type":41,"tag":163,"props":5592,"children":5594},{"class":165,"line":5593},14,[5595,5599,5603],{"type":41,"tag":163,"props":5596,"children":5597},{"style":261},[5598],{"type":47,"value":4516},{"type":41,"tag":163,"props":5600,"children":5601},{"style":267},[5602],{"type":47,"value":270},{"type":41,"tag":163,"props":5604,"children":5605},{"style":182},[5606],{"type":47,"value":4525},{"type":41,"tag":163,"props":5608,"children":5610},{"class":165,"line":5609},15,[5611,5616,5620],{"type":41,"tag":163,"props":5612,"children":5613},{"style":261},[5614],{"type":47,"value":5615},"    description",{"type":41,"tag":163,"props":5617,"children":5618},{"style":267},[5619],{"type":47,"value":270},{"type":41,"tag":163,"props":5621,"children":5622},{"style":182},[5623],{"type":47,"value":5624},"\"Identifier for the product segment (joins to dim_segment).\"\n",{"type":41,"tag":163,"props":5626,"children":5628},{"class":165,"line":5627},16,[5629,5634],{"type":41,"tag":163,"props":5630,"children":5631},{"style":261},[5632],{"type":47,"value":5633},"    checks",{"type":41,"tag":163,"props":5635,"children":5636},{"style":267},[5637],{"type":47,"value":289},{"type":41,"tag":163,"props":5639,"children":5641},{"class":165,"line":5640},17,[5642,5647,5651,5655],{"type":41,"tag":163,"props":5643,"children":5644},{"style":267},[5645],{"type":47,"value":5646},"      - ",{"type":41,"tag":163,"props":5648,"children":5649},{"style":261},[5650],{"type":47,"value":341},{"type":41,"tag":163,"props":5652,"children":5653},{"style":267},[5654],{"type":47,"value":270},{"type":41,"tag":163,"props":5656,"children":5657},{"style":182},[5658],{"type":47,"value":5659},"not_null\n",{"type":41,"tag":163,"props":5661,"children":5663},{"class":165,"line":5662},18,[5664,5668,5672,5676],{"type":41,"tag":163,"props":5665,"children":5666},{"style":267},[5667],{"type":47,"value":4495},{"type":41,"tag":163,"props":5669,"children":5670},{"style":261},[5671],{"type":47,"value":341},{"type":41,"tag":163,"props":5673,"children":5674},{"style":267},[5675],{"type":47,"value":270},{"type":41,"tag":163,"props":5677,"children":5678},{"style":182},[5679],{"type":47,"value":4545},{"type":41,"tag":163,"props":5681,"children":5683},{"class":165,"line":5682},19,[5684,5688,5692],{"type":41,"tag":163,"props":5685,"children":5686},{"style":261},[5687],{"type":47,"value":4516},{"type":41,"tag":163,"props":5689,"children":5690},{"style":267},[5691],{"type":47,"value":270},{"type":41,"tag":163,"props":5693,"children":5694},{"style":182},[5695],{"type":47,"value":4525},{"type":41,"tag":163,"props":5697,"children":5699},{"class":165,"line":5698},20,[5700,5704,5708],{"type":41,"tag":163,"props":5701,"children":5702},{"style":261},[5703],{"type":47,"value":5615},{"type":41,"tag":163,"props":5705,"children":5706},{"style":267},[5707],{"type":47,"value":270},{"type":41,"tag":163,"props":5709,"children":5710},{"style":182},[5711],{"type":47,"value":5712},"\"Human-readable category label, e.g. 'Bikes', 'Components'.\"\n",{"type":41,"tag":163,"props":5714,"children":5716},{"class":165,"line":5715},21,[5717,5721],{"type":41,"tag":163,"props":5718,"children":5719},{"style":261},[5720],{"type":47,"value":5633},{"type":41,"tag":163,"props":5722,"children":5723},{"style":267},[5724],{"type":47,"value":289},{"type":41,"tag":163,"props":5726,"children":5728},{"class":165,"line":5727},22,[5729,5733,5737,5741],{"type":41,"tag":163,"props":5730,"children":5731},{"style":267},[5732],{"type":47,"value":5646},{"type":41,"tag":163,"props":5734,"children":5735},{"style":261},[5736],{"type":47,"value":341},{"type":41,"tag":163,"props":5738,"children":5739},{"style":267},[5740],{"type":47,"value":270},{"type":41,"tag":163,"props":5742,"children":5743},{"style":182},[5744],{"type":47,"value":5659},{"type":41,"tag":163,"props":5746,"children":5748},{"class":165,"line":5747},23,[5749,5753,5757,5761],{"type":41,"tag":163,"props":5750,"children":5751},{"style":267},[5752],{"type":47,"value":4495},{"type":41,"tag":163,"props":5754,"children":5755},{"style":261},[5756],{"type":47,"value":341},{"type":41,"tag":163,"props":5758,"children":5759},{"style":267},[5760],{"type":47,"value":270},{"type":41,"tag":163,"props":5762,"children":5763},{"style":182},[5764],{"type":47,"value":4580},{"type":41,"tag":163,"props":5766,"children":5768},{"class":165,"line":5767},24,[5769,5773,5777],{"type":41,"tag":163,"props":5770,"children":5771},{"style":261},[5772],{"type":47,"value":4516},{"type":41,"tag":163,"props":5774,"children":5775},{"style":267},[5776],{"type":47,"value":270},{"type":41,"tag":163,"props":5778,"children":5779},{"style":182},[5780],{"type":47,"value":4596},{"type":41,"tag":163,"props":5782,"children":5784},{"class":165,"line":5783},25,[5785,5789,5793],{"type":41,"tag":163,"props":5786,"children":5787},{"style":261},[5788],{"type":47,"value":5615},{"type":41,"tag":163,"props":5790,"children":5791},{"style":267},[5792],{"type":47,"value":270},{"type":41,"tag":163,"props":5794,"children":5795},{"style":182},[5796],{"type":47,"value":5797},"\"Calendar year of the order date, in UTC.\"\n",{"type":41,"tag":163,"props":5799,"children":5801},{"class":165,"line":5800},26,[5802,5806,5810,5814],{"type":41,"tag":163,"props":5803,"children":5804},{"style":267},[5805],{"type":47,"value":4495},{"type":41,"tag":163,"props":5807,"children":5808},{"style":261},[5809],{"type":47,"value":341},{"type":41,"tag":163,"props":5811,"children":5812},{"style":267},[5813],{"type":47,"value":270},{"type":41,"tag":163,"props":5815,"children":5816},{"style":182},[5817],{"type":47,"value":4616},{"type":41,"tag":163,"props":5819,"children":5821},{"class":165,"line":5820},27,[5822,5826,5830],{"type":41,"tag":163,"props":5823,"children":5824},{"style":261},[5825],{"type":47,"value":4516},{"type":41,"tag":163,"props":5827,"children":5828},{"style":267},[5829],{"type":47,"value":270},{"type":41,"tag":163,"props":5831,"children":5832},{"style":182},[5833],{"type":47,"value":4633},{"type":41,"tag":163,"props":5835,"children":5837},{"class":165,"line":5836},28,[5838,5842,5846],{"type":41,"tag":163,"props":5839,"children":5840},{"style":261},[5841],{"type":47,"value":5615},{"type":41,"tag":163,"props":5843,"children":5844},{"style":267},[5845],{"type":47,"value":270},{"type":41,"tag":163,"props":5847,"children":5848},{"style":182},[5849],{"type":47,"value":5850},"\"Sum of order_line.gross_amount in USD, post-discount.\"\n",{"type":41,"tag":50,"props":5852,"children":5853},{},[5854],{"type":47,"value":5855},"This is what the agent will read before it queries. The richer this gets, the better its SQL gets.",{"type":41,"tag":425,"props":5857,"children":5858},{},[5859],{"type":41,"tag":50,"props":5860,"children":5861},{},[5862,5874,5876,5881,5883,5889],{"type":41,"tag":112,"props":5863,"children":5864},{},[5865,5867,5872],{"type":47,"value":5866},"Watch for incorrect ",{"type":41,"tag":56,"props":5868,"children":5870},{"className":5869},[],[5871],{"type":47,"value":5250},{"type":47,"value":5873}," checks.",{"type":47,"value":5875}," AI enhancement sometimes adds ",{"type":41,"tag":56,"props":5877,"children":5879},{"className":5878},[],[5880],{"type":47,"value":5250},{"type":47,"value":5882}," to columns that look like keys but aren't unique per row (e.g., ",{"type":41,"tag":56,"props":5884,"children":5886},{"className":5885},[],[5887],{"type":47,"value":5888},"segment_id",{"type":47,"value":5890}," 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":41,"tag":146,"props":5892,"children":5894},{"id":5893},"_3-validate-the-whole-pipeline",[5895],{"type":47,"value":5896},"3. Validate the whole pipeline",{"type":41,"tag":153,"props":5898,"children":5899},{"className":155,"code":4798,"language":157,"meta":7,"style":7},[5900],{"type":41,"tag":56,"props":5901,"children":5902},{"__ignoreMap":7},[5903],{"type":41,"tag":163,"props":5904,"children":5905},{"class":165,"line":166},[5906,5910,5914,5918,5922],{"type":41,"tag":163,"props":5907,"children":5908},{"style":170},[5909],{"type":47,"value":103},{"type":41,"tag":163,"props":5911,"children":5912},{"style":182},[5913],{"type":47,"value":4814},{"type":41,"tag":163,"props":5915,"children":5916},{"style":176},[5917],{"type":47,"value":1164},{"type":41,"tag":163,"props":5919,"children":5920},{"style":182},[5921],{"type":47,"value":1169},{"type":41,"tag":163,"props":5923,"children":5924},{"style":182},[5925],{"type":47,"value":4827},{"type":41,"tag":50,"props":5927,"children":5928},{},[5929],{"type":47,"value":1179},{"type":41,"tag":153,"props":5931,"children":5933},{"className":5932,"code":4836,"language":47},[1183],[5934],{"type":41,"tag":56,"props":5935,"children":5936},{"__ignoreMap":7},[5937],{"type":47,"value":4836},{"type":41,"tag":50,"props":5939,"children":5940},{},[5941],{"type":47,"value":5942},"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":41,"tag":146,"props":5944,"children":5946},{"id":5945},"_4-wrap-it-in-a-regenerator-script-optional",[5947],{"type":47,"value":5948},"4. Wrap it in a regenerator script (optional)",{"type":41,"tag":50,"props":5950,"children":5951},{},[5952,5954,5964,5966,5972,5974,5980],{"type":47,"value":5953},"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":41,"tag":2378,"props":5955,"children":5957},{"href":2329,"rel":5956},[2381],[5958],{"type":41,"tag":56,"props":5959,"children":5961},{"className":5960},[],[5962],{"type":47,"value":5963},"generate_context.sh",{"type":47,"value":5965}," with ",{"type":41,"tag":56,"props":5967,"children":5969},{"className":5968},[],[5970],{"type":47,"value":5971},"--skip-import",{"type":47,"value":5973}," (re-enhance only) and ",{"type":41,"tag":56,"props":5975,"children":5977},{"className":5976},[],[5978],{"type":47,"value":5979},"--skip-enhance",{"type":47,"value":5981}," (fast structure refresh) flags. A minimal version:",{"type":41,"tag":153,"props":5983,"children":5985},{"className":155,"code":5984,"language":157,"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",[5986],{"type":41,"tag":56,"props":5987,"children":5988},{"__ignoreMap":7},[5989,5997,6015,6022,6040,6057,6064,6083,6109,6124,6139,6154,6169,6187,6194,6226,6233,6265],{"type":41,"tag":163,"props":5990,"children":5991},{"class":165,"line":166},[5992],{"type":41,"tag":163,"props":5993,"children":5994},{"style":252},[5995],{"type":47,"value":5996},"#!/usr/bin/env bash\n",{"type":41,"tag":163,"props":5998,"children":5999},{"class":165,"line":18},[6000,6005,6010],{"type":41,"tag":163,"props":6001,"children":6002},{"style":176},[6003],{"type":47,"value":6004},"set",{"type":41,"tag":163,"props":6006,"children":6007},{"style":176},[6008],{"type":47,"value":6009}," -euo",{"type":41,"tag":163,"props":6011,"children":6012},{"style":182},[6013],{"type":47,"value":6014}," pipefail\n",{"type":41,"tag":163,"props":6016,"children":6017},{"class":165,"line":278},[6018],{"type":41,"tag":163,"props":6019,"children":6020},{"emptyLinePlaceholder":4705},[6021],{"type":47,"value":4708},{"type":41,"tag":163,"props":6023,"children":6024},{"class":165,"line":292},[6025,6030,6035],{"type":41,"tag":163,"props":6026,"children":6027},{"style":267},[6028],{"type":47,"value":6029},"CONFIG",{"type":41,"tag":163,"props":6031,"children":6032},{"style":2737},[6033],{"type":47,"value":6034},"=",{"type":41,"tag":163,"props":6036,"children":6037},{"style":182},[6038],{"type":47,"value":6039},"\"context/.bruin.yml\"\n",{"type":41,"tag":163,"props":6041,"children":6042},{"class":165,"line":305},[6043,6048,6052],{"type":41,"tag":163,"props":6044,"children":6045},{"style":267},[6046],{"type":47,"value":6047},"PIPELINE",{"type":41,"tag":163,"props":6049,"children":6050},{"style":2737},[6051],{"type":47,"value":6034},{"type":41,"tag":163,"props":6053,"children":6054},{"style":182},[6055],{"type":47,"value":6056},"\"context\"\n",{"type":41,"tag":163,"props":6058,"children":6059},{"class":165,"line":11},[6060],{"type":41,"tag":163,"props":6061,"children":6062},{"emptyLinePlaceholder":4705},[6063],{"type":47,"value":4708},{"type":41,"tag":163,"props":6065,"children":6066},{"class":165,"line":330},[6067,6071,6075,6079],{"type":41,"tag":163,"props":6068,"children":6069},{"style":170},[6070],{"type":47,"value":103},{"type":41,"tag":163,"props":6072,"children":6073},{"style":182},[6074],{"type":47,"value":4156},{"type":41,"tag":163,"props":6076,"children":6077},{"style":182},[6078],{"type":47,"value":4161},{"type":41,"tag":163,"props":6080,"children":6081},{"style":176},[6082],{"type":47,"value":4166},{"type":41,"tag":163,"props":6084,"children":6085},{"class":165,"line":353},[6086,6090,6095,6100,6105],{"type":41,"tag":163,"props":6087,"children":6088},{"style":176},[6089],{"type":47,"value":4174},{"type":41,"tag":163,"props":6091,"children":6092},{"style":182},[6093],{"type":47,"value":6094}," \"",{"type":41,"tag":163,"props":6096,"children":6097},{"style":267},[6098],{"type":47,"value":6099},"$CONFIG",{"type":41,"tag":163,"props":6101,"children":6102},{"style":182},[6103],{"type":47,"value":6104},"\"",{"type":41,"tag":163,"props":6106,"children":6107},{"style":176},[6108],{"type":47,"value":4166},{"type":41,"tag":163,"props":6110,"children":6111},{"class":165,"line":371},[6112,6116,6120],{"type":41,"tag":163,"props":6113,"children":6114},{"style":176},[6115],{"type":47,"value":4190},{"type":41,"tag":163,"props":6117,"children":6118},{"style":182},[6119],{"type":47,"value":4195},{"type":41,"tag":163,"props":6121,"children":6122},{"style":176},[6123],{"type":47,"value":4166},{"type":41,"tag":163,"props":6125,"children":6126},{"class":165,"line":389},[6127,6131,6135],{"type":41,"tag":163,"props":6128,"children":6129},{"style":176},[6130],{"type":47,"value":4207},{"type":41,"tag":163,"props":6132,"children":6133},{"style":182},[6134],{"type":47,"value":4212},{"type":41,"tag":163,"props":6136,"children":6137},{"style":176},[6138],{"type":47,"value":4166},{"type":41,"tag":163,"props":6140,"children":6141},{"class":165,"line":4619},[6142,6146,6150],{"type":41,"tag":163,"props":6143,"children":6144},{"style":176},[6145],{"type":47,"value":4207},{"type":41,"tag":163,"props":6147,"children":6148},{"style":182},[6149],{"type":47,"value":4228},{"type":41,"tag":163,"props":6151,"children":6152},{"style":176},[6153],{"type":47,"value":4166},{"type":41,"tag":163,"props":6155,"children":6156},{"class":165,"line":5561},[6157,6161,6165],{"type":41,"tag":163,"props":6158,"children":6159},{"style":176},[6160],{"type":47,"value":4207},{"type":41,"tag":163,"props":6162,"children":6163},{"style":182},[6164],{"type":47,"value":4244},{"type":41,"tag":163,"props":6166,"children":6167},{"style":176},[6168],{"type":47,"value":4166},{"type":41,"tag":163,"props":6170,"children":6171},{"class":165,"line":5573},[6172,6177,6182],{"type":41,"tag":163,"props":6173,"children":6174},{"style":182},[6175],{"type":47,"value":6176},"  \"",{"type":41,"tag":163,"props":6178,"children":6179},{"style":267},[6180],{"type":47,"value":6181},"$PIPELINE",{"type":41,"tag":163,"props":6183,"children":6184},{"style":182},[6185],{"type":47,"value":6186},"\"\n",{"type":41,"tag":163,"props":6188,"children":6189},{"class":165,"line":5593},[6190],{"type":41,"tag":163,"props":6191,"children":6192},{"emptyLinePlaceholder":4705},[6193],{"type":47,"value":4708},{"type":41,"tag":163,"props":6195,"children":6196},{"class":165,"line":5609},[6197,6201,6205,6209,6214,6218,6222],{"type":41,"tag":163,"props":6198,"children":6199},{"style":170},[6200],{"type":47,"value":4679},{"type":41,"tag":163,"props":6202,"children":6203},{"style":182},[6204],{"type":47,"value":6094},{"type":41,"tag":163,"props":6206,"children":6207},{"style":267},[6208],{"type":47,"value":6181},{"type":41,"tag":163,"props":6210,"children":6211},{"style":182},[6212],{"type":47,"value":6213},"/assets\"",{"type":41,"tag":163,"props":6215,"children":6216},{"style":176},[6217],{"type":47,"value":4689},{"type":41,"tag":163,"props":6219,"children":6220},{"style":182},[6221],{"type":47,"value":4694},{"type":41,"tag":163,"props":6223,"children":6224},{"style":176},[6225],{"type":47,"value":4699},{"type":41,"tag":163,"props":6227,"children":6228},{"class":165,"line":5627},[6229],{"type":41,"tag":163,"props":6230,"children":6231},{"emptyLinePlaceholder":4705},[6232],{"type":47,"value":4708},{"type":41,"tag":163,"props":6234,"children":6235},{"class":165,"line":5640},[6236,6240,6244,6248,6252,6256,6260],{"type":41,"tag":163,"props":6237,"children":6238},{"style":170},[6239],{"type":47,"value":103},{"type":41,"tag":163,"props":6241,"children":6242},{"style":182},[6243],{"type":47,"value":5149},{"type":41,"tag":163,"props":6245,"children":6246},{"style":182},[6247],{"type":47,"value":5154},{"type":41,"tag":163,"props":6249,"children":6250},{"style":176},[6251],{"type":47,"value":5159},{"type":41,"tag":163,"props":6253,"children":6254},{"style":182},[6255],{"type":47,"value":6094},{"type":41,"tag":163,"props":6257,"children":6258},{"style":267},[6259],{"type":47,"value":6181},{"type":41,"tag":163,"props":6261,"children":6262},{"style":182},[6263],{"type":47,"value":6264},"/assets\"\n",{"type":41,"tag":163,"props":6266,"children":6267},{"class":165,"line":5662},[6268,6272,6276,6280,6284,6288,6292,6296,6300],{"type":41,"tag":163,"props":6269,"children":6270},{"style":170},[6271],{"type":47,"value":103},{"type":41,"tag":163,"props":6273,"children":6274},{"style":182},[6275],{"type":47,"value":4814},{"type":41,"tag":163,"props":6277,"children":6278},{"style":176},[6279],{"type":47,"value":1164},{"type":41,"tag":163,"props":6281,"children":6282},{"style":182},[6283],{"type":47,"value":6094},{"type":41,"tag":163,"props":6285,"children":6286},{"style":267},[6287],{"type":47,"value":6099},{"type":41,"tag":163,"props":6289,"children":6290},{"style":182},[6291],{"type":47,"value":6104},{"type":41,"tag":163,"props":6293,"children":6294},{"style":182},[6295],{"type":47,"value":6094},{"type":41,"tag":163,"props":6297,"children":6298},{"style":267},[6299],{"type":47,"value":6181},{"type":41,"tag":163,"props":6301,"children":6302},{"style":182},[6303],{"type":47,"value":6186},{"type":41,"tag":50,"props":6305,"children":6306},{},[6307,6309,6314],{"type":47,"value":6308},"Save it as ",{"type":41,"tag":56,"props":6310,"children":6312},{"className":6311},[],[6313],{"type":47,"value":5963},{"type":47,"value":6315}," 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":41,"tag":425,"props":6317,"children":6318},{},[6319],{"type":41,"tag":50,"props":6320,"children":6321},{},[6322,6327,6329,6335,6337,6343],{"type":41,"tag":112,"props":6323,"children":6324},{},[6325],{"type":47,"value":6326},"Don't hand-edit generated YAMLs.",{"type":47,"value":6328}," They're regenerable artifacts. If a description is consistently wrong, fix it upstream — in the dbt model's ",{"type":41,"tag":56,"props":6330,"children":6332},{"className":6331},[],[6333],{"type":47,"value":6334},"schema.yml",{"type":47,"value":6336}," or ",{"type":41,"tag":56,"props":6338,"children":6340},{"className":6339},[],[6341],{"type":47,"value":6342},"description: ",{"type":47,"value":6344}," block — and the next import + enhance will pick the change up.",{"type":41,"tag":42,"props":6346,"children":6347},{"id":1233},[6348],{"type":47,"value":1236},{"type":41,"tag":50,"props":6350,"children":6351},{},[6352,6354,6359,6361,6366],{"type":47,"value":6353},"Your ",{"type":41,"tag":56,"props":6355,"children":6357},{"className":6356},[],[6358],{"type":47,"value":212},{"type":47,"value":6360}," 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":41,"tag":1110,"props":6362,"children":6363},{},[6364],{"type":47,"value":6365},"except",{"type":47,"value":6367}," the wiring that lets it actually call out to all of this. That's the next step.",{"type":41,"tag":1250,"props":6369,"children":6370},{},[6371],{"type":47,"value":1254},{"title":7,"searchDepth":18,"depth":18,"links":6373},[6374,6375,6376,6382],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":6377},[6378,6379,6380,6381],{"id":5122,"depth":278,"text":5125},{"id":5393,"depth":278,"text":5396},{"id":5893,"depth":278,"text":5896},{"id":5945,"depth":278,"text":5948},{"id":1233,"depth":18,"text":1236},"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":6387,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":6388,"description":6389,"date":10,"readingTime":330,"category":12,"tags":6390,"difficulty":17,"module":5,"step":305,"variants":6395,"journeys":6396,"learnMore":6397,"stepGif":32,"author":6407,"body":6408,"_type":1268,"_id":7788,"_source":1270,"_file":7789,"_stem":7790,"_extension":1273},"/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,6391,15,6392,6393,6394],"MCP","Claude Code","Cursor","Codex",[6392,6393,6394],[20,21],[6398,6401,6404],{"label":6399,"url":6400},"Bruin MCP setup guide","https://getbruin.com/docs/bruin/getting-started/bruin-mcp.html",{"label":6402,"url":6403},"bruin query (docs)","https://getbruin.com/docs/bruin/commands/query.html",{"label":6405,"url":6406},"MCP best practices for AI agents","https://getbruin.com/docs/bruin/getting-started/bruin-mcp.html#best-practices-for-ai-agents",{"name":34,"role":35,"image":36},{"type":38,"children":6409,"toc":7773},[6410,6414,6453,6457,6469,6513,6518,6522,6528,6533,6859,6872,6884,7005,7017,7030,7063,7439,7445,7450,7466,7471,7515,7527,7533,7640,7646,7651,7734,7746,7750,7769],{"type":41,"tag":42,"props":6411,"children":6412},{"id":44},[6413],{"type":47,"value":48},{"type":41,"tag":5023,"props":6415,"children":6416},{},[6417,6422,6448],{"type":41,"tag":2469,"props":6418,"children":6419},{},[6420],{"type":47,"value":6421},"Register Bruin MCP in your AI coding tool so the agent can ask Bruin \"how do I…?\" questions",{"type":41,"tag":2469,"props":6423,"children":6424},{},[6425,6427,6433,6435,6440,6442],{"type":47,"value":6426},"Add an ",{"type":41,"tag":56,"props":6428,"children":6430},{"className":6429},[],[6431],{"type":47,"value":6432},"AGENTS.md",{"type":47,"value":6434}," at the repo root that points the agent at ",{"type":41,"tag":56,"props":6436,"children":6438},{"className":6437},[],[6439],{"type":47,"value":212},{"type":47,"value":6441}," and at ",{"type":41,"tag":56,"props":6443,"children":6445},{"className":6444},[],[6446],{"type":47,"value":6447},"bruin query",{"type":41,"tag":2469,"props":6449,"children":6450},{},[6451],{"type":47,"value":6452},"Verify the loop end-to-end with a real business question",{"type":41,"tag":42,"props":6454,"children":6455},{"id":82},[6456],{"type":47,"value":85},{"type":41,"tag":50,"props":6458,"children":6459},{},[6460,6462,6467],{"type":47,"value":6461},"The context layer is half the equation. The agent also needs an ",{"type":41,"tag":112,"props":6463,"children":6464},{},[6465],{"type":47,"value":6466},"interface",{"type":47,"value":6468}," to use it:",{"type":41,"tag":2465,"props":6470,"children":6471},{},[6472,6477,6489],{"type":41,"tag":2469,"props":6473,"children":6474},{},[6475],{"type":47,"value":6476},"A way to learn how Bruin itself works (asset types, command flags) — that's what Bruin MCP gives you",{"type":41,"tag":2469,"props":6478,"children":6479},{},[6480,6482,6487],{"type":47,"value":6481},"A way to actually run SQL against the warehouse — that's ",{"type":41,"tag":56,"props":6483,"children":6485},{"className":6484},[],[6486],{"type":47,"value":6447},{"type":47,"value":6488},", which uses the same connection you defined in step 2",{"type":41,"tag":2469,"props":6490,"children":6491},{},[6492,6494,6499,6501,6506,6508],{"type":47,"value":6493},"A canonical workflow that tells the agent ",{"type":41,"tag":1110,"props":6495,"children":6496},{},[6497],{"type":47,"value":6498},"which",{"type":47,"value":6500}," of the two to use, ",{"type":41,"tag":1110,"props":6502,"children":6503},{},[6504],{"type":47,"value":6505},"when",{"type":47,"value":6507}," — that's ",{"type":41,"tag":56,"props":6509,"children":6511},{"className":6510},[],[6512],{"type":47,"value":6432},{"type":41,"tag":50,"props":6514,"children":6515},{},[6516],{"type":47,"value":6517},"Get all three in place and the agent stops guessing table names and starts citing the asset YAMLs you generated.",{"type":41,"tag":42,"props":6519,"children":6520},{"id":128},[6521],{"type":47,"value":131},{"type":41,"tag":146,"props":6523,"children":6525},{"id":6524},"_1-register-bruin-mcp-in-your-ai-tool",[6526],{"type":47,"value":6527},"1. Register Bruin MCP in your AI tool",{"type":41,"tag":50,"props":6529,"children":6530},{},[6531],{"type":47,"value":6532},"Pick the tab that matches the tool you're using. Bruin MCP is stateless — register it once per machine, not per project.",{"type":41,"tag":6534,"props":6535,"children":6537},"variant-tabs",{":variants":6536},"[{\"id\":\"claude-code\",\"label\":\"Claude Code\"},{\"id\":\"cursor\",\"label\":\"Cursor\"},{\"id\":\"codex\",\"label\":\"Codex\"}]",[6538,6628,6783],{"type":41,"tag":6539,"props":6540,"children":6541},"template",{"v-slot:claude-code":7},[6542,6547,6552,6596,6601],{"type":41,"tag":146,"props":6543,"children":6545},{"id":6544},"claude-code",[6546],{"type":47,"value":6392},{"type":41,"tag":50,"props":6548,"children":6549},{},[6550],{"type":47,"value":6551},"Run this once in your terminal:",{"type":41,"tag":153,"props":6553,"children":6555},{"className":155,"code":6554,"language":157,"meta":7,"style":7},"claude mcp add bruin -- bruin mcp\n",[6556],{"type":41,"tag":56,"props":6557,"children":6558},{"__ignoreMap":7},[6559],{"type":41,"tag":163,"props":6560,"children":6561},{"class":165,"line":166},[6562,6567,6572,6577,6582,6587,6591],{"type":41,"tag":163,"props":6563,"children":6564},{"style":170},[6565],{"type":47,"value":6566},"claude",{"type":41,"tag":163,"props":6568,"children":6569},{"style":182},[6570],{"type":47,"value":6571}," mcp",{"type":41,"tag":163,"props":6573,"children":6574},{"style":182},[6575],{"type":47,"value":6576}," add",{"type":41,"tag":163,"props":6578,"children":6579},{"style":182},[6580],{"type":47,"value":6581}," bruin",{"type":41,"tag":163,"props":6583,"children":6584},{"style":176},[6585],{"type":47,"value":6586}," --",{"type":41,"tag":163,"props":6588,"children":6589},{"style":182},[6590],{"type":47,"value":6581},{"type":41,"tag":163,"props":6592,"children":6593},{"style":182},[6594],{"type":47,"value":6595}," mcp\n",{"type":41,"tag":50,"props":6597,"children":6598},{},[6599],{"type":47,"value":6600},"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":41,"tag":50,"props":6602,"children":6603},{},[6604,6606,6618,6620,6626],{"type":47,"value":6605},"To verify, ask Claude Code: ",{"type":41,"tag":1110,"props":6607,"children":6608},{},[6609,6611,6616],{"type":47,"value":6610},"\"Use the Bruin MCP to list the available ",{"type":41,"tag":56,"props":6612,"children":6614},{"className":6613},[],[6615],{"type":47,"value":103},{"type":47,"value":6617}," commands.\"",{"type":47,"value":6619}," It should reply with a list pulled from ",{"type":41,"tag":56,"props":6621,"children":6623},{"className":6622},[],[6624],{"type":47,"value":6625},"bruin_get_overview",{"type":47,"value":6627}," rather than guessing.",{"type":41,"tag":6539,"props":6629,"children":6630},{"v-slot:cursor":7},[6631,6636,6676,6749,6757],{"type":41,"tag":146,"props":6632,"children":6634},{"id":6633},"cursor",[6635],{"type":47,"value":6393},{"type":41,"tag":5023,"props":6637,"children":6638},{},[6639,6651,6661,6671],{"type":41,"tag":2469,"props":6640,"children":6641},{},[6642,6644,6649],{"type":47,"value":6643},"Open ",{"type":41,"tag":112,"props":6645,"children":6646},{},[6647],{"type":47,"value":6648},"Cursor Settings",{"type":47,"value":6650}," (Cmd/Ctrl + ,)",{"type":41,"tag":2469,"props":6652,"children":6653},{},[6654,6656],{"type":47,"value":6655},"Navigate to ",{"type":41,"tag":112,"props":6657,"children":6658},{},[6659],{"type":47,"value":6660},"MCP & Integrations",{"type":41,"tag":2469,"props":6662,"children":6663},{},[6664,6666],{"type":47,"value":6665},"Click ",{"type":41,"tag":112,"props":6667,"children":6668},{},[6669],{"type":47,"value":6670},"Add Custom MCP",{"type":41,"tag":2469,"props":6672,"children":6673},{},[6674],{"type":47,"value":6675},"Paste:",{"type":41,"tag":153,"props":6677,"children":6681},{"className":6678,"code":6679,"language":6680,"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",[6682],{"type":41,"tag":56,"props":6683,"children":6684},{"__ignoreMap":7},[6685,6693,6701,6709,6717,6725,6733,6741],{"type":41,"tag":163,"props":6686,"children":6687},{"class":165,"line":166},[6688],{"type":41,"tag":163,"props":6689,"children":6690},{},[6691],{"type":47,"value":6692},"{\n",{"type":41,"tag":163,"props":6694,"children":6695},{"class":165,"line":18},[6696],{"type":41,"tag":163,"props":6697,"children":6698},{},[6699],{"type":47,"value":6700},"  \"mcpServers\": {\n",{"type":41,"tag":163,"props":6702,"children":6703},{"class":165,"line":278},[6704],{"type":41,"tag":163,"props":6705,"children":6706},{},[6707],{"type":47,"value":6708},"    \"bruin\": {\n",{"type":41,"tag":163,"props":6710,"children":6711},{"class":165,"line":292},[6712],{"type":41,"tag":163,"props":6713,"children":6714},{},[6715],{"type":47,"value":6716},"      \"command\": \"bruin\",\n",{"type":41,"tag":163,"props":6718,"children":6719},{"class":165,"line":305},[6720],{"type":41,"tag":163,"props":6721,"children":6722},{},[6723],{"type":47,"value":6724},"      \"args\": [\"mcp\"]\n",{"type":41,"tag":163,"props":6726,"children":6727},{"class":165,"line":11},[6728],{"type":41,"tag":163,"props":6729,"children":6730},{},[6731],{"type":47,"value":6732},"    }\n",{"type":41,"tag":163,"props":6734,"children":6735},{"class":165,"line":330},[6736],{"type":41,"tag":163,"props":6737,"children":6738},{},[6739],{"type":47,"value":6740},"  }\n",{"type":41,"tag":163,"props":6742,"children":6743},{"class":165,"line":353},[6744],{"type":41,"tag":163,"props":6745,"children":6746},{},[6747],{"type":47,"value":6748},"}\n",{"type":41,"tag":5023,"props":6750,"children":6751},{"start":305},[6752],{"type":41,"tag":2469,"props":6753,"children":6754},{},[6755],{"type":47,"value":6756},"Restart Cursor.",{"type":41,"tag":50,"props":6758,"children":6759},{},[6760,6762,6774,6776,6782],{"type":47,"value":6761},"To verify, ask Cursor's chat: ",{"type":41,"tag":1110,"props":6763,"children":6764},{},[6765,6767,6772],{"type":47,"value":6766},"\"Use the Bruin MCP to fetch the docs for ",{"type":41,"tag":56,"props":6768,"children":6770},{"className":6769},[],[6771],{"type":47,"value":3949},{"type":47,"value":6773},".\"",{"type":47,"value":6775}," It should pull the doc page via ",{"type":41,"tag":56,"props":6777,"children":6779},{"className":6778},[],[6780],{"type":47,"value":6781},"bruin_get_doc_content",{"type":47,"value":2409},{"type":41,"tag":6539,"props":6784,"children":6785},{"v-slot:codex":7},[6786,6791,6803,6836,6841],{"type":41,"tag":146,"props":6787,"children":6789},{"id":6788},"codex",[6790],{"type":47,"value":6394},{"type":41,"tag":50,"props":6792,"children":6793},{},[6794,6796,6802],{"type":47,"value":6795},"Add this to ",{"type":41,"tag":56,"props":6797,"children":6799},{"className":6798},[],[6800],{"type":47,"value":6801},"~/.codex/config.toml",{"type":47,"value":965},{"type":41,"tag":153,"props":6804,"children":6808},{"className":6805,"code":6806,"language":6807,"meta":7,"style":7},"language-toml shiki shiki-themes github-dark","[mcp_servers.bruin]\ncommand = \"bruin\"\nargs = [\"mcp\"]\n","toml",[6809],{"type":41,"tag":56,"props":6810,"children":6811},{"__ignoreMap":7},[6812,6820,6828],{"type":41,"tag":163,"props":6813,"children":6814},{"class":165,"line":166},[6815],{"type":41,"tag":163,"props":6816,"children":6817},{},[6818],{"type":47,"value":6819},"[mcp_servers.bruin]\n",{"type":41,"tag":163,"props":6821,"children":6822},{"class":165,"line":18},[6823],{"type":41,"tag":163,"props":6824,"children":6825},{},[6826],{"type":47,"value":6827},"command = \"bruin\"\n",{"type":41,"tag":163,"props":6829,"children":6830},{"class":165,"line":278},[6831],{"type":41,"tag":163,"props":6832,"children":6833},{},[6834],{"type":47,"value":6835},"args = [\"mcp\"]\n",{"type":41,"tag":50,"props":6837,"children":6838},{},[6839],{"type":47,"value":6840},"Restart Codex.",{"type":41,"tag":50,"props":6842,"children":6843},{},[6844,6846,6851,6853,6858],{"type":47,"value":6845},"To verify, ask Codex: ",{"type":41,"tag":1110,"props":6847,"children":6848},{},[6849],{"type":47,"value":6850},"\"Use Bruin MCP to list connection types Bruin supports.\"",{"type":47,"value":6852}," It should return the list from ",{"type":41,"tag":56,"props":6854,"children":6856},{"className":6855},[],[6857],{"type":47,"value":6781},{"type":47,"value":2409},{"type":41,"tag":146,"props":6860,"children":6862},{"id":6861},"_2-confirm-bruin-query-works-as-the-agent-will-use-it",[6863,6865,6870],{"type":47,"value":6864},"2. Confirm ",{"type":41,"tag":56,"props":6866,"children":6868},{"className":6867},[],[6869],{"type":47,"value":6447},{"type":47,"value":6871}," works as the agent will use it",{"type":41,"tag":50,"props":6873,"children":6874},{},[6875,6877,6882],{"type":47,"value":6876},"Run a sanity-check query against your warehouse using the ",{"type":41,"tag":112,"props":6878,"children":6879},{},[6880],{"type":47,"value":6881},"scoped config",{"type":47,"value":6883},", exactly the way the agent will:",{"type":41,"tag":153,"props":6885,"children":6887},{"className":155,"code":6886,"language":157,"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",[6888],{"type":41,"tag":56,"props":6889,"children":6890},{"__ignoreMap":7},[6891,6907,6922,6937,6950,6973,6981,6989,6997],{"type":41,"tag":163,"props":6892,"children":6893},{"class":165,"line":166},[6894,6898,6903],{"type":41,"tag":163,"props":6895,"children":6896},{"style":170},[6897],{"type":47,"value":103},{"type":41,"tag":163,"props":6899,"children":6900},{"style":182},[6901],{"type":47,"value":6902}," query",{"type":41,"tag":163,"props":6904,"children":6905},{"style":176},[6906],{"type":47,"value":4166},{"type":41,"tag":163,"props":6908,"children":6909},{"class":165,"line":18},[6910,6914,6918],{"type":41,"tag":163,"props":6911,"children":6912},{"style":176},[6913],{"type":47,"value":4174},{"type":41,"tag":163,"props":6915,"children":6916},{"style":182},[6917],{"type":47,"value":1169},{"type":41,"tag":163,"props":6919,"children":6920},{"style":176},[6921],{"type":47,"value":4166},{"type":41,"tag":163,"props":6923,"children":6924},{"class":165,"line":278},[6925,6929,6933],{"type":41,"tag":163,"props":6926,"children":6927},{"style":176},[6928],{"type":47,"value":4190},{"type":41,"tag":163,"props":6930,"children":6931},{"style":182},[6932],{"type":47,"value":4195},{"type":41,"tag":163,"props":6934,"children":6935},{"style":176},[6936],{"type":47,"value":4166},{"type":41,"tag":163,"props":6938,"children":6939},{"class":165,"line":292},[6940,6945],{"type":41,"tag":163,"props":6941,"children":6942},{"style":176},[6943],{"type":47,"value":6944},"  --query",{"type":41,"tag":163,"props":6946,"children":6947},{"style":182},[6948],{"type":47,"value":6949}," \"SELECT category_name, SUM(revenue_usd) AS rev\n",{"type":41,"tag":163,"props":6951,"children":6952},{"class":165,"line":305},[6953,6958,6963,6968],{"type":41,"tag":163,"props":6954,"children":6955},{"style":182},[6956],{"type":47,"value":6957},"           FROM ",{"type":41,"tag":163,"props":6959,"children":6960},{"style":176},[6961],{"type":47,"value":6962},"\\`",{"type":41,"tag":163,"props":6964,"children":6965},{"style":182},[6966],{"type":47,"value":6967},"bruin-playground-arsalan.contoso_dbt_reports.rpt_revenue_by_segment",{"type":41,"tag":163,"props":6969,"children":6970},{"style":176},[6971],{"type":47,"value":6972},"\\`\n",{"type":41,"tag":163,"props":6974,"children":6975},{"class":165,"line":11},[6976],{"type":41,"tag":163,"props":6977,"children":6978},{"style":182},[6979],{"type":47,"value":6980},"           WHERE year = 2024\n",{"type":41,"tag":163,"props":6982,"children":6983},{"class":165,"line":330},[6984],{"type":41,"tag":163,"props":6985,"children":6986},{"style":182},[6987],{"type":47,"value":6988},"           GROUP BY 1\n",{"type":41,"tag":163,"props":6990,"children":6991},{"class":165,"line":353},[6992],{"type":41,"tag":163,"props":6993,"children":6994},{"style":182},[6995],{"type":47,"value":6996},"           ORDER BY rev DESC\n",{"type":41,"tag":163,"props":6998,"children":6999},{"class":165,"line":371},[7000],{"type":41,"tag":163,"props":7001,"children":7002},{"style":182},[7003],{"type":47,"value":7004},"           LIMIT 10\"\n",{"type":41,"tag":50,"props":7006,"children":7007},{},[7008,7010,7015],{"type":47,"value":7009},"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":41,"tag":56,"props":7011,"children":7013},{"className":7012},[],[7014],{"type":47,"value":421},{"type":47,"value":7016}," identity.",{"type":41,"tag":146,"props":7018,"children":7020},{"id":7019},"_3-add-an-agentsmd-at-the-repo-root",[7021,7023,7028],{"type":47,"value":7022},"3. Add an ",{"type":41,"tag":56,"props":7024,"children":7026},{"className":7025},[],[7027],{"type":47,"value":6432},{"type":47,"value":7029}," at the repo root",{"type":41,"tag":50,"props":7031,"children":7032},{},[7033,7035,7040,7042,7047,7049,7054,7056,7061],{"type":47,"value":7034},"Create ",{"type":41,"tag":56,"props":7036,"children":7038},{"className":7037},[],[7039],{"type":47,"value":6432},{"type":47,"value":7041}," next to ",{"type":41,"tag":56,"props":7043,"children":7045},{"className":7044},[],[7046],{"type":47,"value":142},{"type":47,"value":7048}," (the ",{"type":41,"tag":112,"props":7050,"children":7051},{},[7052],{"type":47,"value":7053},"repo root",{"type":47,"value":7055},", not inside ",{"type":41,"tag":56,"props":7057,"children":7059},{"className":7058},[],[7060],{"type":47,"value":61},{"type":47,"value":7062},"). 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":41,"tag":153,"props":7064,"children":7067},{"className":7065,"code":7066,"language":1268,"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",[7068],{"type":41,"tag":56,"props":7069,"children":7070},{"__ignoreMap":7},[7071,7079,7086,7094,7102,7109,7117,7124,7132,7140,7148,7156,7164,7172,7180,7188,7196,7204,7211,7219,7226,7234,7242,7250,7258,7266,7273,7281,7288,7297,7306,7315,7324,7333,7342,7350,7359,7367,7376,7385,7394,7403,7412,7421,7430],{"type":41,"tag":163,"props":7072,"children":7073},{"class":165,"line":166},[7074],{"type":41,"tag":163,"props":7075,"children":7076},{},[7077],{"type":47,"value":7078},"# AGENTS.md\n",{"type":41,"tag":163,"props":7080,"children":7081},{"class":165,"line":18},[7082],{"type":41,"tag":163,"props":7083,"children":7084},{"emptyLinePlaceholder":4705},[7085],{"type":47,"value":4708},{"type":41,"tag":163,"props":7087,"children":7088},{"class":165,"line":278},[7089],{"type":41,"tag":163,"props":7090,"children":7091},{},[7092],{"type":47,"value":7093},"This repo contains a dbt project plus a Bruin context layer documenting the\n",{"type":41,"tag":163,"props":7095,"children":7096},{"class":165,"line":292},[7097],{"type":41,"tag":163,"props":7098,"children":7099},{},[7100],{"type":47,"value":7101},"warehouse it builds. Use this guide before reading code or running queries.\n",{"type":41,"tag":163,"props":7103,"children":7104},{"class":165,"line":305},[7105],{"type":41,"tag":163,"props":7106,"children":7107},{"emptyLinePlaceholder":4705},[7108],{"type":47,"value":4708},{"type":41,"tag":163,"props":7110,"children":7111},{"class":165,"line":11},[7112],{"type":41,"tag":163,"props":7113,"children":7114},{},[7115],{"type":47,"value":7116},"## Canonical workflow\n",{"type":41,"tag":163,"props":7118,"children":7119},{"class":165,"line":330},[7120],{"type":41,"tag":163,"props":7121,"children":7122},{"emptyLinePlaceholder":4705},[7123],{"type":47,"value":4708},{"type":41,"tag":163,"props":7125,"children":7126},{"class":165,"line":353},[7127],{"type":41,"tag":163,"props":7128,"children":7129},{},[7130],{"type":47,"value":7131},"1. **Read context first.** Before querying, open the relevant\n",{"type":41,"tag":163,"props":7133,"children":7134},{"class":165,"line":371},[7135],{"type":41,"tag":163,"props":7136,"children":7137},{},[7138],{"type":47,"value":7139},"   `context/assets/\u003Cschema>/\u003Ctable>.asset.yml`. It has the description, grain,\n",{"type":41,"tag":163,"props":7141,"children":7142},{"class":165,"line":389},[7143],{"type":41,"tag":163,"props":7144,"children":7145},{},[7146],{"type":47,"value":7147},"   column docs, and quality checks for that table — written from real samples.\n",{"type":41,"tag":163,"props":7149,"children":7150},{"class":165,"line":4619},[7151],{"type":41,"tag":163,"props":7152,"children":7153},{},[7154],{"type":47,"value":7155},"2. **Use Bruin MCP for tooling questions.** Anything like \"how does\n",{"type":41,"tag":163,"props":7157,"children":7158},{"class":165,"line":5561},[7159],{"type":41,"tag":163,"props":7160,"children":7161},{},[7162],{"type":47,"value":7163},"   `bruin import` work?\" or \"what asset types exist?\" — call the MCP server,\n",{"type":41,"tag":163,"props":7165,"children":7166},{"class":165,"line":5573},[7167],{"type":41,"tag":163,"props":7168,"children":7169},{},[7170],{"type":47,"value":7171},"   don't guess from training data.\n",{"type":41,"tag":163,"props":7173,"children":7174},{"class":165,"line":5593},[7175],{"type":41,"tag":163,"props":7176,"children":7177},{},[7178],{"type":47,"value":7179},"3. **Use `bruin query` for SQL.** Always pass `--config-file context/.bruin.yml`\n",{"type":41,"tag":163,"props":7181,"children":7182},{"class":165,"line":5609},[7183],{"type":41,"tag":163,"props":7184,"children":7185},{},[7186],{"type":47,"value":7187},"   so the scoped connection is used.\n",{"type":41,"tag":163,"props":7189,"children":7190},{"class":165,"line":5627},[7191],{"type":41,"tag":163,"props":7192,"children":7193},{},[7194],{"type":47,"value":7195},"4. **Cite the asset(s) you read.** When answering, reference the\n",{"type":41,"tag":163,"props":7197,"children":7198},{"class":165,"line":5640},[7199],{"type":41,"tag":163,"props":7200,"children":7201},{},[7202],{"type":47,"value":7203},"   `context/assets/...asset.yml` files you used.\n",{"type":41,"tag":163,"props":7205,"children":7206},{"class":165,"line":5662},[7207],{"type":41,"tag":163,"props":7208,"children":7209},{"emptyLinePlaceholder":4705},[7210],{"type":47,"value":4708},{"type":41,"tag":163,"props":7212,"children":7213},{"class":165,"line":5682},[7214],{"type":41,"tag":163,"props":7215,"children":7216},{},[7217],{"type":47,"value":7218},"## Data access\n",{"type":41,"tag":163,"props":7220,"children":7221},{"class":165,"line":5698},[7222],{"type":41,"tag":163,"props":7223,"children":7224},{"emptyLinePlaceholder":4705},[7225],{"type":47,"value":4708},{"type":41,"tag":163,"props":7227,"children":7228},{"class":165,"line":5715},[7229],{"type":41,"tag":163,"props":7230,"children":7231},{},[7232],{"type":47,"value":7233},"- Connection name: `contoso_dbt_bq`\n",{"type":41,"tag":163,"props":7235,"children":7236},{"class":165,"line":5727},[7237],{"type":41,"tag":163,"props":7238,"children":7239},{},[7240],{"type":47,"value":7241},"- Auth: Application Default Credentials (inherits `gcloud auth application-default login`)\n",{"type":41,"tag":163,"props":7243,"children":7244},{"class":165,"line":5747},[7245],{"type":41,"tag":163,"props":7246,"children":7247},{},[7248],{"type":47,"value":7249},"- This is **read-only.** Never INSERT, UPDATE, DELETE, MERGE, or DROP.\n",{"type":41,"tag":163,"props":7251,"children":7252},{"class":165,"line":5767},[7253],{"type":41,"tag":163,"props":7254,"children":7255},{},[7256],{"type":47,"value":7257},"- Always show the SQL before executing it.\n",{"type":41,"tag":163,"props":7259,"children":7260},{"class":165,"line":5783},[7261],{"type":41,"tag":163,"props":7262,"children":7263},{},[7264],{"type":47,"value":7265},"- Use `LIMIT 100` (or smaller) when exploring an unfamiliar table.\n",{"type":41,"tag":163,"props":7267,"children":7268},{"class":165,"line":5800},[7269],{"type":41,"tag":163,"props":7270,"children":7271},{"emptyLinePlaceholder":4705},[7272],{"type":47,"value":4708},{"type":41,"tag":163,"props":7274,"children":7275},{"class":165,"line":5820},[7276],{"type":41,"tag":163,"props":7277,"children":7278},{},[7279],{"type":47,"value":7280},"## Layout\n",{"type":41,"tag":163,"props":7282,"children":7283},{"class":165,"line":5836},[7284],{"type":41,"tag":163,"props":7285,"children":7286},{"emptyLinePlaceholder":4705},[7287],{"type":47,"value":4708},{"type":41,"tag":163,"props":7289,"children":7291},{"class":165,"line":7290},29,[7292],{"type":41,"tag":163,"props":7293,"children":7294},{},[7295],{"type":47,"value":7296},"- `models/` — dbt models. Don't run `dbt` for analysis questions; the\n",{"type":41,"tag":163,"props":7298,"children":7300},{"class":165,"line":7299},30,[7301],{"type":41,"tag":163,"props":7302,"children":7303},{},[7304],{"type":47,"value":7305},"  warehouse is already built. Read these only when asked about transformation logic.\n",{"type":41,"tag":163,"props":7307,"children":7309},{"class":165,"line":7308},31,[7310],{"type":41,"tag":163,"props":7311,"children":7312},{},[7313],{"type":47,"value":7314},"- `context/assets/contoso_dbt_raw/` — raw dlt-loaded tables (lowest level).\n",{"type":41,"tag":163,"props":7316,"children":7318},{"class":165,"line":7317},32,[7319],{"type":41,"tag":163,"props":7320,"children":7321},{},[7322],{"type":47,"value":7323},"- `context/assets/contoso_dbt_staging/` — `stg_*` cleaned/typed views.\n",{"type":41,"tag":163,"props":7325,"children":7327},{"class":165,"line":7326},33,[7328],{"type":41,"tag":163,"props":7329,"children":7330},{},[7331],{"type":47,"value":7332},"- `context/assets/contoso_dbt_reports/` — `rpt_*` mart-level reports.\n",{"type":41,"tag":163,"props":7334,"children":7336},{"class":165,"line":7335},34,[7337],{"type":41,"tag":163,"props":7338,"children":7339},{},[7340],{"type":47,"value":7341},"  Prefer these for business questions; staging is for ad-hoc deep dives.\n",{"type":41,"tag":163,"props":7343,"children":7345},{"class":165,"line":7344},35,[7346],{"type":41,"tag":163,"props":7347,"children":7348},{"emptyLinePlaceholder":4705},[7349],{"type":47,"value":4708},{"type":41,"tag":163,"props":7351,"children":7353},{"class":165,"line":7352},36,[7354],{"type":41,"tag":163,"props":7355,"children":7356},{},[7357],{"type":47,"value":7358},"## Things to avoid\n",{"type":41,"tag":163,"props":7360,"children":7362},{"class":165,"line":7361},37,[7363],{"type":41,"tag":163,"props":7364,"children":7365},{"emptyLinePlaceholder":4705},[7366],{"type":47,"value":4708},{"type":41,"tag":163,"props":7368,"children":7370},{"class":165,"line":7369},38,[7371],{"type":41,"tag":163,"props":7372,"children":7373},{},[7374],{"type":47,"value":7375},"- **Don't hand-edit `context/assets/*.asset.yml`.** They're regenerated by\n",{"type":41,"tag":163,"props":7377,"children":7379},{"class":165,"line":7378},39,[7380],{"type":41,"tag":163,"props":7381,"children":7382},{},[7383],{"type":47,"value":7384},"  `generate_context.sh`. Improve descriptions in the dbt model's `schema.yml`\n",{"type":41,"tag":163,"props":7386,"children":7388},{"class":165,"line":7387},40,[7389],{"type":41,"tag":163,"props":7390,"children":7391},{},[7392],{"type":47,"value":7393},"  upstream and re-run the generator.\n",{"type":41,"tag":163,"props":7395,"children":7397},{"class":165,"line":7396},41,[7398],{"type":41,"tag":163,"props":7399,"children":7400},{},[7401],{"type":47,"value":7402},"- **Don't mix configs across pipelines.** This project's connection lives in\n",{"type":41,"tag":163,"props":7404,"children":7406},{"class":165,"line":7405},42,[7407],{"type":41,"tag":163,"props":7408,"children":7409},{},[7410],{"type":47,"value":7411},"  `context/.bruin.yml`; other Bruin pipelines in the repo have their own.\n",{"type":41,"tag":163,"props":7413,"children":7415},{"class":165,"line":7414},43,[7416],{"type":41,"tag":163,"props":7417,"children":7418},{},[7419],{"type":47,"value":7420},"  Always use `--config-file`.\n",{"type":41,"tag":163,"props":7422,"children":7424},{"class":165,"line":7423},44,[7425],{"type":41,"tag":163,"props":7426,"children":7427},{},[7428],{"type":47,"value":7429},"- **Don't trust row counts in descriptions.** They're snapshot-time and may\n",{"type":41,"tag":163,"props":7431,"children":7433},{"class":165,"line":7432},45,[7434],{"type":41,"tag":163,"props":7435,"children":7436},{},[7437],{"type":47,"value":7438},"  be stale. If a question hinges on exact size, run `SELECT COUNT(*)` yourself.\n",{"type":41,"tag":146,"props":7440,"children":7442},{"id":7441},"_4-try-the-loop-end-to-end",[7443],{"type":47,"value":7444},"4. Try the loop end-to-end",{"type":41,"tag":50,"props":7446,"children":7447},{},[7448],{"type":47,"value":7449},"Open your AI tool in this repo and ask a real question, e.g.:",{"type":41,"tag":425,"props":7451,"children":7452},{},[7453],{"type":41,"tag":50,"props":7454,"children":7455},{},[7456,7458,7464],{"type":47,"value":7457},"\"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":41,"tag":56,"props":7459,"children":7461},{"className":7460},[],[7462],{"type":47,"value":7463},"context/assets/...",{"type":47,"value":7465}," files you used.\"",{"type":41,"tag":50,"props":7467,"children":7468},{},[7469],{"type":47,"value":7470},"A correctly-wired agent will:",{"type":41,"tag":5023,"props":7472,"children":7473},{},[7474,7486,7499,7510],{"type":41,"tag":2469,"props":7475,"children":7476},{},[7477,7478,7484],{"type":47,"value":6643},{"type":41,"tag":56,"props":7479,"children":7481},{"className":7480},[],[7482],{"type":47,"value":7483},"context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml",{"type":47,"value":7485}," and confirm the grain",{"type":41,"tag":2469,"props":7487,"children":7488},{},[7489,7491,7497],{"type":47,"value":7490},"Draft a SQL query against ",{"type":41,"tag":56,"props":7492,"children":7494},{"className":7493},[],[7495],{"type":47,"value":7496},"contoso_dbt_reports.rpt_revenue_by_segment",{"type":47,"value":7498}," filtered by year",{"type":41,"tag":2469,"props":7500,"children":7501},{},[7502,7504],{"type":47,"value":7503},"Show the SQL, wait for a go-ahead, then run ",{"type":41,"tag":56,"props":7505,"children":7507},{"className":7506},[],[7508],{"type":47,"value":7509},"bruin query --config-file context/.bruin.yml --connection contoso_dbt_bq --query \"...\"",{"type":41,"tag":2469,"props":7511,"children":7512},{},[7513],{"type":47,"value":7514},"Cite the asset YAML it read",{"type":41,"tag":50,"props":7516,"children":7517},{},[7518,7520,7525],{"type":47,"value":7519},"If it skips step 1 (reading the asset), tighten ",{"type":41,"tag":56,"props":7521,"children":7523},{"className":7522},[],[7524],{"type":47,"value":6432},{"type":47,"value":7526}," — the canonical workflow section is what enforces this behavior.",{"type":41,"tag":42,"props":7528,"children":7530},{"id":7529},"lessons-learned",[7531],{"type":47,"value":7532},"Lessons learned",{"type":41,"tag":2465,"props":7534,"children":7535},{},[7536,7558,7568,7584,7607,7624],{"type":41,"tag":2469,"props":7537,"children":7538},{},[7539,7550,7552,7557],{"type":41,"tag":112,"props":7540,"children":7541},{},[7542,7544,7549],{"type":47,"value":7543},"Isolate ",{"type":41,"tag":56,"props":7545,"children":7547},{"className":7546},[],[7548],{"type":47,"value":69},{"type":47,"value":2409},{"type":47,"value":7551}," A broken sibling connection breaks every command. Always ",{"type":41,"tag":56,"props":7553,"children":7555},{"className":7554},[],[7556],{"type":47,"value":1228},{"type":47,"value":1230},{"type":41,"tag":2469,"props":7559,"children":7560},{},[7561,7566],{"type":41,"tag":112,"props":7562,"children":7563},{},[7564],{"type":47,"value":7565},"ADC > keyfiles",{"type":47,"value":7567}," for agent workflows. No secrets to rotate, no files to gitignore, and the agent runs as the human's identity.",{"type":41,"tag":2469,"props":7569,"children":7570},{},[7571,7576,7578,7583],{"type":41,"tag":112,"props":7572,"children":7573},{},[7574],{"type":47,"value":7575},"Filter loader-internal tables before enhance",{"type":47,"value":7577}," — otherwise Claude burns time describing ",{"type":41,"tag":56,"props":7579,"children":7581},{"className":7580},[],[7582],{"type":47,"value":4655},{"type":47,"value":2409},{"type":41,"tag":2469,"props":7585,"children":7586},{},[7587,7605],{"type":41,"tag":112,"props":7588,"children":7589},{},[7590,7592,7597,7599,7604],{"type":47,"value":7591},"Always ",{"type":41,"tag":56,"props":7593,"children":7595},{"className":7594},[],[7596],{"type":47,"value":1122},{"type":47,"value":7598}," after ",{"type":41,"tag":56,"props":7600,"children":7602},{"className":7601},[],[7603],{"type":47,"value":5106},{"type":47,"value":2409},{"type":47,"value":7606}," Cheap insurance against rare YAML corruption.",{"type":41,"tag":2469,"props":7608,"children":7609},{},[7610,7622],{"type":41,"tag":112,"props":7611,"children":7612},{},[7613,7615,7620],{"type":47,"value":7614},"Re-run ",{"type":41,"tag":56,"props":7616,"children":7618},{"className":7617},[],[7619],{"type":47,"value":5963},{"type":47,"value":7621}," after schema changes.",{"type":47,"value":7623}," Descriptions are snapshot-time; a column rename without regeneration leaves the agent quietly wrong.",{"type":41,"tag":2469,"props":7625,"children":7626},{},[7627,7631,7633,7638],{"type":41,"tag":112,"props":7628,"children":7629},{},[7630],{"type":47,"value":6326},{"type":47,"value":7632}," Improve them upstream in the dbt model's ",{"type":41,"tag":56,"props":7634,"children":7636},{"className":7635},[],[7637],{"type":47,"value":6334},{"type":47,"value":7639}," so the next import + enhance picks the change up.",{"type":41,"tag":42,"props":7641,"children":7643},{"id":7642},"adapting-this-to-a-different-dbt-project",[7644],{"type":47,"value":7645},"Adapting this to a different dbt project",{"type":41,"tag":50,"props":7647,"children":7648},{},[7649],{"type":47,"value":7650},"The minimal recipe for any existing dbt + warehouse setup:",{"type":41,"tag":5023,"props":7652,"children":7653},{},[7654,7663,7680,7689,7694,7703,7712],{"type":41,"tag":2469,"props":7655,"children":7656},{},[7657],{"type":41,"tag":56,"props":7658,"children":7660},{"className":7659},[],[7661],{"type":47,"value":7662},"mkdir -p context/assets",{"type":41,"tag":2469,"props":7664,"children":7665},{},[7666,7668,7673,7675],{"type":47,"value":7667},"Write ",{"type":41,"tag":56,"props":7669,"children":7671},{"className":7670},[],[7672],{"type":47,"value":196},{"type":47,"value":7674}," (scoped) and ",{"type":41,"tag":56,"props":7676,"children":7678},{"className":7677},[],[7679],{"type":47,"value":204},{"type":41,"tag":2469,"props":7681,"children":7682},{},[7683],{"type":41,"tag":56,"props":7684,"children":7686},{"className":7685},[],[7687],{"type":47,"value":7688},"bruin import database --schemas \u003Cyours...> context",{"type":41,"tag":2469,"props":7690,"children":7691},{},[7692],{"type":47,"value":7693},"Delete loader-internal asset YAMLs",{"type":41,"tag":2469,"props":7695,"children":7696},{},[7697],{"type":41,"tag":56,"props":7698,"children":7700},{"className":7699},[],[7701],{"type":47,"value":7702},"bruin ai enhance --claude context/assets",{"type":41,"tag":2469,"props":7704,"children":7705},{},[7706],{"type":41,"tag":56,"props":7707,"children":7709},{"className":7708},[],[7710],{"type":47,"value":7711},"bruin validate --config-file context/.bruin.yml context",{"type":41,"tag":2469,"props":7713,"children":7714},{},[7715,7716,7721,7723,7728,7729],{"type":47,"value":6426},{"type":41,"tag":56,"props":7717,"children":7719},{"className":7718},[],[7720],{"type":47,"value":6432},{"type":47,"value":7722}," that points agents at ",{"type":41,"tag":56,"props":7724,"children":7726},{"className":7725},[],[7727],{"type":47,"value":212},{"type":47,"value":6441},{"type":41,"tag":56,"props":7730,"children":7732},{"className":7731},[],[7733],{"type":47,"value":6447},{"type":41,"tag":50,"props":7735,"children":7736},{},[7737,7739,7744],{"type":47,"value":7738},"That's the whole context layer. Everything else (",{"type":41,"tag":56,"props":7740,"children":7742},{"className":7741},[],[7743],{"type":47,"value":5963},{"type":47,"value":7745},", parity scripts, the contoso reference) is ergonomics on top.",{"type":41,"tag":42,"props":7747,"children":7748},{"id":1233},[7749],{"type":47,"value":1236},{"type":41,"tag":50,"props":7751,"children":7752},{},[7753,7755,7760,7762,7767],{"type":47,"value":7754},"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":41,"tag":56,"props":7756,"children":7758},{"className":7757},[],[7759],{"type":47,"value":6447},{"type":47,"value":7761}," + ADC), and follows a canonical workflow (from ",{"type":41,"tag":56,"props":7763,"children":7765},{"className":7764},[],[7766],{"type":47,"value":6432},{"type":47,"value":7768},"). 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":41,"tag":1250,"props":7770,"children":7771},{},[7772],{"type":47,"value":1254},{"title":7,"searchDepth":18,"depth":18,"links":7774},[7775,7776,7777,7785,7786,7787],{"id":44,"depth":18,"text":48},{"id":82,"depth":18,"text":85},{"id":128,"depth":18,"text":131,"children":7778},[7779,7780,7782,7784],{"id":6524,"depth":278,"text":6527},{"id":6861,"depth":278,"text":7781},"2. Confirm bruin query works as the agent will use it",{"id":7019,"depth":278,"text":7783},"3. Add an AGENTS.md at the repo root",{"id":7441,"depth":278,"text":7444},{"id":7529,"depth":18,"text":7532},{"id":7642,"depth":18,"text":7645},{"id":1233,"depth":18,"text":1236},"content:tutorials:dbt-bruin-analyst:wire-up-agent.md","tutorials/dbt-bruin-analyst/wire-up-agent.md","tutorials/dbt-bruin-analyst/wire-up-agent",1777396709610]