[{"data":1,"prerenderedAt":6595},["ShallowReactive",2],{"tutorial-dbt-bruin-analyst/dbt-prerequisite":3,"content-query-HwKSydlLFH":613,"content-query-g5ZKLlKTWc":1060},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":13,"difficulty":16,"module":5,"step":17,"journeys":18,"learnMore":21,"stepGif":31,"author":32,"body":36,"_type":607,"_id":608,"_source":609,"_file":610,"_stem":611,"_extension":612},"/tutorials/dbt-bruin-analyst/dbt-prerequisite","dbt-bruin-analyst",false,"","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.","2026-04-28",4,"Tutorial",[14,15],"dbt","BigQuery","Beginner",1,[19,20],"Data Analyst","Data Engineer",[22,25,28],{"label":23,"url":24},"Reference project: contoso-dbt on GitHub","https://github.com/arsalann/data_playground/tree/main/contoso-dbt",{"label":26,"url":27},"dbt + BigQuery profile setup","https://docs.getdbt.com/docs/core/connect-data-platform/bigquery-setup",{"label":29,"url":30},"Generating custom schema names in dbt","https://docs.getdbt.com/docs/build/custom-schemas","/img/learn/contoso-dbt-bruin-analyst.gif",{"name":33,"role":34,"image":35},"Bruin Team","Bruin Data","/bruin-logo-2025.svg",{"type":37,"children":38,"toc":597},"root",[39,48,54,60,82,105,122,128,135,147,158,170,176,181,326,362,368,373,398,403,445,450,568,573,579,591],{"type":40,"tag":41,"props":42,"children":44},"element","h2",{"id":43},"what-youll-do",[45],{"type":46,"value":47},"text","What you'll do",{"type":40,"tag":49,"props":50,"children":51},"p",{},[52],{"type":46,"value":53},"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":40,"tag":41,"props":55,"children":57},{"id":56},"why-this-step-matters",[58],{"type":46,"value":59},"Why this step matters",{"type":40,"tag":49,"props":61,"children":62},{},[63,65,71,73,80],{"type":46,"value":64},"The Bruin context layer is ",{"type":40,"tag":66,"props":67,"children":68},"strong",{},[69],{"type":46,"value":70},"documentation-only",{"type":46,"value":72}," 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":40,"tag":74,"props":75,"children":77},"code",{"className":76},[],[78],{"type":46,"value":79},"dbt build",{"type":46,"value":81}," green first, then come back.",{"type":40,"tag":49,"props":83,"children":84},{},[85,87,95,97,103],{"type":46,"value":86},"If you don't already have a project to follow along with, the ",{"type":40,"tag":88,"props":89,"children":92},"a",{"href":24,"rel":90},[91],"nofollow",[93],{"type":46,"value":94},"contoso-dbt reference repo",{"type":46,"value":96}," 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":40,"tag":74,"props":98,"children":100},{"className":99},[],[101],{"type":46,"value":102},"context/",{"type":46,"value":104}," directory holds the Bruin layer we'll build in the next steps.",{"type":40,"tag":106,"props":107,"children":108},"blockquote",{},[109],{"type":40,"tag":49,"props":110,"children":111},{},[112,114,120],{"type":46,"value":113},"If you already have a dbt project building cleanly into a warehouse, skim this page and skip ahead to ",{"type":40,"tag":88,"props":115,"children":117},{"href":116},"/learn/dbt-bruin-analyst/isolated-context",[118],{"type":46,"value":119},"Step 2: Create an Isolated Bruin Context",{"type":46,"value":121},".",{"type":40,"tag":41,"props":123,"children":125},{"id":124},"instructions",[126],{"type":46,"value":127},"Instructions",{"type":40,"tag":129,"props":130,"children":132},"h3",{"id":131},"reference-project-layout",[133],{"type":46,"value":134},"Reference project layout",{"type":40,"tag":49,"props":136,"children":137},{},[138,140,145],{"type":46,"value":139},"The reference project ends up looking like this. The ",{"type":40,"tag":74,"props":141,"children":143},{"className":142},[],[144],{"type":46,"value":102},{"type":46,"value":146}," directory is what this module produces — everything else is dbt prerequisites:",{"type":40,"tag":148,"props":149,"children":153},"pre",{"className":150,"code":152,"language":46},[151],"language-text","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",[154],{"type":40,"tag":74,"props":155,"children":156},{"__ignoreMap":7},[157],{"type":46,"value":152},{"type":40,"tag":49,"props":159,"children":160},{},[161,163,168],{"type":46,"value":162},"The end state is ",{"type":40,"tag":66,"props":164,"children":165},{},[166],{"type":46,"value":167},"40 YAMLs",{"type":46,"value":169}," — one per materialized table — covering raw ingest, staging, and reports.",{"type":40,"tag":129,"props":171,"children":173},{"id":172},"what-the-dbt-half-looks-like",[174],{"type":46,"value":175},"What the dbt half looks like",{"type":40,"tag":49,"props":177,"children":178},{},[179],{"type":46,"value":180},"The contoso-dbt project uses a fairly standard dbt-on-BigQuery setup. If yours looks similar, you're ready:",{"type":40,"tag":182,"props":183,"children":184},"ul",{},[185,223,243,263,282,316],{"type":40,"tag":186,"props":187,"children":188},"li",{},[189,191,197,199,205,207,213,215,221],{"type":46,"value":190},"A ",{"type":40,"tag":74,"props":192,"children":194},{"className":193},[],[195],{"type":46,"value":196},"dbt_project.yml",{"type":46,"value":198}," and a ",{"type":40,"tag":74,"props":200,"children":202},{"className":201},[],[203],{"type":46,"value":204},"profiles.yml",{"type":46,"value":206}," (the reference uses OAuth via ",{"type":40,"tag":74,"props":208,"children":210},{"className":209},[],[211],{"type":46,"value":212},"gcloud auth application-default login",{"type":46,"value":214},", location ",{"type":40,"tag":74,"props":216,"children":218},{"className":217},[],[219],{"type":46,"value":220},"EU",{"type":46,"value":222},")",{"type":40,"tag":186,"props":224,"children":225},{},[226,227,233,235,241],{"type":46,"value":190},{"type":40,"tag":74,"props":228,"children":230},{"className":229},[],[231],{"type":46,"value":232},"models/sources.yml",{"type":46,"value":234}," declaring raw tables loaded by dlt into a ",{"type":40,"tag":74,"props":236,"children":238},{"className":237},[],[239],{"type":46,"value":240},"*_raw",{"type":46,"value":242}," schema",{"type":40,"tag":186,"props":244,"children":245},{},[246,248,254,256,262],{"type":46,"value":247},"Staging models (",{"type":40,"tag":74,"props":249,"children":251},{"className":250},[],[252],{"type":46,"value":253},"stg_*.sql",{"type":46,"value":255},") materialized into a ",{"type":40,"tag":74,"props":257,"children":259},{"className":258},[],[260],{"type":46,"value":261},"*_staging",{"type":46,"value":242},{"type":40,"tag":186,"props":264,"children":265},{},[266,268,274,275,281],{"type":46,"value":267},"Report / mart models (",{"type":40,"tag":74,"props":269,"children":271},{"className":270},[],[272],{"type":46,"value":273},"rpt_*.sql",{"type":46,"value":255},{"type":40,"tag":74,"props":276,"children":278},{"className":277},[],[279],{"type":46,"value":280},"*_reports",{"type":46,"value":242},{"type":40,"tag":186,"props":283,"children":284},{},[285,286,292,294,300,302,308,310],{"type":46,"value":190},{"type":40,"tag":74,"props":287,"children":289},{"className":288},[],[290],{"type":46,"value":291},"generate_schema_name.sql",{"type":46,"value":293}," macro so a ",{"type":40,"tag":74,"props":295,"children":297},{"className":296},[],[298],{"type":46,"value":299},"+schema: staging",{"type":46,"value":301}," config lands as ",{"type":40,"tag":74,"props":303,"children":305},{"className":304},[],[306],{"type":46,"value":307},"contoso_dbt_staging",{"type":46,"value":309},", not ",{"type":40,"tag":74,"props":311,"children":313},{"className":312},[],[314],{"type":46,"value":315},"contoso_dbt_contoso_dbt_staging",{"type":40,"tag":186,"props":317,"children":318},{},[319,324],{"type":40,"tag":74,"props":320,"children":322},{"className":321},[],[323],{"type":46,"value":79},{"type":46,"value":325}," runs cleanly and the tables exist in the warehouse",{"type":40,"tag":106,"props":327,"children":328},{},[329],{"type":40,"tag":49,"props":330,"children":331},{},[332,337,339,345,347,353,355,360],{"type":40,"tag":66,"props":333,"children":334},{},[335],{"type":46,"value":336},"Heads up on schema naming.",{"type":46,"value":338}," dbt's default ",{"type":40,"tag":74,"props":340,"children":342},{"className":341},[],[343],{"type":46,"value":344},"generate_schema_name",{"type":46,"value":346}," macro concatenates the target schema with the ",{"type":40,"tag":74,"props":348,"children":350},{"className":349},[],[351],{"type":46,"value":352},"+schema",{"type":46,"value":354}," config, which is rarely what you want. The reference project overrides it to use the ",{"type":40,"tag":74,"props":356,"children":358},{"className":357},[],[359],{"type":46,"value":352},{"type":46,"value":361}," value directly. If your final schema names look doubled-up, this is usually why.",{"type":40,"tag":129,"props":363,"children":365},{"id":364},"verify-the-warehouse-has-data",[366],{"type":46,"value":367},"Verify the warehouse has data",{"type":40,"tag":49,"props":369,"children":370},{},[371],{"type":46,"value":372},"Before moving to the Bruin steps, make sure your dbt-built tables actually exist. From your dbt project root:",{"type":40,"tag":148,"props":374,"children":378},{"className":375,"code":376,"language":377,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","dbt build\n","bash",[379],{"type":40,"tag":74,"props":380,"children":381},{"__ignoreMap":7},[382],{"type":40,"tag":383,"props":384,"children":386},"span",{"class":385,"line":17},"line",[387,392],{"type":40,"tag":383,"props":388,"children":390},{"style":389},"--shiki-default:#B392F0",[391],{"type":46,"value":14},{"type":40,"tag":383,"props":393,"children":395},{"style":394},"--shiki-default:#9ECBFF",[396],{"type":46,"value":397}," build\n",{"type":40,"tag":49,"props":399,"children":400},{},[401],{"type":46,"value":402},"Then spot-check the warehouse. For BigQuery:",{"type":40,"tag":148,"props":404,"children":406},{"className":375,"code":405,"language":377,"meta":7,"style":7},"bq ls bruin-playground-arsalan:contoso_dbt_staging\nbq ls bruin-playground-arsalan:contoso_dbt_reports\n",[407],{"type":40,"tag":74,"props":408,"children":409},{"__ignoreMap":7},[410,428],{"type":40,"tag":383,"props":411,"children":412},{"class":385,"line":17},[413,418,423],{"type":40,"tag":383,"props":414,"children":415},{"style":389},[416],{"type":46,"value":417},"bq",{"type":40,"tag":383,"props":419,"children":420},{"style":394},[421],{"type":46,"value":422}," ls",{"type":40,"tag":383,"props":424,"children":425},{"style":394},[426],{"type":46,"value":427}," bruin-playground-arsalan:contoso_dbt_staging\n",{"type":40,"tag":383,"props":429,"children":431},{"class":385,"line":430},2,[432,436,440],{"type":40,"tag":383,"props":433,"children":434},{"style":389},[435],{"type":46,"value":417},{"type":40,"tag":383,"props":437,"children":438},{"style":394},[439],{"type":46,"value":422},{"type":40,"tag":383,"props":441,"children":442},{"style":394},[443],{"type":46,"value":444}," bruin-playground-arsalan:contoso_dbt_reports\n",{"type":40,"tag":49,"props":446,"children":447},{},[448],{"type":46,"value":449},"For Postgres / Redshift:",{"type":40,"tag":148,"props":451,"children":455},{"className":452,"code":453,"language":454,"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",[456],{"type":40,"tag":74,"props":457,"children":458},{"__ignoreMap":7},[459,474,497,541],{"type":40,"tag":383,"props":460,"children":461},{"class":385,"line":17},[462,468],{"type":40,"tag":383,"props":463,"children":465},{"style":464},"--shiki-default:#F97583",[466],{"type":46,"value":467},"SELECT",{"type":40,"tag":383,"props":469,"children":471},{"style":470},"--shiki-default:#E1E4E8",[472],{"type":46,"value":473}," table_schema, table_name\n",{"type":40,"tag":383,"props":475,"children":476},{"class":385,"line":430},[477,482,488,492],{"type":40,"tag":383,"props":478,"children":479},{"style":464},[480],{"type":46,"value":481},"FROM",{"type":40,"tag":383,"props":483,"children":485},{"style":484},"--shiki-default:#79B8FF",[486],{"type":46,"value":487}," information_schema",{"type":40,"tag":383,"props":489,"children":490},{"style":470},[491],{"type":46,"value":121},{"type":40,"tag":383,"props":493,"children":494},{"style":484},[495],{"type":46,"value":496},"tables\n",{"type":40,"tag":383,"props":498,"children":500},{"class":385,"line":499},3,[501,506,511,516,521,526,531,536],{"type":40,"tag":383,"props":502,"children":503},{"style":464},[504],{"type":46,"value":505},"WHERE",{"type":40,"tag":383,"props":507,"children":508},{"style":470},[509],{"type":46,"value":510}," table_schema ",{"type":40,"tag":383,"props":512,"children":513},{"style":464},[514],{"type":46,"value":515},"IN",{"type":40,"tag":383,"props":517,"children":518},{"style":470},[519],{"type":46,"value":520}," (",{"type":40,"tag":383,"props":522,"children":523},{"style":394},[524],{"type":46,"value":525},"'contoso_dbt_staging'",{"type":40,"tag":383,"props":527,"children":528},{"style":470},[529],{"type":46,"value":530},", ",{"type":40,"tag":383,"props":532,"children":533},{"style":394},[534],{"type":46,"value":535},"'contoso_dbt_reports'",{"type":40,"tag":383,"props":537,"children":538},{"style":470},[539],{"type":46,"value":540},")\n",{"type":40,"tag":383,"props":542,"children":543},{"class":385,"line":11},[544,549,554,558,563],{"type":40,"tag":383,"props":545,"children":546},{"style":464},[547],{"type":46,"value":548},"ORDER BY",{"type":40,"tag":383,"props":550,"children":551},{"style":484},[552],{"type":46,"value":553}," 1",{"type":40,"tag":383,"props":555,"children":556},{"style":470},[557],{"type":46,"value":530},{"type":40,"tag":383,"props":559,"children":560},{"style":484},[561],{"type":46,"value":562},"2",{"type":40,"tag":383,"props":564,"children":565},{"style":470},[566],{"type":46,"value":567},";\n",{"type":40,"tag":49,"props":569,"children":570},{},[571],{"type":46,"value":572},"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":40,"tag":41,"props":574,"children":576},{"id":575},"what-just-happened",[577],{"type":46,"value":578},"What just happened",{"type":40,"tag":49,"props":580,"children":581},{},[582,584,590],{"type":46,"value":583},"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":40,"tag":74,"props":585,"children":587},{"className":586},[],[588],{"type":46,"value":589},"bruin",{"type":46,"value":121},{"type":40,"tag":592,"props":593,"children":594},"style",{},[595],{"type":46,"value":596},"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":430,"depth":430,"links":598},[599,600,601,606],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":602},[603,604,605],{"id":131,"depth":499,"text":134},{"id":172,"depth":499,"text":175},{"id":364,"depth":499,"text":367},{"id":575,"depth":430,"text":578},"markdown","content:tutorials:dbt-bruin-analyst:dbt-prerequisite.md","content","tutorials/dbt-bruin-analyst/dbt-prerequisite.md","tutorials/dbt-bruin-analyst/dbt-prerequisite","md",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":614,"difficulty":16,"module":5,"step":17,"journeys":615,"learnMore":616,"stepGif":31,"author":620,"body":621,"_type":607,"_id":608,"_source":609,"_file":610,"_stem":611,"_extension":612},[14,15],[19,20],[617,618,619],{"label":23,"url":24},{"label":26,"url":27},{"label":29,"url":30},{"name":33,"role":34,"image":35},{"type":37,"children":622,"toc":1050},[623,627,631,635,650,666,678,682,686,696,704,713,717,721,836,865,869,873,890,894,930,934,1028,1032,1036,1046],{"type":40,"tag":41,"props":624,"children":625},{"id":43},[626],{"type":46,"value":47},{"type":40,"tag":49,"props":628,"children":629},{},[630],{"type":46,"value":53},{"type":40,"tag":41,"props":632,"children":633},{"id":56},[634],{"type":46,"value":59},{"type":40,"tag":49,"props":636,"children":637},{},[638,639,643,644,649],{"type":46,"value":64},{"type":40,"tag":66,"props":640,"children":641},{},[642],{"type":46,"value":70},{"type":46,"value":72},{"type":40,"tag":74,"props":645,"children":647},{"className":646},[],[648],{"type":46,"value":79},{"type":46,"value":81},{"type":40,"tag":49,"props":651,"children":652},{},[653,654,659,660,665],{"type":46,"value":86},{"type":40,"tag":88,"props":655,"children":657},{"href":24,"rel":656},[91],[658],{"type":46,"value":94},{"type":46,"value":96},{"type":40,"tag":74,"props":661,"children":663},{"className":662},[],[664],{"type":46,"value":102},{"type":46,"value":104},{"type":40,"tag":106,"props":667,"children":668},{},[669],{"type":40,"tag":49,"props":670,"children":671},{},[672,673,677],{"type":46,"value":113},{"type":40,"tag":88,"props":674,"children":675},{"href":116},[676],{"type":46,"value":119},{"type":46,"value":121},{"type":40,"tag":41,"props":679,"children":680},{"id":124},[681],{"type":46,"value":127},{"type":40,"tag":129,"props":683,"children":684},{"id":131},[685],{"type":46,"value":134},{"type":40,"tag":49,"props":687,"children":688},{},[689,690,695],{"type":46,"value":139},{"type":40,"tag":74,"props":691,"children":693},{"className":692},[],[694],{"type":46,"value":102},{"type":46,"value":146},{"type":40,"tag":148,"props":697,"children":699},{"className":698,"code":152,"language":46},[151],[700],{"type":40,"tag":74,"props":701,"children":702},{"__ignoreMap":7},[703],{"type":46,"value":152},{"type":40,"tag":49,"props":705,"children":706},{},[707,708,712],{"type":46,"value":162},{"type":40,"tag":66,"props":709,"children":710},{},[711],{"type":46,"value":167},{"type":46,"value":169},{"type":40,"tag":129,"props":714,"children":715},{"id":172},[716],{"type":46,"value":175},{"type":40,"tag":49,"props":718,"children":719},{},[720],{"type":46,"value":180},{"type":40,"tag":182,"props":722,"children":723},{},[724,752,768,784,800,827],{"type":40,"tag":186,"props":725,"children":726},{},[727,728,733,734,739,740,745,746,751],{"type":46,"value":190},{"type":40,"tag":74,"props":729,"children":731},{"className":730},[],[732],{"type":46,"value":196},{"type":46,"value":198},{"type":40,"tag":74,"props":735,"children":737},{"className":736},[],[738],{"type":46,"value":204},{"type":46,"value":206},{"type":40,"tag":74,"props":741,"children":743},{"className":742},[],[744],{"type":46,"value":212},{"type":46,"value":214},{"type":40,"tag":74,"props":747,"children":749},{"className":748},[],[750],{"type":46,"value":220},{"type":46,"value":222},{"type":40,"tag":186,"props":753,"children":754},{},[755,756,761,762,767],{"type":46,"value":190},{"type":40,"tag":74,"props":757,"children":759},{"className":758},[],[760],{"type":46,"value":232},{"type":46,"value":234},{"type":40,"tag":74,"props":763,"children":765},{"className":764},[],[766],{"type":46,"value":240},{"type":46,"value":242},{"type":40,"tag":186,"props":769,"children":770},{},[771,772,777,778,783],{"type":46,"value":247},{"type":40,"tag":74,"props":773,"children":775},{"className":774},[],[776],{"type":46,"value":253},{"type":46,"value":255},{"type":40,"tag":74,"props":779,"children":781},{"className":780},[],[782],{"type":46,"value":261},{"type":46,"value":242},{"type":40,"tag":186,"props":785,"children":786},{},[787,788,793,794,799],{"type":46,"value":267},{"type":40,"tag":74,"props":789,"children":791},{"className":790},[],[792],{"type":46,"value":273},{"type":46,"value":255},{"type":40,"tag":74,"props":795,"children":797},{"className":796},[],[798],{"type":46,"value":280},{"type":46,"value":242},{"type":40,"tag":186,"props":801,"children":802},{},[803,804,809,810,815,816,821,822],{"type":46,"value":190},{"type":40,"tag":74,"props":805,"children":807},{"className":806},[],[808],{"type":46,"value":291},{"type":46,"value":293},{"type":40,"tag":74,"props":811,"children":813},{"className":812},[],[814],{"type":46,"value":299},{"type":46,"value":301},{"type":40,"tag":74,"props":817,"children":819},{"className":818},[],[820],{"type":46,"value":307},{"type":46,"value":309},{"type":40,"tag":74,"props":823,"children":825},{"className":824},[],[826],{"type":46,"value":315},{"type":40,"tag":186,"props":828,"children":829},{},[830,835],{"type":40,"tag":74,"props":831,"children":833},{"className":832},[],[834],{"type":46,"value":79},{"type":46,"value":325},{"type":40,"tag":106,"props":837,"children":838},{},[839],{"type":40,"tag":49,"props":840,"children":841},{},[842,846,847,852,853,858,859,864],{"type":40,"tag":66,"props":843,"children":844},{},[845],{"type":46,"value":336},{"type":46,"value":338},{"type":40,"tag":74,"props":848,"children":850},{"className":849},[],[851],{"type":46,"value":344},{"type":46,"value":346},{"type":40,"tag":74,"props":854,"children":856},{"className":855},[],[857],{"type":46,"value":352},{"type":46,"value":354},{"type":40,"tag":74,"props":860,"children":862},{"className":861},[],[863],{"type":46,"value":352},{"type":46,"value":361},{"type":40,"tag":129,"props":866,"children":867},{"id":364},[868],{"type":46,"value":367},{"type":40,"tag":49,"props":870,"children":871},{},[872],{"type":46,"value":372},{"type":40,"tag":148,"props":874,"children":875},{"className":375,"code":376,"language":377,"meta":7,"style":7},[876],{"type":40,"tag":74,"props":877,"children":878},{"__ignoreMap":7},[879],{"type":40,"tag":383,"props":880,"children":881},{"class":385,"line":17},[882,886],{"type":40,"tag":383,"props":883,"children":884},{"style":389},[885],{"type":46,"value":14},{"type":40,"tag":383,"props":887,"children":888},{"style":394},[889],{"type":46,"value":397},{"type":40,"tag":49,"props":891,"children":892},{},[893],{"type":46,"value":402},{"type":40,"tag":148,"props":895,"children":896},{"className":375,"code":405,"language":377,"meta":7,"style":7},[897],{"type":40,"tag":74,"props":898,"children":899},{"__ignoreMap":7},[900,915],{"type":40,"tag":383,"props":901,"children":902},{"class":385,"line":17},[903,907,911],{"type":40,"tag":383,"props":904,"children":905},{"style":389},[906],{"type":46,"value":417},{"type":40,"tag":383,"props":908,"children":909},{"style":394},[910],{"type":46,"value":422},{"type":40,"tag":383,"props":912,"children":913},{"style":394},[914],{"type":46,"value":427},{"type":40,"tag":383,"props":916,"children":917},{"class":385,"line":430},[918,922,926],{"type":40,"tag":383,"props":919,"children":920},{"style":389},[921],{"type":46,"value":417},{"type":40,"tag":383,"props":923,"children":924},{"style":394},[925],{"type":46,"value":422},{"type":40,"tag":383,"props":927,"children":928},{"style":394},[929],{"type":46,"value":444},{"type":40,"tag":49,"props":931,"children":932},{},[933],{"type":46,"value":449},{"type":40,"tag":148,"props":935,"children":936},{"className":452,"code":453,"language":454,"meta":7,"style":7},[937],{"type":40,"tag":74,"props":938,"children":939},{"__ignoreMap":7},[940,951,970,1005],{"type":40,"tag":383,"props":941,"children":942},{"class":385,"line":17},[943,947],{"type":40,"tag":383,"props":944,"children":945},{"style":464},[946],{"type":46,"value":467},{"type":40,"tag":383,"props":948,"children":949},{"style":470},[950],{"type":46,"value":473},{"type":40,"tag":383,"props":952,"children":953},{"class":385,"line":430},[954,958,962,966],{"type":40,"tag":383,"props":955,"children":956},{"style":464},[957],{"type":46,"value":481},{"type":40,"tag":383,"props":959,"children":960},{"style":484},[961],{"type":46,"value":487},{"type":40,"tag":383,"props":963,"children":964},{"style":470},[965],{"type":46,"value":121},{"type":40,"tag":383,"props":967,"children":968},{"style":484},[969],{"type":46,"value":496},{"type":40,"tag":383,"props":971,"children":972},{"class":385,"line":499},[973,977,981,985,989,993,997,1001],{"type":40,"tag":383,"props":974,"children":975},{"style":464},[976],{"type":46,"value":505},{"type":40,"tag":383,"props":978,"children":979},{"style":470},[980],{"type":46,"value":510},{"type":40,"tag":383,"props":982,"children":983},{"style":464},[984],{"type":46,"value":515},{"type":40,"tag":383,"props":986,"children":987},{"style":470},[988],{"type":46,"value":520},{"type":40,"tag":383,"props":990,"children":991},{"style":394},[992],{"type":46,"value":525},{"type":40,"tag":383,"props":994,"children":995},{"style":470},[996],{"type":46,"value":530},{"type":40,"tag":383,"props":998,"children":999},{"style":394},[1000],{"type":46,"value":535},{"type":40,"tag":383,"props":1002,"children":1003},{"style":470},[1004],{"type":46,"value":540},{"type":40,"tag":383,"props":1006,"children":1007},{"class":385,"line":11},[1008,1012,1016,1020,1024],{"type":40,"tag":383,"props":1009,"children":1010},{"style":464},[1011],{"type":46,"value":548},{"type":40,"tag":383,"props":1013,"children":1014},{"style":484},[1015],{"type":46,"value":553},{"type":40,"tag":383,"props":1017,"children":1018},{"style":470},[1019],{"type":46,"value":530},{"type":40,"tag":383,"props":1021,"children":1022},{"style":484},[1023],{"type":46,"value":562},{"type":40,"tag":383,"props":1025,"children":1026},{"style":470},[1027],{"type":46,"value":567},{"type":40,"tag":49,"props":1029,"children":1030},{},[1031],{"type":46,"value":572},{"type":40,"tag":41,"props":1033,"children":1034},{"id":575},[1035],{"type":46,"value":578},{"type":40,"tag":49,"props":1037,"children":1038},{},[1039,1040,1045],{"type":46,"value":583},{"type":40,"tag":74,"props":1041,"children":1043},{"className":1042},[],[1044],{"type":46,"value":589},{"type":46,"value":121},{"type":40,"tag":592,"props":1047,"children":1048},{},[1049],{"type":46,"value":596},{"title":7,"searchDepth":430,"depth":430,"links":1051},[1052,1053,1054,1059],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":1055},[1056,1057,1058],{"id":131,"depth":499,"text":134},{"id":172,"depth":499,"text":175},{"id":364,"depth":499,"text":367},{"id":575,"depth":430,"text":578},[1061,1508,2723,3802,5190],{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"readingTime":11,"category":12,"tags":1062,"difficulty":16,"module":5,"step":17,"journeys":1063,"learnMore":1064,"stepGif":31,"author":1068,"body":1069,"_type":607,"_id":608,"_source":609,"_file":610,"_stem":611,"_extension":612},[14,15],[19,20],[1065,1066,1067],{"label":23,"url":24},{"label":26,"url":27},{"label":29,"url":30},{"name":33,"role":34,"image":35},{"type":37,"children":1070,"toc":1498},[1071,1075,1079,1083,1098,1114,1126,1130,1134,1144,1152,1161,1165,1169,1284,1313,1317,1321,1338,1342,1378,1382,1476,1480,1484,1494],{"type":40,"tag":41,"props":1072,"children":1073},{"id":43},[1074],{"type":46,"value":47},{"type":40,"tag":49,"props":1076,"children":1077},{},[1078],{"type":46,"value":53},{"type":40,"tag":41,"props":1080,"children":1081},{"id":56},[1082],{"type":46,"value":59},{"type":40,"tag":49,"props":1084,"children":1085},{},[1086,1087,1091,1092,1097],{"type":46,"value":64},{"type":40,"tag":66,"props":1088,"children":1089},{},[1090],{"type":46,"value":70},{"type":46,"value":72},{"type":40,"tag":74,"props":1093,"children":1095},{"className":1094},[],[1096],{"type":46,"value":79},{"type":46,"value":81},{"type":40,"tag":49,"props":1099,"children":1100},{},[1101,1102,1107,1108,1113],{"type":46,"value":86},{"type":40,"tag":88,"props":1103,"children":1105},{"href":24,"rel":1104},[91],[1106],{"type":46,"value":94},{"type":46,"value":96},{"type":40,"tag":74,"props":1109,"children":1111},{"className":1110},[],[1112],{"type":46,"value":102},{"type":46,"value":104},{"type":40,"tag":106,"props":1115,"children":1116},{},[1117],{"type":40,"tag":49,"props":1118,"children":1119},{},[1120,1121,1125],{"type":46,"value":113},{"type":40,"tag":88,"props":1122,"children":1123},{"href":116},[1124],{"type":46,"value":119},{"type":46,"value":121},{"type":40,"tag":41,"props":1127,"children":1128},{"id":124},[1129],{"type":46,"value":127},{"type":40,"tag":129,"props":1131,"children":1132},{"id":131},[1133],{"type":46,"value":134},{"type":40,"tag":49,"props":1135,"children":1136},{},[1137,1138,1143],{"type":46,"value":139},{"type":40,"tag":74,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":46,"value":102},{"type":46,"value":146},{"type":40,"tag":148,"props":1145,"children":1147},{"className":1146,"code":152,"language":46},[151],[1148],{"type":40,"tag":74,"props":1149,"children":1150},{"__ignoreMap":7},[1151],{"type":46,"value":152},{"type":40,"tag":49,"props":1153,"children":1154},{},[1155,1156,1160],{"type":46,"value":162},{"type":40,"tag":66,"props":1157,"children":1158},{},[1159],{"type":46,"value":167},{"type":46,"value":169},{"type":40,"tag":129,"props":1162,"children":1163},{"id":172},[1164],{"type":46,"value":175},{"type":40,"tag":49,"props":1166,"children":1167},{},[1168],{"type":46,"value":180},{"type":40,"tag":182,"props":1170,"children":1171},{},[1172,1200,1216,1232,1248,1275],{"type":40,"tag":186,"props":1173,"children":1174},{},[1175,1176,1181,1182,1187,1188,1193,1194,1199],{"type":46,"value":190},{"type":40,"tag":74,"props":1177,"children":1179},{"className":1178},[],[1180],{"type":46,"value":196},{"type":46,"value":198},{"type":40,"tag":74,"props":1183,"children":1185},{"className":1184},[],[1186],{"type":46,"value":204},{"type":46,"value":206},{"type":40,"tag":74,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":46,"value":212},{"type":46,"value":214},{"type":40,"tag":74,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":46,"value":220},{"type":46,"value":222},{"type":40,"tag":186,"props":1201,"children":1202},{},[1203,1204,1209,1210,1215],{"type":46,"value":190},{"type":40,"tag":74,"props":1205,"children":1207},{"className":1206},[],[1208],{"type":46,"value":232},{"type":46,"value":234},{"type":40,"tag":74,"props":1211,"children":1213},{"className":1212},[],[1214],{"type":46,"value":240},{"type":46,"value":242},{"type":40,"tag":186,"props":1217,"children":1218},{},[1219,1220,1225,1226,1231],{"type":46,"value":247},{"type":40,"tag":74,"props":1221,"children":1223},{"className":1222},[],[1224],{"type":46,"value":253},{"type":46,"value":255},{"type":40,"tag":74,"props":1227,"children":1229},{"className":1228},[],[1230],{"type":46,"value":261},{"type":46,"value":242},{"type":40,"tag":186,"props":1233,"children":1234},{},[1235,1236,1241,1242,1247],{"type":46,"value":267},{"type":40,"tag":74,"props":1237,"children":1239},{"className":1238},[],[1240],{"type":46,"value":273},{"type":46,"value":255},{"type":40,"tag":74,"props":1243,"children":1245},{"className":1244},[],[1246],{"type":46,"value":280},{"type":46,"value":242},{"type":40,"tag":186,"props":1249,"children":1250},{},[1251,1252,1257,1258,1263,1264,1269,1270],{"type":46,"value":190},{"type":40,"tag":74,"props":1253,"children":1255},{"className":1254},[],[1256],{"type":46,"value":291},{"type":46,"value":293},{"type":40,"tag":74,"props":1259,"children":1261},{"className":1260},[],[1262],{"type":46,"value":299},{"type":46,"value":301},{"type":40,"tag":74,"props":1265,"children":1267},{"className":1266},[],[1268],{"type":46,"value":307},{"type":46,"value":309},{"type":40,"tag":74,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":46,"value":315},{"type":40,"tag":186,"props":1276,"children":1277},{},[1278,1283],{"type":40,"tag":74,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":46,"value":79},{"type":46,"value":325},{"type":40,"tag":106,"props":1285,"children":1286},{},[1287],{"type":40,"tag":49,"props":1288,"children":1289},{},[1290,1294,1295,1300,1301,1306,1307,1312],{"type":40,"tag":66,"props":1291,"children":1292},{},[1293],{"type":46,"value":336},{"type":46,"value":338},{"type":40,"tag":74,"props":1296,"children":1298},{"className":1297},[],[1299],{"type":46,"value":344},{"type":46,"value":346},{"type":40,"tag":74,"props":1302,"children":1304},{"className":1303},[],[1305],{"type":46,"value":352},{"type":46,"value":354},{"type":40,"tag":74,"props":1308,"children":1310},{"className":1309},[],[1311],{"type":46,"value":352},{"type":46,"value":361},{"type":40,"tag":129,"props":1314,"children":1315},{"id":364},[1316],{"type":46,"value":367},{"type":40,"tag":49,"props":1318,"children":1319},{},[1320],{"type":46,"value":372},{"type":40,"tag":148,"props":1322,"children":1323},{"className":375,"code":376,"language":377,"meta":7,"style":7},[1324],{"type":40,"tag":74,"props":1325,"children":1326},{"__ignoreMap":7},[1327],{"type":40,"tag":383,"props":1328,"children":1329},{"class":385,"line":17},[1330,1334],{"type":40,"tag":383,"props":1331,"children":1332},{"style":389},[1333],{"type":46,"value":14},{"type":40,"tag":383,"props":1335,"children":1336},{"style":394},[1337],{"type":46,"value":397},{"type":40,"tag":49,"props":1339,"children":1340},{},[1341],{"type":46,"value":402},{"type":40,"tag":148,"props":1343,"children":1344},{"className":375,"code":405,"language":377,"meta":7,"style":7},[1345],{"type":40,"tag":74,"props":1346,"children":1347},{"__ignoreMap":7},[1348,1363],{"type":40,"tag":383,"props":1349,"children":1350},{"class":385,"line":17},[1351,1355,1359],{"type":40,"tag":383,"props":1352,"children":1353},{"style":389},[1354],{"type":46,"value":417},{"type":40,"tag":383,"props":1356,"children":1357},{"style":394},[1358],{"type":46,"value":422},{"type":40,"tag":383,"props":1360,"children":1361},{"style":394},[1362],{"type":46,"value":427},{"type":40,"tag":383,"props":1364,"children":1365},{"class":385,"line":430},[1366,1370,1374],{"type":40,"tag":383,"props":1367,"children":1368},{"style":389},[1369],{"type":46,"value":417},{"type":40,"tag":383,"props":1371,"children":1372},{"style":394},[1373],{"type":46,"value":422},{"type":40,"tag":383,"props":1375,"children":1376},{"style":394},[1377],{"type":46,"value":444},{"type":40,"tag":49,"props":1379,"children":1380},{},[1381],{"type":46,"value":449},{"type":40,"tag":148,"props":1383,"children":1384},{"className":452,"code":453,"language":454,"meta":7,"style":7},[1385],{"type":40,"tag":74,"props":1386,"children":1387},{"__ignoreMap":7},[1388,1399,1418,1453],{"type":40,"tag":383,"props":1389,"children":1390},{"class":385,"line":17},[1391,1395],{"type":40,"tag":383,"props":1392,"children":1393},{"style":464},[1394],{"type":46,"value":467},{"type":40,"tag":383,"props":1396,"children":1397},{"style":470},[1398],{"type":46,"value":473},{"type":40,"tag":383,"props":1400,"children":1401},{"class":385,"line":430},[1402,1406,1410,1414],{"type":40,"tag":383,"props":1403,"children":1404},{"style":464},[1405],{"type":46,"value":481},{"type":40,"tag":383,"props":1407,"children":1408},{"style":484},[1409],{"type":46,"value":487},{"type":40,"tag":383,"props":1411,"children":1412},{"style":470},[1413],{"type":46,"value":121},{"type":40,"tag":383,"props":1415,"children":1416},{"style":484},[1417],{"type":46,"value":496},{"type":40,"tag":383,"props":1419,"children":1420},{"class":385,"line":499},[1421,1425,1429,1433,1437,1441,1445,1449],{"type":40,"tag":383,"props":1422,"children":1423},{"style":464},[1424],{"type":46,"value":505},{"type":40,"tag":383,"props":1426,"children":1427},{"style":470},[1428],{"type":46,"value":510},{"type":40,"tag":383,"props":1430,"children":1431},{"style":464},[1432],{"type":46,"value":515},{"type":40,"tag":383,"props":1434,"children":1435},{"style":470},[1436],{"type":46,"value":520},{"type":40,"tag":383,"props":1438,"children":1439},{"style":394},[1440],{"type":46,"value":525},{"type":40,"tag":383,"props":1442,"children":1443},{"style":470},[1444],{"type":46,"value":530},{"type":40,"tag":383,"props":1446,"children":1447},{"style":394},[1448],{"type":46,"value":535},{"type":40,"tag":383,"props":1450,"children":1451},{"style":470},[1452],{"type":46,"value":540},{"type":40,"tag":383,"props":1454,"children":1455},{"class":385,"line":11},[1456,1460,1464,1468,1472],{"type":40,"tag":383,"props":1457,"children":1458},{"style":464},[1459],{"type":46,"value":548},{"type":40,"tag":383,"props":1461,"children":1462},{"style":484},[1463],{"type":46,"value":553},{"type":40,"tag":383,"props":1465,"children":1466},{"style":470},[1467],{"type":46,"value":530},{"type":40,"tag":383,"props":1469,"children":1470},{"style":484},[1471],{"type":46,"value":562},{"type":40,"tag":383,"props":1473,"children":1474},{"style":470},[1475],{"type":46,"value":567},{"type":40,"tag":49,"props":1477,"children":1478},{},[1479],{"type":46,"value":572},{"type":40,"tag":41,"props":1481,"children":1482},{"id":575},[1483],{"type":46,"value":578},{"type":40,"tag":49,"props":1485,"children":1486},{},[1487,1488,1493],{"type":46,"value":583},{"type":40,"tag":74,"props":1489,"children":1491},{"className":1490},[],[1492],{"type":46,"value":589},{"type":46,"value":121},{"type":40,"tag":592,"props":1495,"children":1496},{},[1497],{"type":46,"value":596},{"title":7,"searchDepth":430,"depth":430,"links":1499},[1500,1501,1502,1507],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":1503},[1504,1505,1506],{"id":131,"depth":499,"text":134},{"id":172,"depth":499,"text":175},{"id":364,"depth":499,"text":367},{"id":575,"depth":430,"text":578},{"_path":1509,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1510,"description":1511,"date":10,"readingTime":1512,"category":12,"tags":1513,"difficulty":16,"module":5,"step":430,"journeys":1515,"learnMore":1516,"stepGif":31,"author":1526,"body":1527,"_type":607,"_id":2720,"_source":609,"_file":2721,"_stem":2722,"_extension":612},"/tutorials/dbt-bruin-analyst/isolated-context","Create an Isolated Bruin Context","Add a self-contained context/ directory with its own .bruin.yml and pipeline.yml — so the documentation layer for your dbt project never collides with other Bruin pipelines in the same repo.",6,[1514,14,15],"Bruin CLI",[19,20],[1517,1520,1523],{"label":1518,"url":1519},"Connections reference (docs)","https://getbruin.com/docs/bruin/core-concepts/connections.html",{"label":1521,"url":1522},"Pipeline configuration (docs)","https://getbruin.com/docs/bruin/core-concepts/pipeline.html",{"label":1524,"url":1525},"Application Default Credentials","https://cloud.google.com/docs/authentication/application-default-credentials",{"name":33,"role":34,"image":35},{"type":37,"children":1528,"toc":2707},[1529,1533,1561,1565,1584,1603,1607,1619,1625,1650,1678,1689,1701,1865,1883,1911,1946,1951,2113,2249,2401,2412,2423,2517,2558,2582,2588,2593,2632,2637,2646,2658,2687,2691,2703],{"type":40,"tag":41,"props":1530,"children":1531},{"id":43},[1532],{"type":46,"value":47},{"type":40,"tag":49,"props":1534,"children":1535},{},[1536,1538,1543,1545,1551,1553,1559],{"type":46,"value":1537},"Inside your dbt repo, create a ",{"type":40,"tag":74,"props":1539,"children":1541},{"className":1540},[],[1542],{"type":46,"value":102},{"type":46,"value":1544}," directory with its own ",{"type":40,"tag":74,"props":1546,"children":1548},{"className":1547},[],[1549],{"type":46,"value":1550},".bruin.yml",{"type":46,"value":1552}," and ",{"type":40,"tag":74,"props":1554,"children":1556},{"className":1555},[],[1557],{"type":46,"value":1558},"pipeline.yml",{"type":46,"value":1560},". 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":40,"tag":41,"props":1562,"children":1563},{"id":56},[1564],{"type":46,"value":59},{"type":40,"tag":49,"props":1566,"children":1567},{},[1568,1570,1575,1577,1582],{"type":46,"value":1569},"Bruin will happily share a ",{"type":40,"tag":74,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":46,"value":1550},{"type":46,"value":1576}," 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":40,"tag":74,"props":1578,"children":1580},{"className":1579},[],[1581],{"type":46,"value":589},{"type":46,"value":1583}," 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":40,"tag":49,"props":1585,"children":1586},{},[1587,1589,1594,1596,1601],{"type":46,"value":1588},"The context layer is ",{"type":40,"tag":66,"props":1590,"children":1591},{},[1592],{"type":46,"value":1593},"its own pipeline",{"type":46,"value":1595},", even though it never runs transforms. It's documentation that happens to live in ",{"type":40,"tag":74,"props":1597,"children":1599},{"className":1598},[],[1600],{"type":46,"value":1558},{"type":46,"value":1602}," form so Bruin can validate it.",{"type":40,"tag":41,"props":1604,"children":1605},{"id":124},[1606],{"type":46,"value":127},{"type":40,"tag":49,"props":1608,"children":1609},{},[1610,1612,1617],{"type":46,"value":1611},"Run all of these from the root of your dbt project (the directory containing ",{"type":40,"tag":74,"props":1613,"children":1615},{"className":1614},[],[1616],{"type":46,"value":196},{"type":46,"value":1618},").",{"type":40,"tag":129,"props":1620,"children":1622},{"id":1621},"_1-create-the-context-directory",[1623],{"type":46,"value":1624},"1. Create the context directory",{"type":40,"tag":148,"props":1626,"children":1628},{"className":375,"code":1627,"language":377,"meta":7,"style":7},"mkdir -p context/assets\n",[1629],{"type":40,"tag":74,"props":1630,"children":1631},{"__ignoreMap":7},[1632],{"type":40,"tag":383,"props":1633,"children":1634},{"class":385,"line":17},[1635,1640,1645],{"type":40,"tag":383,"props":1636,"children":1637},{"style":389},[1638],{"type":46,"value":1639},"mkdir",{"type":40,"tag":383,"props":1641,"children":1642},{"style":484},[1643],{"type":46,"value":1644}," -p",{"type":40,"tag":383,"props":1646,"children":1647},{"style":394},[1648],{"type":46,"value":1649}," context/assets\n",{"type":40,"tag":49,"props":1651,"children":1652},{},[1653,1655,1661,1662,1668,1670,1676],{"type":46,"value":1654},"You'll end up with ",{"type":40,"tag":74,"props":1656,"children":1658},{"className":1657},[],[1659],{"type":46,"value":1660},"context/.bruin.yml",{"type":46,"value":530},{"type":40,"tag":74,"props":1663,"children":1665},{"className":1664},[],[1666],{"type":46,"value":1667},"context/pipeline.yml",{"type":46,"value":1669},", and a populated ",{"type":40,"tag":74,"props":1671,"children":1673},{"className":1672},[],[1674],{"type":46,"value":1675},"context/assets/",{"type":46,"value":1677}," after the next step.",{"type":40,"tag":129,"props":1679,"children":1681},{"id":1680},"_2-write-a-scoped-bruinyml",[1682,1684],{"type":46,"value":1683},"2. Write a scoped ",{"type":40,"tag":74,"props":1685,"children":1687},{"className":1686},[],[1688],{"type":46,"value":1550},{"type":40,"tag":49,"props":1690,"children":1691},{},[1692,1694,1699],{"type":46,"value":1693},"Drop this into ",{"type":40,"tag":74,"props":1695,"children":1697},{"className":1696},[],[1698],{"type":46,"value":1660},{"type":46,"value":1700},". Replace the project ID with your own warehouse's:",{"type":40,"tag":148,"props":1702,"children":1706},{"className":1703,"code":1704,"language":1705,"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",[1707],{"type":40,"tag":74,"props":1708,"children":1709},{"__ignoreMap":7},[1710,1719,1738,1751,1763,1776,1788,1811,1829,1847],{"type":40,"tag":383,"props":1711,"children":1712},{"class":385,"line":17},[1713],{"type":40,"tag":383,"props":1714,"children":1716},{"style":1715},"--shiki-default:#6A737D",[1717],{"type":46,"value":1718},"# context/.bruin.yml\n",{"type":40,"tag":383,"props":1720,"children":1721},{"class":385,"line":430},[1722,1728,1733],{"type":40,"tag":383,"props":1723,"children":1725},{"style":1724},"--shiki-default:#85E89D",[1726],{"type":46,"value":1727},"default_environment",{"type":40,"tag":383,"props":1729,"children":1730},{"style":470},[1731],{"type":46,"value":1732},": ",{"type":40,"tag":383,"props":1734,"children":1735},{"style":394},[1736],{"type":46,"value":1737},"default\n",{"type":40,"tag":383,"props":1739,"children":1740},{"class":385,"line":499},[1741,1746],{"type":40,"tag":383,"props":1742,"children":1743},{"style":1724},[1744],{"type":46,"value":1745},"environments",{"type":40,"tag":383,"props":1747,"children":1748},{"style":470},[1749],{"type":46,"value":1750},":\n",{"type":40,"tag":383,"props":1752,"children":1753},{"class":385,"line":11},[1754,1759],{"type":40,"tag":383,"props":1755,"children":1756},{"style":1724},[1757],{"type":46,"value":1758},"  default",{"type":40,"tag":383,"props":1760,"children":1761},{"style":470},[1762],{"type":46,"value":1750},{"type":40,"tag":383,"props":1764,"children":1766},{"class":385,"line":1765},5,[1767,1772],{"type":40,"tag":383,"props":1768,"children":1769},{"style":1724},[1770],{"type":46,"value":1771},"    connections",{"type":40,"tag":383,"props":1773,"children":1774},{"style":470},[1775],{"type":46,"value":1750},{"type":40,"tag":383,"props":1777,"children":1778},{"class":385,"line":1512},[1779,1784],{"type":40,"tag":383,"props":1780,"children":1781},{"style":1724},[1782],{"type":46,"value":1783},"      google_cloud_platform",{"type":40,"tag":383,"props":1785,"children":1786},{"style":470},[1787],{"type":46,"value":1750},{"type":40,"tag":383,"props":1789,"children":1791},{"class":385,"line":1790},7,[1792,1797,1802,1806],{"type":40,"tag":383,"props":1793,"children":1794},{"style":470},[1795],{"type":46,"value":1796},"        - ",{"type":40,"tag":383,"props":1798,"children":1799},{"style":1724},[1800],{"type":46,"value":1801},"name",{"type":40,"tag":383,"props":1803,"children":1804},{"style":470},[1805],{"type":46,"value":1732},{"type":40,"tag":383,"props":1807,"children":1808},{"style":394},[1809],{"type":46,"value":1810},"contoso_dbt_bq\n",{"type":40,"tag":383,"props":1812,"children":1814},{"class":385,"line":1813},8,[1815,1820,1824],{"type":40,"tag":383,"props":1816,"children":1817},{"style":1724},[1818],{"type":46,"value":1819},"          project_id",{"type":40,"tag":383,"props":1821,"children":1822},{"style":470},[1823],{"type":46,"value":1732},{"type":40,"tag":383,"props":1825,"children":1826},{"style":394},[1827],{"type":46,"value":1828},"bruin-playground-arsalan\n",{"type":40,"tag":383,"props":1830,"children":1832},{"class":385,"line":1831},9,[1833,1838,1842],{"type":40,"tag":383,"props":1834,"children":1835},{"style":1724},[1836],{"type":46,"value":1837},"          location",{"type":40,"tag":383,"props":1839,"children":1840},{"style":470},[1841],{"type":46,"value":1732},{"type":40,"tag":383,"props":1843,"children":1844},{"style":394},[1845],{"type":46,"value":1846},"EU\n",{"type":40,"tag":383,"props":1848,"children":1850},{"class":385,"line":1849},10,[1851,1856,1860],{"type":40,"tag":383,"props":1852,"children":1853},{"style":1724},[1854],{"type":46,"value":1855},"          use_application_default_credentials",{"type":40,"tag":383,"props":1857,"children":1858},{"style":470},[1859],{"type":46,"value":1732},{"type":40,"tag":383,"props":1861,"children":1862},{"style":484},[1863],{"type":46,"value":1864},"true\n",{"type":40,"tag":49,"props":1866,"children":1867},{},[1868,1870,1874,1876,1881],{"type":46,"value":1869},"This connection uses ",{"type":40,"tag":66,"props":1871,"children":1872},{},[1873],{"type":46,"value":1524},{"type":46,"value":1875}," — the same ",{"type":40,"tag":74,"props":1877,"children":1879},{"className":1878},[],[1880],{"type":46,"value":212},{"type":46,"value":1882}," 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":40,"tag":106,"props":1884,"children":1885},{},[1886],{"type":40,"tag":49,"props":1887,"children":1888},{},[1889,1894,1896,1902,1903,1909],{"type":40,"tag":66,"props":1890,"children":1891},{},[1892],{"type":46,"value":1893},"Gotcha — wrong field name.",{"type":46,"value":1895}," The field is ",{"type":40,"tag":74,"props":1897,"children":1899},{"className":1898},[],[1900],{"type":46,"value":1901},"use_application_default_credentials",{"type":46,"value":309},{"type":40,"tag":74,"props":1904,"children":1906},{"className":1905},[],[1907],{"type":46,"value":1908},"use_default_credentials",{"type":46,"value":1910},". The latter is silently ignored and Bruin will look for a keyfile that isn't there.",{"type":40,"tag":106,"props":1912,"children":1913},{},[1914],{"type":40,"tag":49,"props":1915,"children":1916},{},[1917,1922,1924,1929,1931,1936,1938,1944],{"type":40,"tag":66,"props":1918,"children":1919},{},[1920],{"type":46,"value":1921},"Gotcha — sibling configs.",{"type":46,"value":1923}," ",{"type":40,"tag":74,"props":1925,"children":1927},{"className":1926},[],[1928],{"type":46,"value":589},{"type":46,"value":1930}," walks up looking for ",{"type":40,"tag":74,"props":1932,"children":1934},{"className":1933},[],[1935],{"type":46,"value":1550},{"type":46,"value":1937},". If a parent directory has one with a broken connection, every command in this scope will error. Always pass ",{"type":40,"tag":74,"props":1939,"children":1941},{"className":1940},[],[1942],{"type":46,"value":1943},"--config-file context/.bruin.yml",{"type":46,"value":1945}," so Bruin only loads this file.",{"type":40,"tag":49,"props":1947,"children":1948},{},[1949],{"type":46,"value":1950},"For Redshift, ClickHouse, or Postgres, swap the connection block. Examples:",{"type":40,"tag":148,"props":1952,"children":1954},{"className":1703,"code":1953,"language":1705,"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",[1955],{"type":40,"tag":74,"props":1956,"children":1957},{"__ignoreMap":7},[1958,1966,1978,1990,2011,2028,2045,2062,2079,2096],{"type":40,"tag":383,"props":1959,"children":1960},{"class":385,"line":17},[1961],{"type":40,"tag":383,"props":1962,"children":1963},{"style":1715},[1964],{"type":46,"value":1965},"# Postgres\n",{"type":40,"tag":383,"props":1967,"children":1968},{"class":385,"line":430},[1969,1974],{"type":40,"tag":383,"props":1970,"children":1971},{"style":1724},[1972],{"type":46,"value":1973},"connections",{"type":40,"tag":383,"props":1975,"children":1976},{"style":470},[1977],{"type":46,"value":1750},{"type":40,"tag":383,"props":1979,"children":1980},{"class":385,"line":499},[1981,1986],{"type":40,"tag":383,"props":1982,"children":1983},{"style":1724},[1984],{"type":46,"value":1985},"  postgres",{"type":40,"tag":383,"props":1987,"children":1988},{"style":470},[1989],{"type":46,"value":1750},{"type":40,"tag":383,"props":1991,"children":1992},{"class":385,"line":11},[1993,1998,2002,2006],{"type":40,"tag":383,"props":1994,"children":1995},{"style":470},[1996],{"type":46,"value":1997},"    - ",{"type":40,"tag":383,"props":1999,"children":2000},{"style":1724},[2001],{"type":46,"value":1801},{"type":40,"tag":383,"props":2003,"children":2004},{"style":470},[2005],{"type":46,"value":1732},{"type":40,"tag":383,"props":2007,"children":2008},{"style":394},[2009],{"type":46,"value":2010},"contoso_dbt_pg\n",{"type":40,"tag":383,"props":2012,"children":2013},{"class":385,"line":1765},[2014,2019,2023],{"type":40,"tag":383,"props":2015,"children":2016},{"style":1724},[2017],{"type":46,"value":2018},"      host",{"type":40,"tag":383,"props":2020,"children":2021},{"style":470},[2022],{"type":46,"value":1732},{"type":40,"tag":383,"props":2024,"children":2025},{"style":394},[2026],{"type":46,"value":2027},"db.example.internal\n",{"type":40,"tag":383,"props":2029,"children":2030},{"class":385,"line":1512},[2031,2036,2040],{"type":40,"tag":383,"props":2032,"children":2033},{"style":1724},[2034],{"type":46,"value":2035},"      port",{"type":40,"tag":383,"props":2037,"children":2038},{"style":470},[2039],{"type":46,"value":1732},{"type":40,"tag":383,"props":2041,"children":2042},{"style":484},[2043],{"type":46,"value":2044},"5432\n",{"type":40,"tag":383,"props":2046,"children":2047},{"class":385,"line":1790},[2048,2053,2057],{"type":40,"tag":383,"props":2049,"children":2050},{"style":1724},[2051],{"type":46,"value":2052},"      username",{"type":40,"tag":383,"props":2054,"children":2055},{"style":470},[2056],{"type":46,"value":1732},{"type":40,"tag":383,"props":2058,"children":2059},{"style":394},[2060],{"type":46,"value":2061},"analyst_ro\n",{"type":40,"tag":383,"props":2063,"children":2064},{"class":385,"line":1813},[2065,2070,2074],{"type":40,"tag":383,"props":2066,"children":2067},{"style":1724},[2068],{"type":46,"value":2069},"      password",{"type":40,"tag":383,"props":2071,"children":2072},{"style":470},[2073],{"type":46,"value":1732},{"type":40,"tag":383,"props":2075,"children":2076},{"style":394},[2077],{"type":46,"value":2078},"${POSTGRES_PASSWORD}\n",{"type":40,"tag":383,"props":2080,"children":2081},{"class":385,"line":1831},[2082,2087,2091],{"type":40,"tag":383,"props":2083,"children":2084},{"style":1724},[2085],{"type":46,"value":2086},"      database",{"type":40,"tag":383,"props":2088,"children":2089},{"style":470},[2090],{"type":46,"value":1732},{"type":40,"tag":383,"props":2092,"children":2093},{"style":394},[2094],{"type":46,"value":2095},"contoso\n",{"type":40,"tag":383,"props":2097,"children":2098},{"class":385,"line":1849},[2099,2104,2108],{"type":40,"tag":383,"props":2100,"children":2101},{"style":1724},[2102],{"type":46,"value":2103},"      ssl_mode",{"type":40,"tag":383,"props":2105,"children":2106},{"style":470},[2107],{"type":46,"value":1732},{"type":40,"tag":383,"props":2109,"children":2110},{"style":394},[2111],{"type":46,"value":2112},"require\n",{"type":40,"tag":148,"props":2114,"children":2116},{"className":1703,"code":2115,"language":1705,"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",[2117],{"type":40,"tag":74,"props":2118,"children":2119},{"__ignoreMap":7},[2120,2128,2139,2151,2171,2187,2203,2218,2234],{"type":40,"tag":383,"props":2121,"children":2122},{"class":385,"line":17},[2123],{"type":40,"tag":383,"props":2124,"children":2125},{"style":1715},[2126],{"type":46,"value":2127},"# Redshift\n",{"type":40,"tag":383,"props":2129,"children":2130},{"class":385,"line":430},[2131,2135],{"type":40,"tag":383,"props":2132,"children":2133},{"style":1724},[2134],{"type":46,"value":1973},{"type":40,"tag":383,"props":2136,"children":2137},{"style":470},[2138],{"type":46,"value":1750},{"type":40,"tag":383,"props":2140,"children":2141},{"class":385,"line":499},[2142,2147],{"type":40,"tag":383,"props":2143,"children":2144},{"style":1724},[2145],{"type":46,"value":2146},"  redshift",{"type":40,"tag":383,"props":2148,"children":2149},{"style":470},[2150],{"type":46,"value":1750},{"type":40,"tag":383,"props":2152,"children":2153},{"class":385,"line":11},[2154,2158,2162,2166],{"type":40,"tag":383,"props":2155,"children":2156},{"style":470},[2157],{"type":46,"value":1997},{"type":40,"tag":383,"props":2159,"children":2160},{"style":1724},[2161],{"type":46,"value":1801},{"type":40,"tag":383,"props":2163,"children":2164},{"style":470},[2165],{"type":46,"value":1732},{"type":40,"tag":383,"props":2167,"children":2168},{"style":394},[2169],{"type":46,"value":2170},"contoso_dbt_rs\n",{"type":40,"tag":383,"props":2172,"children":2173},{"class":385,"line":1765},[2174,2178,2182],{"type":40,"tag":383,"props":2175,"children":2176},{"style":1724},[2177],{"type":46,"value":2018},{"type":40,"tag":383,"props":2179,"children":2180},{"style":470},[2181],{"type":46,"value":1732},{"type":40,"tag":383,"props":2183,"children":2184},{"style":394},[2185],{"type":46,"value":2186},"contoso.abcd1234.eu-west-1.redshift.amazonaws.com\n",{"type":40,"tag":383,"props":2188,"children":2189},{"class":385,"line":1512},[2190,2194,2198],{"type":40,"tag":383,"props":2191,"children":2192},{"style":1724},[2193],{"type":46,"value":2035},{"type":40,"tag":383,"props":2195,"children":2196},{"style":470},[2197],{"type":46,"value":1732},{"type":40,"tag":383,"props":2199,"children":2200},{"style":484},[2201],{"type":46,"value":2202},"5439\n",{"type":40,"tag":383,"props":2204,"children":2205},{"class":385,"line":1790},[2206,2210,2214],{"type":40,"tag":383,"props":2207,"children":2208},{"style":1724},[2209],{"type":46,"value":2052},{"type":40,"tag":383,"props":2211,"children":2212},{"style":470},[2213],{"type":46,"value":1732},{"type":40,"tag":383,"props":2215,"children":2216},{"style":394},[2217],{"type":46,"value":2061},{"type":40,"tag":383,"props":2219,"children":2220},{"class":385,"line":1813},[2221,2225,2229],{"type":40,"tag":383,"props":2222,"children":2223},{"style":1724},[2224],{"type":46,"value":2069},{"type":40,"tag":383,"props":2226,"children":2227},{"style":470},[2228],{"type":46,"value":1732},{"type":40,"tag":383,"props":2230,"children":2231},{"style":394},[2232],{"type":46,"value":2233},"${REDSHIFT_PASSWORD}\n",{"type":40,"tag":383,"props":2235,"children":2236},{"class":385,"line":1831},[2237,2241,2245],{"type":40,"tag":383,"props":2238,"children":2239},{"style":1724},[2240],{"type":46,"value":2086},{"type":40,"tag":383,"props":2242,"children":2243},{"style":470},[2244],{"type":46,"value":1732},{"type":40,"tag":383,"props":2246,"children":2247},{"style":394},[2248],{"type":46,"value":2095},{"type":40,"tag":148,"props":2250,"children":2252},{"className":1703,"code":2251,"language":1705,"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",[2253],{"type":40,"tag":74,"props":2254,"children":2255},{"__ignoreMap":7},[2256,2264,2275,2287,2307,2323,2339,2354,2370,2385],{"type":40,"tag":383,"props":2257,"children":2258},{"class":385,"line":17},[2259],{"type":40,"tag":383,"props":2260,"children":2261},{"style":1715},[2262],{"type":46,"value":2263},"# ClickHouse\n",{"type":40,"tag":383,"props":2265,"children":2266},{"class":385,"line":430},[2267,2271],{"type":40,"tag":383,"props":2268,"children":2269},{"style":1724},[2270],{"type":46,"value":1973},{"type":40,"tag":383,"props":2272,"children":2273},{"style":470},[2274],{"type":46,"value":1750},{"type":40,"tag":383,"props":2276,"children":2277},{"class":385,"line":499},[2278,2283],{"type":40,"tag":383,"props":2279,"children":2280},{"style":1724},[2281],{"type":46,"value":2282},"  clickhouse",{"type":40,"tag":383,"props":2284,"children":2285},{"style":470},[2286],{"type":46,"value":1750},{"type":40,"tag":383,"props":2288,"children":2289},{"class":385,"line":11},[2290,2294,2298,2302],{"type":40,"tag":383,"props":2291,"children":2292},{"style":470},[2293],{"type":46,"value":1997},{"type":40,"tag":383,"props":2295,"children":2296},{"style":1724},[2297],{"type":46,"value":1801},{"type":40,"tag":383,"props":2299,"children":2300},{"style":470},[2301],{"type":46,"value":1732},{"type":40,"tag":383,"props":2303,"children":2304},{"style":394},[2305],{"type":46,"value":2306},"contoso_dbt_ch\n",{"type":40,"tag":383,"props":2308,"children":2309},{"class":385,"line":1765},[2310,2314,2318],{"type":40,"tag":383,"props":2311,"children":2312},{"style":1724},[2313],{"type":46,"value":2018},{"type":40,"tag":383,"props":2315,"children":2316},{"style":470},[2317],{"type":46,"value":1732},{"type":40,"tag":383,"props":2319,"children":2320},{"style":394},[2321],{"type":46,"value":2322},"contoso.eu-central-1.aws.clickhouse.cloud\n",{"type":40,"tag":383,"props":2324,"children":2325},{"class":385,"line":1512},[2326,2330,2334],{"type":40,"tag":383,"props":2327,"children":2328},{"style":1724},[2329],{"type":46,"value":2035},{"type":40,"tag":383,"props":2331,"children":2332},{"style":470},[2333],{"type":46,"value":1732},{"type":40,"tag":383,"props":2335,"children":2336},{"style":484},[2337],{"type":46,"value":2338},"9440\n",{"type":40,"tag":383,"props":2340,"children":2341},{"class":385,"line":1790},[2342,2346,2350],{"type":40,"tag":383,"props":2343,"children":2344},{"style":1724},[2345],{"type":46,"value":2052},{"type":40,"tag":383,"props":2347,"children":2348},{"style":470},[2349],{"type":46,"value":1732},{"type":40,"tag":383,"props":2351,"children":2352},{"style":394},[2353],{"type":46,"value":2061},{"type":40,"tag":383,"props":2355,"children":2356},{"class":385,"line":1813},[2357,2361,2365],{"type":40,"tag":383,"props":2358,"children":2359},{"style":1724},[2360],{"type":46,"value":2069},{"type":40,"tag":383,"props":2362,"children":2363},{"style":470},[2364],{"type":46,"value":1732},{"type":40,"tag":383,"props":2366,"children":2367},{"style":394},[2368],{"type":46,"value":2369},"${CLICKHOUSE_PASSWORD}\n",{"type":40,"tag":383,"props":2371,"children":2372},{"class":385,"line":1831},[2373,2377,2381],{"type":40,"tag":383,"props":2374,"children":2375},{"style":1724},[2376],{"type":46,"value":2086},{"type":40,"tag":383,"props":2378,"children":2379},{"style":470},[2380],{"type":46,"value":1732},{"type":40,"tag":383,"props":2382,"children":2383},{"style":394},[2384],{"type":46,"value":1737},{"type":40,"tag":383,"props":2386,"children":2387},{"class":385,"line":1849},[2388,2393,2397],{"type":40,"tag":383,"props":2389,"children":2390},{"style":1724},[2391],{"type":46,"value":2392},"      secure",{"type":40,"tag":383,"props":2394,"children":2395},{"style":470},[2396],{"type":46,"value":1732},{"type":40,"tag":383,"props":2398,"children":2399},{"style":484},[2400],{"type":46,"value":1864},{"type":40,"tag":129,"props":2402,"children":2404},{"id":2403},"_3-write-a-pipelineyml",[2405,2407],{"type":46,"value":2406},"3. Write a ",{"type":40,"tag":74,"props":2408,"children":2410},{"className":2409},[],[2411],{"type":46,"value":1558},{"type":40,"tag":49,"props":2413,"children":2414},{},[2415,2416,2421],{"type":46,"value":1693},{"type":40,"tag":74,"props":2417,"children":2419},{"className":2418},[],[2420],{"type":46,"value":1667},{"type":46,"value":2422},":",{"type":40,"tag":148,"props":2424,"children":2426},{"className":1703,"code":2425,"language":1705,"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",[2427],{"type":40,"tag":74,"props":2428,"children":2429},{"__ignoreMap":7},[2430,2438,2454,2471,2488,2500],{"type":40,"tag":383,"props":2431,"children":2432},{"class":385,"line":17},[2433],{"type":40,"tag":383,"props":2434,"children":2435},{"style":1715},[2436],{"type":46,"value":2437},"# context/pipeline.yml\n",{"type":40,"tag":383,"props":2439,"children":2440},{"class":385,"line":430},[2441,2445,2449],{"type":40,"tag":383,"props":2442,"children":2443},{"style":1724},[2444],{"type":46,"value":1801},{"type":40,"tag":383,"props":2446,"children":2447},{"style":470},[2448],{"type":46,"value":1732},{"type":40,"tag":383,"props":2450,"children":2451},{"style":394},[2452],{"type":46,"value":2453},"contoso_dbt_context\n",{"type":40,"tag":383,"props":2455,"children":2456},{"class":385,"line":499},[2457,2462,2466],{"type":40,"tag":383,"props":2458,"children":2459},{"style":1724},[2460],{"type":46,"value":2461},"schedule",{"type":40,"tag":383,"props":2463,"children":2464},{"style":470},[2465],{"type":46,"value":1732},{"type":40,"tag":383,"props":2467,"children":2468},{"style":394},[2469],{"type":46,"value":2470},"daily\n",{"type":40,"tag":383,"props":2472,"children":2473},{"class":385,"line":11},[2474,2479,2483],{"type":40,"tag":383,"props":2475,"children":2476},{"style":1724},[2477],{"type":46,"value":2478},"start_date",{"type":40,"tag":383,"props":2480,"children":2481},{"style":470},[2482],{"type":46,"value":1732},{"type":40,"tag":383,"props":2484,"children":2485},{"style":394},[2486],{"type":46,"value":2487},"\"2016-01-01\"\n",{"type":40,"tag":383,"props":2489,"children":2490},{"class":385,"line":1765},[2491,2496],{"type":40,"tag":383,"props":2492,"children":2493},{"style":1724},[2494],{"type":46,"value":2495},"default_connections",{"type":40,"tag":383,"props":2497,"children":2498},{"style":470},[2499],{"type":46,"value":1750},{"type":40,"tag":383,"props":2501,"children":2502},{"class":385,"line":1512},[2503,2508,2512],{"type":40,"tag":383,"props":2504,"children":2505},{"style":1724},[2506],{"type":46,"value":2507},"  google_cloud_platform",{"type":40,"tag":383,"props":2509,"children":2510},{"style":470},[2511],{"type":46,"value":1732},{"type":40,"tag":383,"props":2513,"children":2514},{"style":394},[2515],{"type":46,"value":2516},"\"contoso_dbt_bq\"\n",{"type":40,"tag":49,"props":2518,"children":2519},{},[2520,2522,2527,2529,2535,2537,2543,2544,2550,2551,2557],{"type":46,"value":2521},"The ",{"type":40,"tag":74,"props":2523,"children":2525},{"className":2524},[],[2526],{"type":46,"value":2495},{"type":46,"value":2528}," block makes the connection name implicit for every asset Bruin generates in the next step — you won't have to repeat ",{"type":40,"tag":74,"props":2530,"children":2532},{"className":2531},[],[2533],{"type":46,"value":2534},"connection: contoso_dbt_bq",{"type":46,"value":2536}," in 40 separate YAMLs. For non-BigQuery warehouses, use the matching key (",{"type":40,"tag":74,"props":2538,"children":2540},{"className":2539},[],[2541],{"type":46,"value":2542},"postgres",{"type":46,"value":530},{"type":40,"tag":74,"props":2545,"children":2547},{"className":2546},[],[2548],{"type":46,"value":2549},"redshift",{"type":46,"value":530},{"type":40,"tag":74,"props":2552,"children":2554},{"className":2553},[],[2555],{"type":46,"value":2556},"clickhouse",{"type":46,"value":1618},{"type":40,"tag":106,"props":2559,"children":2560},{},[2561],{"type":40,"tag":49,"props":2562,"children":2563},{},[2564,2566,2572,2574,2580],{"type":46,"value":2565},"The pipeline never ",{"type":40,"tag":2567,"props":2568,"children":2569},"em",{},[2570],{"type":46,"value":2571},"runs",{"type":46,"value":2573}," anything — but Bruin still treats it as a pipeline, which gives you ",{"type":40,"tag":74,"props":2575,"children":2577},{"className":2576},[],[2578],{"type":46,"value":2579},"bruin validate",{"type":46,"value":2581},", lineage, and docs generation for free.",{"type":40,"tag":129,"props":2583,"children":2585},{"id":2584},"_4-test-the-connection",[2586],{"type":46,"value":2587},"4. Test the connection",{"type":40,"tag":49,"props":2589,"children":2590},{},[2591],{"type":46,"value":2592},"Confirm Bruin can reach the warehouse before going further:",{"type":40,"tag":148,"props":2594,"children":2596},{"className":375,"code":2595,"language":377,"meta":7,"style":7},"bruin connections ping --config-file context/.bruin.yml contoso_dbt_bq\n",[2597],{"type":40,"tag":74,"props":2598,"children":2599},{"__ignoreMap":7},[2600],{"type":40,"tag":383,"props":2601,"children":2602},{"class":385,"line":17},[2603,2607,2612,2617,2622,2627],{"type":40,"tag":383,"props":2604,"children":2605},{"style":389},[2606],{"type":46,"value":589},{"type":40,"tag":383,"props":2608,"children":2609},{"style":394},[2610],{"type":46,"value":2611}," connections",{"type":40,"tag":383,"props":2613,"children":2614},{"style":394},[2615],{"type":46,"value":2616}," ping",{"type":40,"tag":383,"props":2618,"children":2619},{"style":484},[2620],{"type":46,"value":2621}," --config-file",{"type":40,"tag":383,"props":2623,"children":2624},{"style":394},[2625],{"type":46,"value":2626}," context/.bruin.yml",{"type":40,"tag":383,"props":2628,"children":2629},{"style":394},[2630],{"type":46,"value":2631}," contoso_dbt_bq\n",{"type":40,"tag":49,"props":2633,"children":2634},{},[2635],{"type":46,"value":2636},"Expected output:",{"type":40,"tag":148,"props":2638,"children":2641},{"className":2639,"code":2640,"language":46},[151],"Successfully connected to 'contoso_dbt_bq'.\n",[2642],{"type":40,"tag":74,"props":2643,"children":2644},{"__ignoreMap":7},[2645],{"type":46,"value":2640},{"type":40,"tag":49,"props":2647,"children":2648},{},[2649,2651,2656],{"type":46,"value":2650},"If you see an authentication error, run ",{"type":40,"tag":74,"props":2652,"children":2654},{"className":2653},[],[2655],{"type":46,"value":212},{"type":46,"value":2657}," (BigQuery) or check your env vars (Postgres / Redshift / ClickHouse) and try again.",{"type":40,"tag":106,"props":2659,"children":2660},{},[2661],{"type":40,"tag":49,"props":2662,"children":2663},{},[2664,2677,2679,2685],{"type":40,"tag":66,"props":2665,"children":2666},{},[2667,2669,2675],{"type":46,"value":2668},"Gotcha — ",{"type":40,"tag":74,"props":2670,"children":2672},{"className":2671},[],[2673],{"type":46,"value":2674},"bruin connections test",{"type":46,"value":2676}," loads everything.",{"type":46,"value":2678}," It walks every connection in scope, so a broken sibling connection breaks the test. Always ",{"type":40,"tag":74,"props":2680,"children":2682},{"className":2681},[],[2683],{"type":46,"value":2684},"--config-file",{"type":46,"value":2686},"-scope when working in a sub-pipeline.",{"type":40,"tag":41,"props":2688,"children":2689},{"id":575},[2690],{"type":46,"value":578},{"type":40,"tag":49,"props":2692,"children":2693},{},[2694,2696,2701],{"type":46,"value":2695},"You now have a self-contained Bruin pipeline at ",{"type":40,"tag":74,"props":2697,"children":2699},{"className":2698},[],[2700],{"type":46,"value":102},{"type":46,"value":2702}," — 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":40,"tag":592,"props":2704,"children":2705},{},[2706],{"type":46,"value":596},{"title":7,"searchDepth":430,"depth":430,"links":2708},[2709,2710,2711,2719],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":2712},[2713,2714,2716,2718],{"id":1621,"depth":499,"text":1624},{"id":1680,"depth":499,"text":2715},"2. Write a scoped .bruin.yml",{"id":2403,"depth":499,"text":2717},"3. Write a pipeline.yml",{"id":2584,"depth":499,"text":2587},{"id":575,"depth":430,"text":578},"content:tutorials:dbt-bruin-analyst:isolated-context.md","tutorials/dbt-bruin-analyst/isolated-context.md","tutorials/dbt-bruin-analyst/isolated-context",{"_path":2724,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2725,"description":2726,"date":10,"readingTime":1765,"category":12,"tags":2727,"difficulty":16,"module":5,"step":499,"journeys":2728,"learnMore":2729,"stepGif":31,"author":2736,"body":2737,"_type":607,"_id":3799,"_source":609,"_file":3800,"_stem":3801,"_extension":612},"/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.",[1514,14],[19,20],[2730,2733],{"label":2731,"url":2732},"bruin import database (docs)","https://getbruin.com/docs/bruin/commands/import.html",{"label":2734,"url":2735},"Asset definition schema","https://getbruin.com/docs/bruin/assets/definition-schema.html",{"name":33,"role":34,"image":35},{"type":37,"children":2738,"toc":3786},[2739,2743,2789,2793,2798,2817,2821,2827,2832,2881,2916,2922,2942,3061,3074,3154,3188,3194,3214,3226,3235,3240,3438,3443,3449,3461,3584,3589,3595,3600,3632,3637,3646,3651,3657,3665,3690,3698,3718,3731,3755,3763,3768,3772,3782],{"type":40,"tag":41,"props":2740,"children":2741},{"id":43},[2742],{"type":46,"value":47},{"type":40,"tag":49,"props":2744,"children":2745},{},[2746,2748,2754,2756,2761,2762,2767,2768,2773,2775,2781,2783,2788],{"type":46,"value":2747},"Run ",{"type":40,"tag":74,"props":2749,"children":2751},{"className":2750},[],[2752],{"type":46,"value":2753},"bruin import database",{"type":46,"value":2755}," against the schemas your dbt project materializes (e.g., ",{"type":40,"tag":74,"props":2757,"children":2759},{"className":2758},[],[2760],{"type":46,"value":240},{"type":46,"value":530},{"type":40,"tag":74,"props":2763,"children":2765},{"className":2764},[],[2766],{"type":46,"value":261},{"type":46,"value":530},{"type":40,"tag":74,"props":2769,"children":2771},{"className":2770},[],[2772],{"type":46,"value":280},{"type":46,"value":2774},"). Bruin connects to the warehouse, reads each table's column list and types, and writes one ",{"type":40,"tag":74,"props":2776,"children":2778},{"className":2777},[],[2779],{"type":46,"value":2780},".asset.yml",{"type":46,"value":2782}," per table under ",{"type":40,"tag":74,"props":2784,"children":2786},{"className":2785},[],[2787],{"type":46,"value":1675},{"type":46,"value":121},{"type":40,"tag":41,"props":2790,"children":2791},{"id":56},[2792],{"type":46,"value":59},{"type":40,"tag":49,"props":2794,"children":2795},{},[2796],{"type":46,"value":2797},"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":40,"tag":49,"props":2799,"children":2800},{},[2801,2803,2808,2810,2815],{"type":46,"value":2802},"What you get out of this step is ",{"type":40,"tag":2567,"props":2804,"children":2805},{},[2806],{"type":46,"value":2807},"structure",{"type":46,"value":2809},": tables, columns, types. The next step (AI enhance) adds the ",{"type":40,"tag":2567,"props":2811,"children":2812},{},[2813],{"type":46,"value":2814},"meaning",{"type":46,"value":2816},": descriptions, tags, quality checks. Both halves matter — but the structure has to come from the warehouse, not from a guess.",{"type":40,"tag":41,"props":2818,"children":2819},{"id":124},[2820],{"type":46,"value":127},{"type":40,"tag":129,"props":2822,"children":2824},{"id":2823},"_1-identify-your-dbt-schemas",[2825],{"type":46,"value":2826},"1. Identify your dbt schemas",{"type":40,"tag":49,"props":2828,"children":2829},{},[2830],{"type":46,"value":2831},"You need the actual warehouse schema names. If you used the reference contoso project's schema convention, they're:",{"type":40,"tag":182,"props":2833,"children":2834},{},[2835,2846,2864],{"type":40,"tag":186,"props":2836,"children":2837},{},[2838,2844],{"type":40,"tag":74,"props":2839,"children":2841},{"className":2840},[],[2842],{"type":46,"value":2843},"contoso_dbt_raw",{"type":46,"value":2845}," — what dlt loads",{"type":40,"tag":186,"props":2847,"children":2848},{},[2849,2854,2856,2862],{"type":40,"tag":74,"props":2850,"children":2852},{"className":2851},[],[2853],{"type":46,"value":307},{"type":46,"value":2855}," — ",{"type":40,"tag":74,"props":2857,"children":2859},{"className":2858},[],[2860],{"type":46,"value":2861},"stg_*",{"type":46,"value":2863}," models",{"type":40,"tag":186,"props":2865,"children":2866},{},[2867,2873,2874,2880],{"type":40,"tag":74,"props":2868,"children":2870},{"className":2869},[],[2871],{"type":46,"value":2872},"contoso_dbt_reports",{"type":46,"value":2855},{"type":40,"tag":74,"props":2875,"children":2877},{"className":2876},[],[2878],{"type":46,"value":2879},"rpt_*",{"type":46,"value":2863},{"type":40,"tag":49,"props":2882,"children":2883},{},[2884,2886,2891,2893,2899,2901,2907,2909,2914],{"type":46,"value":2885},"If you're not sure what your dbt project lands as, check ",{"type":40,"tag":74,"props":2887,"children":2889},{"className":2888},[],[2890],{"type":46,"value":196},{"type":46,"value":2892},". The full schema name is ",{"type":40,"tag":74,"props":2894,"children":2896},{"className":2895},[],[2897],{"type":46,"value":2898},"\u003Ctarget.schema>_\u003C+schema>",{"type":46,"value":2900}," by default, or just ",{"type":40,"tag":74,"props":2902,"children":2904},{"className":2903},[],[2905],{"type":46,"value":2906},"\u003C+schema>",{"type":46,"value":2908}," if you've overridden ",{"type":40,"tag":74,"props":2910,"children":2912},{"className":2911},[],[2913],{"type":46,"value":344},{"type":46,"value":2915}," (the contoso project does).",{"type":40,"tag":129,"props":2917,"children":2919},{"id":2918},"_2-run-the-import",[2920],{"type":46,"value":2921},"2. Run the import",{"type":40,"tag":49,"props":2923,"children":2924},{},[2925,2927,2932,2934,2940],{"type":46,"value":2926},"From the dbt project root, point the import at your ",{"type":40,"tag":74,"props":2928,"children":2930},{"className":2929},[],[2931],{"type":46,"value":102},{"type":46,"value":2933}," pipeline folder. The ",{"type":40,"tag":74,"props":2935,"children":2937},{"className":2936},[],[2938],{"type":46,"value":2939},"--schemas",{"type":46,"value":2941}," flag is repeatable for BigQuery — pass it once per schema:",{"type":40,"tag":148,"props":2943,"children":2945},{"className":375,"code":2944,"language":377,"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",[2946],{"type":40,"tag":74,"props":2947,"children":2948},{"__ignoreMap":7},[2949,2971,2987,3004,3021,3037,3053],{"type":40,"tag":383,"props":2950,"children":2951},{"class":385,"line":17},[2952,2956,2961,2966],{"type":40,"tag":383,"props":2953,"children":2954},{"style":389},[2955],{"type":46,"value":589},{"type":40,"tag":383,"props":2957,"children":2958},{"style":394},[2959],{"type":46,"value":2960}," import",{"type":40,"tag":383,"props":2962,"children":2963},{"style":394},[2964],{"type":46,"value":2965}," database",{"type":40,"tag":383,"props":2967,"children":2968},{"style":484},[2969],{"type":46,"value":2970}," \\\n",{"type":40,"tag":383,"props":2972,"children":2973},{"class":385,"line":430},[2974,2979,2983],{"type":40,"tag":383,"props":2975,"children":2976},{"style":484},[2977],{"type":46,"value":2978},"  --config-file",{"type":40,"tag":383,"props":2980,"children":2981},{"style":394},[2982],{"type":46,"value":2626},{"type":40,"tag":383,"props":2984,"children":2985},{"style":484},[2986],{"type":46,"value":2970},{"type":40,"tag":383,"props":2988,"children":2989},{"class":385,"line":499},[2990,2995,3000],{"type":40,"tag":383,"props":2991,"children":2992},{"style":484},[2993],{"type":46,"value":2994},"  --connection",{"type":40,"tag":383,"props":2996,"children":2997},{"style":394},[2998],{"type":46,"value":2999}," contoso_dbt_bq",{"type":40,"tag":383,"props":3001,"children":3002},{"style":484},[3003],{"type":46,"value":2970},{"type":40,"tag":383,"props":3005,"children":3006},{"class":385,"line":11},[3007,3012,3017],{"type":40,"tag":383,"props":3008,"children":3009},{"style":484},[3010],{"type":46,"value":3011},"  --schemas",{"type":40,"tag":383,"props":3013,"children":3014},{"style":394},[3015],{"type":46,"value":3016}," contoso_dbt_raw",{"type":40,"tag":383,"props":3018,"children":3019},{"style":484},[3020],{"type":46,"value":2970},{"type":40,"tag":383,"props":3022,"children":3023},{"class":385,"line":1765},[3024,3028,3033],{"type":40,"tag":383,"props":3025,"children":3026},{"style":484},[3027],{"type":46,"value":3011},{"type":40,"tag":383,"props":3029,"children":3030},{"style":394},[3031],{"type":46,"value":3032}," contoso_dbt_staging",{"type":40,"tag":383,"props":3034,"children":3035},{"style":484},[3036],{"type":46,"value":2970},{"type":40,"tag":383,"props":3038,"children":3039},{"class":385,"line":1512},[3040,3044,3049],{"type":40,"tag":383,"props":3041,"children":3042},{"style":484},[3043],{"type":46,"value":3011},{"type":40,"tag":383,"props":3045,"children":3046},{"style":394},[3047],{"type":46,"value":3048}," contoso_dbt_reports",{"type":40,"tag":383,"props":3050,"children":3051},{"style":484},[3052],{"type":46,"value":2970},{"type":40,"tag":383,"props":3054,"children":3055},{"class":385,"line":1790},[3056],{"type":40,"tag":383,"props":3057,"children":3058},{"style":394},[3059],{"type":46,"value":3060},"  context\n",{"type":40,"tag":49,"props":3062,"children":3063},{},[3064,3066,3072],{"type":46,"value":3065},"For Postgres, Redshift, or ClickHouse, use ",{"type":40,"tag":74,"props":3067,"children":3069},{"className":3068},[],[3070],{"type":46,"value":3071},"--schema",{"type":46,"value":3073}," (singular) once per run:",{"type":40,"tag":148,"props":3075,"children":3077},{"className":375,"code":3076,"language":377,"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",[3078],{"type":40,"tag":74,"props":3079,"children":3080},{"__ignoreMap":7},[3081,3100,3115,3131,3147],{"type":40,"tag":383,"props":3082,"children":3083},{"class":385,"line":17},[3084,3088,3092,3096],{"type":40,"tag":383,"props":3085,"children":3086},{"style":389},[3087],{"type":46,"value":589},{"type":40,"tag":383,"props":3089,"children":3090},{"style":394},[3091],{"type":46,"value":2960},{"type":40,"tag":383,"props":3093,"children":3094},{"style":394},[3095],{"type":46,"value":2965},{"type":40,"tag":383,"props":3097,"children":3098},{"style":484},[3099],{"type":46,"value":2970},{"type":40,"tag":383,"props":3101,"children":3102},{"class":385,"line":430},[3103,3107,3111],{"type":40,"tag":383,"props":3104,"children":3105},{"style":484},[3106],{"type":46,"value":2978},{"type":40,"tag":383,"props":3108,"children":3109},{"style":394},[3110],{"type":46,"value":2626},{"type":40,"tag":383,"props":3112,"children":3113},{"style":484},[3114],{"type":46,"value":2970},{"type":40,"tag":383,"props":3116,"children":3117},{"class":385,"line":499},[3118,3122,3127],{"type":40,"tag":383,"props":3119,"children":3120},{"style":484},[3121],{"type":46,"value":2994},{"type":40,"tag":383,"props":3123,"children":3124},{"style":394},[3125],{"type":46,"value":3126}," contoso_dbt_pg",{"type":40,"tag":383,"props":3128,"children":3129},{"style":484},[3130],{"type":46,"value":2970},{"type":40,"tag":383,"props":3132,"children":3133},{"class":385,"line":11},[3134,3139,3143],{"type":40,"tag":383,"props":3135,"children":3136},{"style":484},[3137],{"type":46,"value":3138},"  --schema",{"type":40,"tag":383,"props":3140,"children":3141},{"style":394},[3142],{"type":46,"value":3032},{"type":40,"tag":383,"props":3144,"children":3145},{"style":484},[3146],{"type":46,"value":2970},{"type":40,"tag":383,"props":3148,"children":3149},{"class":385,"line":1765},[3150],{"type":40,"tag":383,"props":3151,"children":3152},{"style":394},[3153],{"type":46,"value":3060},{"type":40,"tag":106,"props":3155,"children":3156},{},[3157],{"type":40,"tag":49,"props":3158,"children":3159},{},[3160,3165,3167,3172,3174,3180,3182,3187],{"type":40,"tag":66,"props":3161,"children":3162},{},[3163],{"type":46,"value":3164},"Note:",{"type":46,"value":3166}," The trailing positional argument is the ",{"type":40,"tag":66,"props":3168,"children":3169},{},[3170],{"type":46,"value":3171},"pipeline path",{"type":46,"value":3173},", not the project root. That's ",{"type":40,"tag":74,"props":3175,"children":3177},{"className":3176},[],[3178],{"type":46,"value":3179},"context",{"type":46,"value":3181}," in our setup — the directory containing ",{"type":40,"tag":74,"props":3183,"children":3185},{"className":3184},[],[3186],{"type":46,"value":1558},{"type":46,"value":121},{"type":40,"tag":129,"props":3189,"children":3191},{"id":3190},"_3-inspect-what-was-generated",[3192],{"type":46,"value":3193},"3. Inspect what was generated",{"type":40,"tag":148,"props":3195,"children":3197},{"className":375,"code":3196,"language":377,"meta":7,"style":7},"ls context/assets/\n",[3198],{"type":40,"tag":74,"props":3199,"children":3200},{"__ignoreMap":7},[3201],{"type":40,"tag":383,"props":3202,"children":3203},{"class":385,"line":17},[3204,3209],{"type":40,"tag":383,"props":3205,"children":3206},{"style":389},[3207],{"type":46,"value":3208},"ls",{"type":40,"tag":383,"props":3210,"children":3211},{"style":394},[3212],{"type":46,"value":3213}," context/assets/\n",{"type":40,"tag":49,"props":3215,"children":3216},{},[3217,3219,3224],{"type":46,"value":3218},"You should see one folder per schema, each containing one ",{"type":40,"tag":74,"props":3220,"children":3222},{"className":3221},[],[3223],{"type":46,"value":2780},{"type":46,"value":3225}," per table:",{"type":40,"tag":148,"props":3227,"children":3230},{"className":3228,"code":3229,"language":46},[151],"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",[3231],{"type":40,"tag":74,"props":3232,"children":3233},{"__ignoreMap":7},[3234],{"type":46,"value":3229},{"type":40,"tag":49,"props":3236,"children":3237},{},[3238],{"type":46,"value":3239},"Open one — they look like this:",{"type":40,"tag":148,"props":3241,"children":3243},{"className":1703,"code":3242,"language":1705,"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",[3244],{"type":40,"tag":74,"props":3245,"children":3246},{"__ignoreMap":7},[3247,3263,3280,3292,3313,3330,3350,3365,3385,3401,3421],{"type":40,"tag":383,"props":3248,"children":3249},{"class":385,"line":17},[3250,3254,3258],{"type":40,"tag":383,"props":3251,"children":3252},{"style":1724},[3253],{"type":46,"value":1801},{"type":40,"tag":383,"props":3255,"children":3256},{"style":470},[3257],{"type":46,"value":1732},{"type":40,"tag":383,"props":3259,"children":3260},{"style":394},[3261],{"type":46,"value":3262},"contoso_dbt_reports.rpt_revenue_by_segment\n",{"type":40,"tag":383,"props":3264,"children":3265},{"class":385,"line":430},[3266,3271,3275],{"type":40,"tag":383,"props":3267,"children":3268},{"style":1724},[3269],{"type":46,"value":3270},"type",{"type":40,"tag":383,"props":3272,"children":3273},{"style":470},[3274],{"type":46,"value":1732},{"type":40,"tag":383,"props":3276,"children":3277},{"style":394},[3278],{"type":46,"value":3279},"bq.source\n",{"type":40,"tag":383,"props":3281,"children":3282},{"class":385,"line":499},[3283,3288],{"type":40,"tag":383,"props":3284,"children":3285},{"style":1724},[3286],{"type":46,"value":3287},"columns",{"type":40,"tag":383,"props":3289,"children":3290},{"style":470},[3291],{"type":46,"value":1750},{"type":40,"tag":383,"props":3293,"children":3294},{"class":385,"line":11},[3295,3300,3304,3308],{"type":40,"tag":383,"props":3296,"children":3297},{"style":470},[3298],{"type":46,"value":3299},"  - ",{"type":40,"tag":383,"props":3301,"children":3302},{"style":1724},[3303],{"type":46,"value":1801},{"type":40,"tag":383,"props":3305,"children":3306},{"style":470},[3307],{"type":46,"value":1732},{"type":40,"tag":383,"props":3309,"children":3310},{"style":394},[3311],{"type":46,"value":3312},"segment_id\n",{"type":40,"tag":383,"props":3314,"children":3315},{"class":385,"line":1765},[3316,3321,3325],{"type":40,"tag":383,"props":3317,"children":3318},{"style":1724},[3319],{"type":46,"value":3320},"    type",{"type":40,"tag":383,"props":3322,"children":3323},{"style":470},[3324],{"type":46,"value":1732},{"type":40,"tag":383,"props":3326,"children":3327},{"style":394},[3328],{"type":46,"value":3329},"STRING\n",{"type":40,"tag":383,"props":3331,"children":3332},{"class":385,"line":1512},[3333,3337,3341,3345],{"type":40,"tag":383,"props":3334,"children":3335},{"style":470},[3336],{"type":46,"value":3299},{"type":40,"tag":383,"props":3338,"children":3339},{"style":1724},[3340],{"type":46,"value":1801},{"type":40,"tag":383,"props":3342,"children":3343},{"style":470},[3344],{"type":46,"value":1732},{"type":40,"tag":383,"props":3346,"children":3347},{"style":394},[3348],{"type":46,"value":3349},"category_name\n",{"type":40,"tag":383,"props":3351,"children":3352},{"class":385,"line":1790},[3353,3357,3361],{"type":40,"tag":383,"props":3354,"children":3355},{"style":1724},[3356],{"type":46,"value":3320},{"type":40,"tag":383,"props":3358,"children":3359},{"style":470},[3360],{"type":46,"value":1732},{"type":40,"tag":383,"props":3362,"children":3363},{"style":394},[3364],{"type":46,"value":3329},{"type":40,"tag":383,"props":3366,"children":3367},{"class":385,"line":1813},[3368,3372,3376,3380],{"type":40,"tag":383,"props":3369,"children":3370},{"style":470},[3371],{"type":46,"value":3299},{"type":40,"tag":383,"props":3373,"children":3374},{"style":1724},[3375],{"type":46,"value":1801},{"type":40,"tag":383,"props":3377,"children":3378},{"style":470},[3379],{"type":46,"value":1732},{"type":40,"tag":383,"props":3381,"children":3382},{"style":394},[3383],{"type":46,"value":3384},"year\n",{"type":40,"tag":383,"props":3386,"children":3387},{"class":385,"line":1831},[3388,3392,3396],{"type":40,"tag":383,"props":3389,"children":3390},{"style":1724},[3391],{"type":46,"value":3320},{"type":40,"tag":383,"props":3393,"children":3394},{"style":470},[3395],{"type":46,"value":1732},{"type":40,"tag":383,"props":3397,"children":3398},{"style":394},[3399],{"type":46,"value":3400},"INT64\n",{"type":40,"tag":383,"props":3402,"children":3403},{"class":385,"line":1849},[3404,3408,3412,3416],{"type":40,"tag":383,"props":3405,"children":3406},{"style":470},[3407],{"type":46,"value":3299},{"type":40,"tag":383,"props":3409,"children":3410},{"style":1724},[3411],{"type":46,"value":1801},{"type":40,"tag":383,"props":3413,"children":3414},{"style":470},[3415],{"type":46,"value":1732},{"type":40,"tag":383,"props":3417,"children":3418},{"style":394},[3419],{"type":46,"value":3420},"revenue_usd\n",{"type":40,"tag":383,"props":3422,"children":3424},{"class":385,"line":3423},11,[3425,3429,3433],{"type":40,"tag":383,"props":3426,"children":3427},{"style":1724},[3428],{"type":46,"value":3320},{"type":40,"tag":383,"props":3430,"children":3431},{"style":470},[3432],{"type":46,"value":1732},{"type":40,"tag":383,"props":3434,"children":3435},{"style":394},[3436],{"type":46,"value":3437},"NUMERIC\n",{"type":40,"tag":49,"props":3439,"children":3440},{},[3441],{"type":46,"value":3442},"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":40,"tag":129,"props":3444,"children":3446},{"id":3445},"_4-filter-out-loader-internal-tables",[3447],{"type":46,"value":3448},"4. Filter out loader-internal tables",{"type":40,"tag":49,"props":3450,"children":3451},{},[3452,3454,3460],{"type":46,"value":3453},"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":40,"tag":74,"props":3455,"children":3457},{"className":3456},[],[3458],{"type":46,"value":3459},"_dlt_pipeline_state",{"type":46,"value":2422},{"type":40,"tag":148,"props":3462,"children":3464},{"className":375,"code":3463,"language":377,"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",[3465],{"type":40,"tag":74,"props":3466,"children":3467},{"__ignoreMap":7},[3468,3476,3504,3513,3521,3545,3552,3560],{"type":40,"tag":383,"props":3469,"children":3470},{"class":385,"line":17},[3471],{"type":40,"tag":383,"props":3472,"children":3473},{"style":1715},[3474],{"type":46,"value":3475},"# dlt\n",{"type":40,"tag":383,"props":3477,"children":3478},{"class":385,"line":430},[3479,3484,3489,3494,3499],{"type":40,"tag":383,"props":3480,"children":3481},{"style":389},[3482],{"type":46,"value":3483},"find",{"type":40,"tag":383,"props":3485,"children":3486},{"style":394},[3487],{"type":46,"value":3488}," context/assets",{"type":40,"tag":383,"props":3490,"children":3491},{"style":484},[3492],{"type":46,"value":3493}," -name",{"type":40,"tag":383,"props":3495,"children":3496},{"style":394},[3497],{"type":46,"value":3498}," \"_dlt_*.asset.yml\"",{"type":40,"tag":383,"props":3500,"children":3501},{"style":484},[3502],{"type":46,"value":3503}," -delete\n",{"type":40,"tag":383,"props":3505,"children":3506},{"class":385,"line":499},[3507],{"type":40,"tag":383,"props":3508,"children":3510},{"emptyLinePlaceholder":3509},true,[3511],{"type":46,"value":3512},"\n",{"type":40,"tag":383,"props":3514,"children":3515},{"class":385,"line":11},[3516],{"type":40,"tag":383,"props":3517,"children":3518},{"style":1715},[3519],{"type":46,"value":3520},"# Airbyte\n",{"type":40,"tag":383,"props":3522,"children":3523},{"class":385,"line":1765},[3524,3528,3532,3536,3541],{"type":40,"tag":383,"props":3525,"children":3526},{"style":389},[3527],{"type":46,"value":3483},{"type":40,"tag":383,"props":3529,"children":3530},{"style":394},[3531],{"type":46,"value":3488},{"type":40,"tag":383,"props":3533,"children":3534},{"style":484},[3535],{"type":46,"value":3493},{"type":40,"tag":383,"props":3537,"children":3538},{"style":394},[3539],{"type":46,"value":3540}," \"_airbyte_*.asset.yml\"",{"type":40,"tag":383,"props":3542,"children":3543},{"style":484},[3544],{"type":46,"value":3503},{"type":40,"tag":383,"props":3546,"children":3547},{"class":385,"line":1512},[3548],{"type":40,"tag":383,"props":3549,"children":3550},{"emptyLinePlaceholder":3509},[3551],{"type":46,"value":3512},{"type":40,"tag":383,"props":3553,"children":3554},{"class":385,"line":1790},[3555],{"type":40,"tag":383,"props":3556,"children":3557},{"style":1715},[3558],{"type":46,"value":3559},"# Fivetran\n",{"type":40,"tag":383,"props":3561,"children":3562},{"class":385,"line":1813},[3563,3567,3571,3575,3580],{"type":40,"tag":383,"props":3564,"children":3565},{"style":389},[3566],{"type":46,"value":3483},{"type":40,"tag":383,"props":3568,"children":3569},{"style":394},[3570],{"type":46,"value":3488},{"type":40,"tag":383,"props":3572,"children":3573},{"style":484},[3574],{"type":46,"value":3493},{"type":40,"tag":383,"props":3576,"children":3577},{"style":394},[3578],{"type":46,"value":3579}," \"fivetran_*.asset.yml\"",{"type":40,"tag":383,"props":3581,"children":3582},{"style":484},[3583],{"type":46,"value":3503},{"type":40,"tag":49,"props":3585,"children":3586},{},[3587],{"type":46,"value":3588},"Run only the one(s) that match your loader. The contoso project uses dlt, so the first command applies.",{"type":40,"tag":129,"props":3590,"children":3592},{"id":3591},"_5-optional-validate-the-structure",[3593],{"type":46,"value":3594},"5. (Optional) Validate the structure",{"type":40,"tag":49,"props":3596,"children":3597},{},[3598],{"type":46,"value":3599},"Even before enhancement, you can sanity-check the YAMLs:",{"type":40,"tag":148,"props":3601,"children":3603},{"className":375,"code":3602,"language":377,"meta":7,"style":7},"bruin validate --config-file context/.bruin.yml context\n",[3604],{"type":40,"tag":74,"props":3605,"children":3606},{"__ignoreMap":7},[3607],{"type":40,"tag":383,"props":3608,"children":3609},{"class":385,"line":17},[3610,3614,3619,3623,3627],{"type":40,"tag":383,"props":3611,"children":3612},{"style":389},[3613],{"type":46,"value":589},{"type":40,"tag":383,"props":3615,"children":3616},{"style":394},[3617],{"type":46,"value":3618}," validate",{"type":40,"tag":383,"props":3620,"children":3621},{"style":484},[3622],{"type":46,"value":2621},{"type":40,"tag":383,"props":3624,"children":3625},{"style":394},[3626],{"type":46,"value":2626},{"type":40,"tag":383,"props":3628,"children":3629},{"style":394},[3630],{"type":46,"value":3631}," context\n",{"type":40,"tag":49,"props":3633,"children":3634},{},[3635],{"type":46,"value":3636},"You should see one line per asset and a summary like:",{"type":40,"tag":148,"props":3638,"children":3641},{"className":3639,"code":3640,"language":46},[151],"✓ Successfully validated 40 assets across 1 pipeline, all good.\n",[3642],{"type":40,"tag":74,"props":3643,"children":3644},{"__ignoreMap":7},[3645],{"type":46,"value":3640},{"type":40,"tag":49,"props":3647,"children":3648},{},[3649],{"type":46,"value":3650},"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":40,"tag":41,"props":3652,"children":3654},{"id":3653},"troubleshooting",[3655],{"type":46,"value":3656},"Troubleshooting",{"type":40,"tag":49,"props":3658,"children":3659},{},[3660],{"type":40,"tag":66,"props":3661,"children":3662},{},[3663],{"type":46,"value":3664},"\"connection not found\"",{"type":40,"tag":49,"props":3666,"children":3667},{},[3668,3670,3675,3677,3682,3684,3689],{"type":46,"value":3669},"You didn't pass ",{"type":40,"tag":74,"props":3671,"children":3673},{"className":3672},[],[3674],{"type":46,"value":2684},{"type":46,"value":3676},", so Bruin loaded a different ",{"type":40,"tag":74,"props":3678,"children":3680},{"className":3679},[],[3681],{"type":46,"value":1550},{"type":46,"value":3683}," from elsewhere in the repo. Always include ",{"type":40,"tag":74,"props":3685,"children":3687},{"className":3686},[],[3688],{"type":46,"value":1943},{"type":46,"value":121},{"type":40,"tag":49,"props":3691,"children":3692},{},[3693],{"type":40,"tag":66,"props":3694,"children":3695},{},[3696],{"type":46,"value":3697},"\"permission denied\" / \"access denied\" on a schema",{"type":40,"tag":49,"props":3699,"children":3700},{},[3701,3703,3709,3711,3716],{"type":46,"value":3702},"Your connection identity is missing read access. For BigQuery, the role is ",{"type":40,"tag":74,"props":3704,"children":3706},{"className":3705},[],[3707],{"type":46,"value":3708},"BigQuery Data Viewer",{"type":46,"value":3710}," on the dataset; for Postgres / Redshift, it's ",{"type":40,"tag":74,"props":3712,"children":3714},{"className":3713},[],[3715],{"type":46,"value":467},{"type":46,"value":3717}," on the schema's tables.",{"type":40,"tag":49,"props":3719,"children":3720},{},[3721],{"type":40,"tag":66,"props":3722,"children":3723},{},[3724,3726],{"type":46,"value":3725},"Some tables are missing from ",{"type":40,"tag":74,"props":3727,"children":3729},{"className":3728},[],[3730],{"type":46,"value":1675},{"type":40,"tag":49,"props":3732,"children":3733},{},[3734,3739,3741,3746,3748,3753],{"type":40,"tag":74,"props":3735,"children":3737},{"className":3736},[],[3738],{"type":46,"value":2753},{"type":46,"value":3740}," only writes assets for tables that exist ",{"type":40,"tag":2567,"props":3742,"children":3743},{},[3744],{"type":46,"value":3745},"right now",{"type":46,"value":3747},". If a dbt model failed to materialize, it won't be there. Re-run ",{"type":40,"tag":74,"props":3749,"children":3751},{"className":3750},[],[3752],{"type":46,"value":79},{"type":46,"value":3754},", then re-run the import.",{"type":40,"tag":49,"props":3756,"children":3757},{},[3758],{"type":40,"tag":66,"props":3759,"children":3760},{},[3761],{"type":46,"value":3762},"Import is slow on a large schema",{"type":40,"tag":49,"props":3764,"children":3765},{},[3766],{"type":46,"value":3767},"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":40,"tag":41,"props":3769,"children":3770},{"id":575},[3771],{"type":46,"value":578},{"type":40,"tag":49,"props":3773,"children":3774},{},[3775,3780],{"type":40,"tag":74,"props":3776,"children":3778},{"className":3777},[],[3779],{"type":46,"value":1675},{"type":46,"value":3781}," 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":40,"tag":592,"props":3783,"children":3784},{},[3785],{"type":46,"value":596},{"title":7,"searchDepth":430,"depth":430,"links":3787},[3788,3789,3790,3797,3798],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":3791},[3792,3793,3794,3795,3796],{"id":2823,"depth":499,"text":2826},{"id":2918,"depth":499,"text":2921},{"id":3190,"depth":499,"text":3193},{"id":3445,"depth":499,"text":3448},{"id":3591,"depth":499,"text":3594},{"id":3653,"depth":430,"text":3656},{"id":575,"depth":430,"text":578},"content:tutorials:dbt-bruin-analyst:import-schemas.md","tutorials/dbt-bruin-analyst/import-schemas.md","tutorials/dbt-bruin-analyst/import-schemas",{"_path":3803,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":3804,"description":3805,"date":10,"readingTime":1512,"category":12,"tags":3806,"difficulty":16,"module":5,"step":11,"journeys":3808,"learnMore":3809,"stepGif":31,"author":3819,"body":3820,"_type":607,"_id":5187,"_source":609,"_file":5188,"_stem":5189,"_extension":612},"/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.",[1514,3807,14],"Bruin AI",[19,20],[3810,3813,3816],{"label":3811,"url":3812},"bruin ai enhance (docs)","https://getbruin.com/docs/bruin/commands/ai-enhance.html",{"label":3814,"url":3815},"Quality checks reference","https://getbruin.com/docs/bruin/quality/overview.html",{"label":3817,"url":3818},"bruin validate (docs)","https://getbruin.com/docs/bruin/commands/validate.html",{"name":33,"role":34,"image":35},{"type":37,"children":3821,"toc":5176},[3822,3826,3860,3864,3900,3920,3924,3930,3935,3968,3973,4065,4099,4120,4153,4195,4201,4206,4226,4231,4655,4660,4695,4701,4730,4734,4742,4747,4753,4786,5108,5120,5149,5153,5172],{"type":40,"tag":41,"props":3823,"children":3824},{"id":43},[3825],{"type":46,"value":47},{"type":40,"tag":3827,"props":3828,"children":3829},"ol",{},[3830,3849],{"type":40,"tag":186,"props":3831,"children":3832},{},[3833,3834,3840,3842,3847],{"type":46,"value":2747},{"type":40,"tag":74,"props":3835,"children":3837},{"className":3836},[],[3838],{"type":46,"value":3839},"bruin ai enhance",{"type":46,"value":3841}," over ",{"type":40,"tag":74,"props":3843,"children":3845},{"className":3844},[],[3846],{"type":46,"value":1675},{"type":46,"value":3848}," so every asset gets a description, semantic tags, per-column docs, and quality checks",{"type":40,"tag":186,"props":3850,"children":3851},{},[3852,3853,3858],{"type":46,"value":2747},{"type":40,"tag":74,"props":3854,"children":3856},{"className":3855},[],[3857],{"type":46,"value":2579},{"type":46,"value":3859}," to confirm none of the YAMLs ended up malformed",{"type":40,"tag":41,"props":3861,"children":3862},{"id":56},[3863],{"type":46,"value":59},{"type":40,"tag":49,"props":3865,"children":3866},{},[3867,3869,3874,3876,3882,3884,3890,3892,3898],{"type":46,"value":3868},"Without descriptions, an AI agent can read your schema but doesn't know what it ",{"type":40,"tag":2567,"props":3870,"children":3871},{},[3872],{"type":46,"value":3873},"means",{"type":46,"value":3875},". It sees ",{"type":40,"tag":74,"props":3877,"children":3879},{"className":3878},[],[3880],{"type":46,"value":3881},"gmv",{"type":46,"value":3883}," and guesses; it sees ",{"type":40,"tag":74,"props":3885,"children":3887},{"className":3886},[],[3888],{"type":46,"value":3889},"status = 3",{"type":46,"value":3891}," and queries blindly; it sees a ",{"type":40,"tag":74,"props":3893,"children":3895},{"className":3894},[],[3896],{"type":46,"value":3897},"created_at",{"type":46,"value":3899}," column and assumes UTC. Enhancement is what turns the structural skeleton from the previous step into something an agent can actually reason about.",{"type":40,"tag":49,"props":3901,"children":3902},{},[3903,3905,3911,3913,3918],{"type":46,"value":3904},"Validation matters because ",{"type":40,"tag":74,"props":3906,"children":3908},{"className":3907},[],[3909],{"type":46,"value":3910},"ai enhance",{"type":46,"value":3912}," writes to YAML files at scale, and rare edge cases can produce malformed files. A 30-second ",{"type":40,"tag":74,"props":3914,"children":3916},{"className":3915},[],[3917],{"type":46,"value":2579},{"type":46,"value":3919}," is cheap insurance that catches them immediately, before they confuse an agent at query time.",{"type":40,"tag":41,"props":3921,"children":3922},{"id":124},[3923],{"type":46,"value":127},{"type":40,"tag":129,"props":3925,"children":3927},{"id":3926},"_1-run-the-ai-enhancement",[3928],{"type":46,"value":3929},"1. Run the AI enhancement",{"type":40,"tag":49,"props":3931,"children":3932},{},[3933],{"type":46,"value":3934},"From the dbt project root:",{"type":40,"tag":148,"props":3936,"children":3938},{"className":375,"code":3937,"language":377,"meta":7,"style":7},"bruin ai enhance --claude context/assets\n",[3939],{"type":40,"tag":74,"props":3940,"children":3941},{"__ignoreMap":7},[3942],{"type":40,"tag":383,"props":3943,"children":3944},{"class":385,"line":17},[3945,3949,3954,3959,3964],{"type":40,"tag":383,"props":3946,"children":3947},{"style":389},[3948],{"type":46,"value":589},{"type":40,"tag":383,"props":3950,"children":3951},{"style":394},[3952],{"type":46,"value":3953}," ai",{"type":40,"tag":383,"props":3955,"children":3956},{"style":394},[3957],{"type":46,"value":3958}," enhance",{"type":40,"tag":383,"props":3960,"children":3961},{"style":484},[3962],{"type":46,"value":3963}," --claude",{"type":40,"tag":383,"props":3965,"children":3966},{"style":394},[3967],{"type":46,"value":1649},{"type":40,"tag":49,"props":3969,"children":3970},{},[3971],{"type":46,"value":3972},"For each asset, Bruin sends the column list + a sample of the data to Claude and fills in:",{"type":40,"tag":182,"props":3974,"children":3975},{},[3976,3988,4020,4032],{"type":40,"tag":186,"props":3977,"children":3978},{},[3979,3981,3986],{"type":46,"value":3980},"A multi-paragraph ",{"type":40,"tag":66,"props":3982,"children":3983},{},[3984],{"type":46,"value":3985},"description",{"type":46,"value":3987}," covering purpose, grain, lineage, and typical use",{"type":40,"tag":186,"props":3989,"children":3990},{},[3991,3993,3998,4000,4006,4007,4013,4014],{"type":46,"value":3992},"Semantic ",{"type":40,"tag":66,"props":3994,"children":3995},{},[3996],{"type":46,"value":3997},"tags",{"type":46,"value":3999}," like ",{"type":40,"tag":74,"props":4001,"children":4003},{"className":4002},[],[4004],{"type":46,"value":4005},"domain:retail",{"type":46,"value":530},{"type":40,"tag":74,"props":4008,"children":4010},{"className":4009},[],[4011],{"type":46,"value":4012},"layer:staging",{"type":46,"value":530},{"type":40,"tag":74,"props":4015,"children":4017},{"className":4016},[],[4018],{"type":46,"value":4019},"sensitivity:pii",{"type":40,"tag":186,"props":4021,"children":4022},{},[4023,4025,4030],{"type":46,"value":4024},"Per-column ",{"type":40,"tag":66,"props":4026,"children":4027},{},[4028],{"type":46,"value":4029},"descriptions",{"type":46,"value":4031}," with business meaning",{"type":40,"tag":186,"props":4033,"children":4034},{},[4035,4040,4041,4047,4049,4055,4057,4063],{"type":40,"tag":66,"props":4036,"children":4037},{},[4038],{"type":46,"value":4039},"Quality checks",{"type":46,"value":2855},{"type":40,"tag":74,"props":4042,"children":4044},{"className":4043},[],[4045],{"type":46,"value":4046},"not_null",{"type":46,"value":4048}," on keys, ",{"type":40,"tag":74,"props":4050,"children":4052},{"className":4051},[],[4053],{"type":46,"value":4054},"unique",{"type":46,"value":4056}," on identifiers, ",{"type":40,"tag":74,"props":4058,"children":4060},{"className":4059},[],[4061],{"type":46,"value":4062},"accepted_values",{"type":46,"value":4064}," on enums",{"type":40,"tag":49,"props":4066,"children":4067},{},[4068,4070,4076,4077,4083,4084,4090,4092,4098],{"type":46,"value":4069},"The command auto-detects which AI CLI you have installed. If you have several, pass an explicit flag — ",{"type":40,"tag":74,"props":4071,"children":4073},{"className":4072},[],[4074],{"type":46,"value":4075},"--claude",{"type":46,"value":530},{"type":40,"tag":74,"props":4078,"children":4080},{"className":4079},[],[4081],{"type":46,"value":4082},"--opencode",{"type":46,"value":530},{"type":40,"tag":74,"props":4085,"children":4087},{"className":4086},[],[4088],{"type":46,"value":4089},"--codex",{"type":46,"value":4091},", or ",{"type":40,"tag":74,"props":4093,"children":4095},{"className":4094},[],[4096],{"type":46,"value":4097},"--cursor",{"type":46,"value":121},{"type":40,"tag":106,"props":4100,"children":4101},{},[4102],{"type":40,"tag":49,"props":4103,"children":4104},{},[4105,4110,4112,4118],{"type":40,"tag":66,"props":4106,"children":4107},{},[4108],{"type":46,"value":4109},"Time estimate.",{"type":46,"value":4111}," 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":40,"tag":74,"props":4113,"children":4115},{"className":4114},[],[4116],{"type":46,"value":4117},"--concurrency 10",{"type":46,"value":4119}," if you want it faster and your AI quota tolerates it.",{"type":40,"tag":106,"props":4121,"children":4122},{},[4123],{"type":40,"tag":49,"props":4124,"children":4125},{},[4126,4143,4145,4151],{"type":40,"tag":66,"props":4127,"children":4128},{},[4129,4130,4135,4137,4142],{"type":46,"value":2668},{"type":40,"tag":74,"props":4131,"children":4133},{"className":4132},[],[4134],{"type":46,"value":3910},{"type":46,"value":4136}," doesn't always honor ",{"type":40,"tag":74,"props":4138,"children":4140},{"className":4139},[],[4141],{"type":46,"value":2684},{"type":46,"value":121},{"type":46,"value":4144}," It can fall back to your global ",{"type":40,"tag":74,"props":4146,"children":4148},{"className":4147},[],[4149],{"type":46,"value":4150},"~/.bruin.yml",{"type":46,"value":4152}," 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":40,"tag":106,"props":4154,"children":4155},{},[4156],{"type":40,"tag":49,"props":4157,"children":4158},{},[4159,4164,4166,4171,4173,4179,4181,4186,4188,4194],{"type":40,"tag":66,"props":4160,"children":4161},{},[4162],{"type":46,"value":4163},"Gotcha — rare YAML corruption.",{"type":46,"value":4165}," On a small fraction of assets, ",{"type":40,"tag":74,"props":4167,"children":4169},{"className":4168},[],[4170],{"type":46,"value":3910},{"type":46,"value":4172}," has been known to mangle the ",{"type":40,"tag":74,"props":4174,"children":4176},{"className":4175},[],[4177],{"type":46,"value":4178},"columns:",{"type":46,"value":4180}," block. Always run ",{"type":40,"tag":74,"props":4182,"children":4184},{"className":4183},[],[4185],{"type":46,"value":2579},{"type":46,"value":4187}," afterward (next step). If a single asset breaks, regenerate just that file: ",{"type":40,"tag":74,"props":4189,"children":4191},{"className":4190},[],[4192],{"type":46,"value":4193},"bruin ai enhance --claude context/assets/\u003Cschema>/\u003Ctable>.asset.yml",{"type":46,"value":121},{"type":40,"tag":129,"props":4196,"children":4198},{"id":4197},"_2-spot-check-a-single-asset",[4199],{"type":46,"value":4200},"2. Spot-check a single asset",{"type":40,"tag":49,"props":4202,"children":4203},{},[4204],{"type":46,"value":4205},"Open one of the report assets — these benefit most from enrichment because the column names alone don't tell the full story:",{"type":40,"tag":148,"props":4207,"children":4209},{"className":375,"code":4208,"language":377,"meta":7,"style":7},"cat context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml\n",[4210],{"type":40,"tag":74,"props":4211,"children":4212},{"__ignoreMap":7},[4213],{"type":40,"tag":383,"props":4214,"children":4215},{"class":385,"line":17},[4216,4221],{"type":40,"tag":383,"props":4217,"children":4218},{"style":389},[4219],{"type":46,"value":4220},"cat",{"type":40,"tag":383,"props":4222,"children":4223},{"style":394},[4224],{"type":46,"value":4225}," context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml\n",{"type":40,"tag":49,"props":4227,"children":4228},{},[4229],{"type":46,"value":4230},"You should now see something like:",{"type":40,"tag":148,"props":4232,"children":4234},{"className":1703,"code":4233,"language":1705,"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",[4235],{"type":40,"tag":74,"props":4236,"children":4237},{"__ignoreMap":7},[4238,4253,4268,4284,4292,4300,4308,4316,4327,4339,4351,4363,4375,4395,4411,4429,4442,4464,4484,4500,4517,4529,4549,4569,4585,4602,4622,4638],{"type":40,"tag":383,"props":4239,"children":4240},{"class":385,"line":17},[4241,4245,4249],{"type":40,"tag":383,"props":4242,"children":4243},{"style":1724},[4244],{"type":46,"value":1801},{"type":40,"tag":383,"props":4246,"children":4247},{"style":470},[4248],{"type":46,"value":1732},{"type":40,"tag":383,"props":4250,"children":4251},{"style":394},[4252],{"type":46,"value":3262},{"type":40,"tag":383,"props":4254,"children":4255},{"class":385,"line":430},[4256,4260,4264],{"type":40,"tag":383,"props":4257,"children":4258},{"style":1724},[4259],{"type":46,"value":3270},{"type":40,"tag":383,"props":4261,"children":4262},{"style":470},[4263],{"type":46,"value":1732},{"type":40,"tag":383,"props":4265,"children":4266},{"style":394},[4267],{"type":46,"value":3279},{"type":40,"tag":383,"props":4269,"children":4270},{"class":385,"line":499},[4271,4275,4279],{"type":40,"tag":383,"props":4272,"children":4273},{"style":1724},[4274],{"type":46,"value":3985},{"type":40,"tag":383,"props":4276,"children":4277},{"style":470},[4278],{"type":46,"value":1732},{"type":40,"tag":383,"props":4280,"children":4281},{"style":464},[4282],{"type":46,"value":4283},"|\n",{"type":40,"tag":383,"props":4285,"children":4286},{"class":385,"line":11},[4287],{"type":40,"tag":383,"props":4288,"children":4289},{"style":394},[4290],{"type":46,"value":4291},"  Yearly revenue rolled up by product segment and category. Built from the\n",{"type":40,"tag":383,"props":4293,"children":4294},{"class":385,"line":1765},[4295],{"type":40,"tag":383,"props":4296,"children":4297},{"style":394},[4298],{"type":46,"value":4299},"  staging order-line table joined with the product dimension. One row per\n",{"type":40,"tag":383,"props":4301,"children":4302},{"class":385,"line":1512},[4303],{"type":40,"tag":383,"props":4304,"children":4305},{"style":394},[4306],{"type":46,"value":4307},"  (segment_id, category_name, year). Used by retail merchandising and\n",{"type":40,"tag":383,"props":4309,"children":4310},{"class":385,"line":1790},[4311],{"type":40,"tag":383,"props":4312,"children":4313},{"style":394},[4314],{"type":46,"value":4315},"  finance for category-level reporting.\n",{"type":40,"tag":383,"props":4317,"children":4318},{"class":385,"line":1813},[4319,4323],{"type":40,"tag":383,"props":4320,"children":4321},{"style":1724},[4322],{"type":46,"value":3997},{"type":40,"tag":383,"props":4324,"children":4325},{"style":470},[4326],{"type":46,"value":1750},{"type":40,"tag":383,"props":4328,"children":4329},{"class":385,"line":1831},[4330,4334],{"type":40,"tag":383,"props":4331,"children":4332},{"style":470},[4333],{"type":46,"value":3299},{"type":40,"tag":383,"props":4335,"children":4336},{"style":394},[4337],{"type":46,"value":4338},"domain:retail\n",{"type":40,"tag":383,"props":4340,"children":4341},{"class":385,"line":1849},[4342,4346],{"type":40,"tag":383,"props":4343,"children":4344},{"style":470},[4345],{"type":46,"value":3299},{"type":40,"tag":383,"props":4347,"children":4348},{"style":394},[4349],{"type":46,"value":4350},"layer:reports\n",{"type":40,"tag":383,"props":4352,"children":4353},{"class":385,"line":3423},[4354,4358],{"type":40,"tag":383,"props":4355,"children":4356},{"style":470},[4357],{"type":46,"value":3299},{"type":40,"tag":383,"props":4359,"children":4360},{"style":394},[4361],{"type":46,"value":4362},"grain:segment_category_year\n",{"type":40,"tag":383,"props":4364,"children":4366},{"class":385,"line":4365},12,[4367,4371],{"type":40,"tag":383,"props":4368,"children":4369},{"style":1724},[4370],{"type":46,"value":3287},{"type":40,"tag":383,"props":4372,"children":4373},{"style":470},[4374],{"type":46,"value":1750},{"type":40,"tag":383,"props":4376,"children":4378},{"class":385,"line":4377},13,[4379,4383,4387,4391],{"type":40,"tag":383,"props":4380,"children":4381},{"style":470},[4382],{"type":46,"value":3299},{"type":40,"tag":383,"props":4384,"children":4385},{"style":1724},[4386],{"type":46,"value":1801},{"type":40,"tag":383,"props":4388,"children":4389},{"style":470},[4390],{"type":46,"value":1732},{"type":40,"tag":383,"props":4392,"children":4393},{"style":394},[4394],{"type":46,"value":3312},{"type":40,"tag":383,"props":4396,"children":4398},{"class":385,"line":4397},14,[4399,4403,4407],{"type":40,"tag":383,"props":4400,"children":4401},{"style":1724},[4402],{"type":46,"value":3320},{"type":40,"tag":383,"props":4404,"children":4405},{"style":470},[4406],{"type":46,"value":1732},{"type":40,"tag":383,"props":4408,"children":4409},{"style":394},[4410],{"type":46,"value":3329},{"type":40,"tag":383,"props":4412,"children":4414},{"class":385,"line":4413},15,[4415,4420,4424],{"type":40,"tag":383,"props":4416,"children":4417},{"style":1724},[4418],{"type":46,"value":4419},"    description",{"type":40,"tag":383,"props":4421,"children":4422},{"style":470},[4423],{"type":46,"value":1732},{"type":40,"tag":383,"props":4425,"children":4426},{"style":394},[4427],{"type":46,"value":4428},"\"Identifier for the product segment (joins to dim_segment).\"\n",{"type":40,"tag":383,"props":4430,"children":4432},{"class":385,"line":4431},16,[4433,4438],{"type":40,"tag":383,"props":4434,"children":4435},{"style":1724},[4436],{"type":46,"value":4437},"    checks",{"type":40,"tag":383,"props":4439,"children":4440},{"style":470},[4441],{"type":46,"value":1750},{"type":40,"tag":383,"props":4443,"children":4445},{"class":385,"line":4444},17,[4446,4451,4455,4459],{"type":40,"tag":383,"props":4447,"children":4448},{"style":470},[4449],{"type":46,"value":4450},"      - ",{"type":40,"tag":383,"props":4452,"children":4453},{"style":1724},[4454],{"type":46,"value":1801},{"type":40,"tag":383,"props":4456,"children":4457},{"style":470},[4458],{"type":46,"value":1732},{"type":40,"tag":383,"props":4460,"children":4461},{"style":394},[4462],{"type":46,"value":4463},"not_null\n",{"type":40,"tag":383,"props":4465,"children":4467},{"class":385,"line":4466},18,[4468,4472,4476,4480],{"type":40,"tag":383,"props":4469,"children":4470},{"style":470},[4471],{"type":46,"value":3299},{"type":40,"tag":383,"props":4473,"children":4474},{"style":1724},[4475],{"type":46,"value":1801},{"type":40,"tag":383,"props":4477,"children":4478},{"style":470},[4479],{"type":46,"value":1732},{"type":40,"tag":383,"props":4481,"children":4482},{"style":394},[4483],{"type":46,"value":3349},{"type":40,"tag":383,"props":4485,"children":4487},{"class":385,"line":4486},19,[4488,4492,4496],{"type":40,"tag":383,"props":4489,"children":4490},{"style":1724},[4491],{"type":46,"value":3320},{"type":40,"tag":383,"props":4493,"children":4494},{"style":470},[4495],{"type":46,"value":1732},{"type":40,"tag":383,"props":4497,"children":4498},{"style":394},[4499],{"type":46,"value":3329},{"type":40,"tag":383,"props":4501,"children":4503},{"class":385,"line":4502},20,[4504,4508,4512],{"type":40,"tag":383,"props":4505,"children":4506},{"style":1724},[4507],{"type":46,"value":4419},{"type":40,"tag":383,"props":4509,"children":4510},{"style":470},[4511],{"type":46,"value":1732},{"type":40,"tag":383,"props":4513,"children":4514},{"style":394},[4515],{"type":46,"value":4516},"\"Human-readable category label, e.g. 'Bikes', 'Components'.\"\n",{"type":40,"tag":383,"props":4518,"children":4520},{"class":385,"line":4519},21,[4521,4525],{"type":40,"tag":383,"props":4522,"children":4523},{"style":1724},[4524],{"type":46,"value":4437},{"type":40,"tag":383,"props":4526,"children":4527},{"style":470},[4528],{"type":46,"value":1750},{"type":40,"tag":383,"props":4530,"children":4532},{"class":385,"line":4531},22,[4533,4537,4541,4545],{"type":40,"tag":383,"props":4534,"children":4535},{"style":470},[4536],{"type":46,"value":4450},{"type":40,"tag":383,"props":4538,"children":4539},{"style":1724},[4540],{"type":46,"value":1801},{"type":40,"tag":383,"props":4542,"children":4543},{"style":470},[4544],{"type":46,"value":1732},{"type":40,"tag":383,"props":4546,"children":4547},{"style":394},[4548],{"type":46,"value":4463},{"type":40,"tag":383,"props":4550,"children":4552},{"class":385,"line":4551},23,[4553,4557,4561,4565],{"type":40,"tag":383,"props":4554,"children":4555},{"style":470},[4556],{"type":46,"value":3299},{"type":40,"tag":383,"props":4558,"children":4559},{"style":1724},[4560],{"type":46,"value":1801},{"type":40,"tag":383,"props":4562,"children":4563},{"style":470},[4564],{"type":46,"value":1732},{"type":40,"tag":383,"props":4566,"children":4567},{"style":394},[4568],{"type":46,"value":3384},{"type":40,"tag":383,"props":4570,"children":4572},{"class":385,"line":4571},24,[4573,4577,4581],{"type":40,"tag":383,"props":4574,"children":4575},{"style":1724},[4576],{"type":46,"value":3320},{"type":40,"tag":383,"props":4578,"children":4579},{"style":470},[4580],{"type":46,"value":1732},{"type":40,"tag":383,"props":4582,"children":4583},{"style":394},[4584],{"type":46,"value":3400},{"type":40,"tag":383,"props":4586,"children":4588},{"class":385,"line":4587},25,[4589,4593,4597],{"type":40,"tag":383,"props":4590,"children":4591},{"style":1724},[4592],{"type":46,"value":4419},{"type":40,"tag":383,"props":4594,"children":4595},{"style":470},[4596],{"type":46,"value":1732},{"type":40,"tag":383,"props":4598,"children":4599},{"style":394},[4600],{"type":46,"value":4601},"\"Calendar year of the order date, in UTC.\"\n",{"type":40,"tag":383,"props":4603,"children":4605},{"class":385,"line":4604},26,[4606,4610,4614,4618],{"type":40,"tag":383,"props":4607,"children":4608},{"style":470},[4609],{"type":46,"value":3299},{"type":40,"tag":383,"props":4611,"children":4612},{"style":1724},[4613],{"type":46,"value":1801},{"type":40,"tag":383,"props":4615,"children":4616},{"style":470},[4617],{"type":46,"value":1732},{"type":40,"tag":383,"props":4619,"children":4620},{"style":394},[4621],{"type":46,"value":3420},{"type":40,"tag":383,"props":4623,"children":4625},{"class":385,"line":4624},27,[4626,4630,4634],{"type":40,"tag":383,"props":4627,"children":4628},{"style":1724},[4629],{"type":46,"value":3320},{"type":40,"tag":383,"props":4631,"children":4632},{"style":470},[4633],{"type":46,"value":1732},{"type":40,"tag":383,"props":4635,"children":4636},{"style":394},[4637],{"type":46,"value":3437},{"type":40,"tag":383,"props":4639,"children":4641},{"class":385,"line":4640},28,[4642,4646,4650],{"type":40,"tag":383,"props":4643,"children":4644},{"style":1724},[4645],{"type":46,"value":4419},{"type":40,"tag":383,"props":4647,"children":4648},{"style":470},[4649],{"type":46,"value":1732},{"type":40,"tag":383,"props":4651,"children":4652},{"style":394},[4653],{"type":46,"value":4654},"\"Sum of order_line.gross_amount in USD, post-discount.\"\n",{"type":40,"tag":49,"props":4656,"children":4657},{},[4658],{"type":46,"value":4659},"This is what the agent will read before it queries. The richer this gets, the better its SQL gets.",{"type":40,"tag":106,"props":4661,"children":4662},{},[4663],{"type":40,"tag":49,"props":4664,"children":4665},{},[4666,4678,4680,4685,4687,4693],{"type":40,"tag":66,"props":4667,"children":4668},{},[4669,4671,4676],{"type":46,"value":4670},"Watch for incorrect ",{"type":40,"tag":74,"props":4672,"children":4674},{"className":4673},[],[4675],{"type":46,"value":4054},{"type":46,"value":4677}," checks.",{"type":46,"value":4679}," AI enhancement sometimes adds ",{"type":40,"tag":74,"props":4681,"children":4683},{"className":4682},[],[4684],{"type":46,"value":4054},{"type":46,"value":4686}," to columns that look like keys but aren't unique per row (e.g., ",{"type":40,"tag":74,"props":4688,"children":4690},{"className":4689},[],[4691],{"type":46,"value":4692},"segment_id",{"type":46,"value":4694}," 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":40,"tag":129,"props":4696,"children":4698},{"id":4697},"_3-validate-the-whole-pipeline",[4699],{"type":46,"value":4700},"3. Validate the whole pipeline",{"type":40,"tag":148,"props":4702,"children":4703},{"className":375,"code":3602,"language":377,"meta":7,"style":7},[4704],{"type":40,"tag":74,"props":4705,"children":4706},{"__ignoreMap":7},[4707],{"type":40,"tag":383,"props":4708,"children":4709},{"class":385,"line":17},[4710,4714,4718,4722,4726],{"type":40,"tag":383,"props":4711,"children":4712},{"style":389},[4713],{"type":46,"value":589},{"type":40,"tag":383,"props":4715,"children":4716},{"style":394},[4717],{"type":46,"value":3618},{"type":40,"tag":383,"props":4719,"children":4720},{"style":484},[4721],{"type":46,"value":2621},{"type":40,"tag":383,"props":4723,"children":4724},{"style":394},[4725],{"type":46,"value":2626},{"type":40,"tag":383,"props":4727,"children":4728},{"style":394},[4729],{"type":46,"value":3631},{"type":40,"tag":49,"props":4731,"children":4732},{},[4733],{"type":46,"value":2636},{"type":40,"tag":148,"props":4735,"children":4737},{"className":4736,"code":3640,"language":46},[151],[4738],{"type":40,"tag":74,"props":4739,"children":4740},{"__ignoreMap":7},[4741],{"type":46,"value":3640},{"type":40,"tag":49,"props":4743,"children":4744},{},[4745],{"type":46,"value":4746},"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":40,"tag":129,"props":4748,"children":4750},{"id":4749},"_4-wrap-it-in-a-regenerator-script-optional",[4751],{"type":46,"value":4752},"4. Wrap it in a regenerator script (optional)",{"type":40,"tag":49,"props":4754,"children":4755},{},[4756,4758,4768,4770,4776,4778,4784],{"type":46,"value":4757},"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":40,"tag":88,"props":4759,"children":4761},{"href":24,"rel":4760},[91],[4762],{"type":40,"tag":74,"props":4763,"children":4765},{"className":4764},[],[4766],{"type":46,"value":4767},"generate_context.sh",{"type":46,"value":4769}," with ",{"type":40,"tag":74,"props":4771,"children":4773},{"className":4772},[],[4774],{"type":46,"value":4775},"--skip-import",{"type":46,"value":4777}," (re-enhance only) and ",{"type":40,"tag":74,"props":4779,"children":4781},{"className":4780},[],[4782],{"type":46,"value":4783},"--skip-enhance",{"type":46,"value":4785}," (fast structure refresh) flags. A minimal version:",{"type":40,"tag":148,"props":4787,"children":4789},{"className":375,"code":4788,"language":377,"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",[4790],{"type":40,"tag":74,"props":4791,"children":4792},{"__ignoreMap":7},[4793,4801,4819,4826,4844,4861,4868,4887,4913,4928,4943,4958,4973,4991,4998,5030,5037,5069],{"type":40,"tag":383,"props":4794,"children":4795},{"class":385,"line":17},[4796],{"type":40,"tag":383,"props":4797,"children":4798},{"style":1715},[4799],{"type":46,"value":4800},"#!/usr/bin/env bash\n",{"type":40,"tag":383,"props":4802,"children":4803},{"class":385,"line":430},[4804,4809,4814],{"type":40,"tag":383,"props":4805,"children":4806},{"style":484},[4807],{"type":46,"value":4808},"set",{"type":40,"tag":383,"props":4810,"children":4811},{"style":484},[4812],{"type":46,"value":4813}," -euo",{"type":40,"tag":383,"props":4815,"children":4816},{"style":394},[4817],{"type":46,"value":4818}," pipefail\n",{"type":40,"tag":383,"props":4820,"children":4821},{"class":385,"line":499},[4822],{"type":40,"tag":383,"props":4823,"children":4824},{"emptyLinePlaceholder":3509},[4825],{"type":46,"value":3512},{"type":40,"tag":383,"props":4827,"children":4828},{"class":385,"line":11},[4829,4834,4839],{"type":40,"tag":383,"props":4830,"children":4831},{"style":470},[4832],{"type":46,"value":4833},"CONFIG",{"type":40,"tag":383,"props":4835,"children":4836},{"style":464},[4837],{"type":46,"value":4838},"=",{"type":40,"tag":383,"props":4840,"children":4841},{"style":394},[4842],{"type":46,"value":4843},"\"context/.bruin.yml\"\n",{"type":40,"tag":383,"props":4845,"children":4846},{"class":385,"line":1765},[4847,4852,4856],{"type":40,"tag":383,"props":4848,"children":4849},{"style":470},[4850],{"type":46,"value":4851},"PIPELINE",{"type":40,"tag":383,"props":4853,"children":4854},{"style":464},[4855],{"type":46,"value":4838},{"type":40,"tag":383,"props":4857,"children":4858},{"style":394},[4859],{"type":46,"value":4860},"\"context\"\n",{"type":40,"tag":383,"props":4862,"children":4863},{"class":385,"line":1512},[4864],{"type":40,"tag":383,"props":4865,"children":4866},{"emptyLinePlaceholder":3509},[4867],{"type":46,"value":3512},{"type":40,"tag":383,"props":4869,"children":4870},{"class":385,"line":1790},[4871,4875,4879,4883],{"type":40,"tag":383,"props":4872,"children":4873},{"style":389},[4874],{"type":46,"value":589},{"type":40,"tag":383,"props":4876,"children":4877},{"style":394},[4878],{"type":46,"value":2960},{"type":40,"tag":383,"props":4880,"children":4881},{"style":394},[4882],{"type":46,"value":2965},{"type":40,"tag":383,"props":4884,"children":4885},{"style":484},[4886],{"type":46,"value":2970},{"type":40,"tag":383,"props":4888,"children":4889},{"class":385,"line":1813},[4890,4894,4899,4904,4909],{"type":40,"tag":383,"props":4891,"children":4892},{"style":484},[4893],{"type":46,"value":2978},{"type":40,"tag":383,"props":4895,"children":4896},{"style":394},[4897],{"type":46,"value":4898}," \"",{"type":40,"tag":383,"props":4900,"children":4901},{"style":470},[4902],{"type":46,"value":4903},"$CONFIG",{"type":40,"tag":383,"props":4905,"children":4906},{"style":394},[4907],{"type":46,"value":4908},"\"",{"type":40,"tag":383,"props":4910,"children":4911},{"style":484},[4912],{"type":46,"value":2970},{"type":40,"tag":383,"props":4914,"children":4915},{"class":385,"line":1831},[4916,4920,4924],{"type":40,"tag":383,"props":4917,"children":4918},{"style":484},[4919],{"type":46,"value":2994},{"type":40,"tag":383,"props":4921,"children":4922},{"style":394},[4923],{"type":46,"value":2999},{"type":40,"tag":383,"props":4925,"children":4926},{"style":484},[4927],{"type":46,"value":2970},{"type":40,"tag":383,"props":4929,"children":4930},{"class":385,"line":1849},[4931,4935,4939],{"type":40,"tag":383,"props":4932,"children":4933},{"style":484},[4934],{"type":46,"value":3011},{"type":40,"tag":383,"props":4936,"children":4937},{"style":394},[4938],{"type":46,"value":3016},{"type":40,"tag":383,"props":4940,"children":4941},{"style":484},[4942],{"type":46,"value":2970},{"type":40,"tag":383,"props":4944,"children":4945},{"class":385,"line":3423},[4946,4950,4954],{"type":40,"tag":383,"props":4947,"children":4948},{"style":484},[4949],{"type":46,"value":3011},{"type":40,"tag":383,"props":4951,"children":4952},{"style":394},[4953],{"type":46,"value":3032},{"type":40,"tag":383,"props":4955,"children":4956},{"style":484},[4957],{"type":46,"value":2970},{"type":40,"tag":383,"props":4959,"children":4960},{"class":385,"line":4365},[4961,4965,4969],{"type":40,"tag":383,"props":4962,"children":4963},{"style":484},[4964],{"type":46,"value":3011},{"type":40,"tag":383,"props":4966,"children":4967},{"style":394},[4968],{"type":46,"value":3048},{"type":40,"tag":383,"props":4970,"children":4971},{"style":484},[4972],{"type":46,"value":2970},{"type":40,"tag":383,"props":4974,"children":4975},{"class":385,"line":4377},[4976,4981,4986],{"type":40,"tag":383,"props":4977,"children":4978},{"style":394},[4979],{"type":46,"value":4980},"  \"",{"type":40,"tag":383,"props":4982,"children":4983},{"style":470},[4984],{"type":46,"value":4985},"$PIPELINE",{"type":40,"tag":383,"props":4987,"children":4988},{"style":394},[4989],{"type":46,"value":4990},"\"\n",{"type":40,"tag":383,"props":4992,"children":4993},{"class":385,"line":4397},[4994],{"type":40,"tag":383,"props":4995,"children":4996},{"emptyLinePlaceholder":3509},[4997],{"type":46,"value":3512},{"type":40,"tag":383,"props":4999,"children":5000},{"class":385,"line":4413},[5001,5005,5009,5013,5018,5022,5026],{"type":40,"tag":383,"props":5002,"children":5003},{"style":389},[5004],{"type":46,"value":3483},{"type":40,"tag":383,"props":5006,"children":5007},{"style":394},[5008],{"type":46,"value":4898},{"type":40,"tag":383,"props":5010,"children":5011},{"style":470},[5012],{"type":46,"value":4985},{"type":40,"tag":383,"props":5014,"children":5015},{"style":394},[5016],{"type":46,"value":5017},"/assets\"",{"type":40,"tag":383,"props":5019,"children":5020},{"style":484},[5021],{"type":46,"value":3493},{"type":40,"tag":383,"props":5023,"children":5024},{"style":394},[5025],{"type":46,"value":3498},{"type":40,"tag":383,"props":5027,"children":5028},{"style":484},[5029],{"type":46,"value":3503},{"type":40,"tag":383,"props":5031,"children":5032},{"class":385,"line":4431},[5033],{"type":40,"tag":383,"props":5034,"children":5035},{"emptyLinePlaceholder":3509},[5036],{"type":46,"value":3512},{"type":40,"tag":383,"props":5038,"children":5039},{"class":385,"line":4444},[5040,5044,5048,5052,5056,5060,5064],{"type":40,"tag":383,"props":5041,"children":5042},{"style":389},[5043],{"type":46,"value":589},{"type":40,"tag":383,"props":5045,"children":5046},{"style":394},[5047],{"type":46,"value":3953},{"type":40,"tag":383,"props":5049,"children":5050},{"style":394},[5051],{"type":46,"value":3958},{"type":40,"tag":383,"props":5053,"children":5054},{"style":484},[5055],{"type":46,"value":3963},{"type":40,"tag":383,"props":5057,"children":5058},{"style":394},[5059],{"type":46,"value":4898},{"type":40,"tag":383,"props":5061,"children":5062},{"style":470},[5063],{"type":46,"value":4985},{"type":40,"tag":383,"props":5065,"children":5066},{"style":394},[5067],{"type":46,"value":5068},"/assets\"\n",{"type":40,"tag":383,"props":5070,"children":5071},{"class":385,"line":4466},[5072,5076,5080,5084,5088,5092,5096,5100,5104],{"type":40,"tag":383,"props":5073,"children":5074},{"style":389},[5075],{"type":46,"value":589},{"type":40,"tag":383,"props":5077,"children":5078},{"style":394},[5079],{"type":46,"value":3618},{"type":40,"tag":383,"props":5081,"children":5082},{"style":484},[5083],{"type":46,"value":2621},{"type":40,"tag":383,"props":5085,"children":5086},{"style":394},[5087],{"type":46,"value":4898},{"type":40,"tag":383,"props":5089,"children":5090},{"style":470},[5091],{"type":46,"value":4903},{"type":40,"tag":383,"props":5093,"children":5094},{"style":394},[5095],{"type":46,"value":4908},{"type":40,"tag":383,"props":5097,"children":5098},{"style":394},[5099],{"type":46,"value":4898},{"type":40,"tag":383,"props":5101,"children":5102},{"style":470},[5103],{"type":46,"value":4985},{"type":40,"tag":383,"props":5105,"children":5106},{"style":394},[5107],{"type":46,"value":4990},{"type":40,"tag":49,"props":5109,"children":5110},{},[5111,5113,5118],{"type":46,"value":5112},"Save it as ",{"type":40,"tag":74,"props":5114,"children":5116},{"className":5115},[],[5117],{"type":46,"value":4767},{"type":46,"value":5119}," 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":40,"tag":106,"props":5121,"children":5122},{},[5123],{"type":40,"tag":49,"props":5124,"children":5125},{},[5126,5131,5133,5139,5141,5147],{"type":40,"tag":66,"props":5127,"children":5128},{},[5129],{"type":46,"value":5130},"Don't hand-edit generated YAMLs.",{"type":46,"value":5132}," They're regenerable artifacts. If a description is consistently wrong, fix it upstream — in the dbt model's ",{"type":40,"tag":74,"props":5134,"children":5136},{"className":5135},[],[5137],{"type":46,"value":5138},"schema.yml",{"type":46,"value":5140}," or ",{"type":40,"tag":74,"props":5142,"children":5144},{"className":5143},[],[5145],{"type":46,"value":5146},"description: ",{"type":46,"value":5148}," block — and the next import + enhance will pick the change up.",{"type":40,"tag":41,"props":5150,"children":5151},{"id":575},[5152],{"type":46,"value":578},{"type":40,"tag":49,"props":5154,"children":5155},{},[5156,5158,5163,5165,5170],{"type":46,"value":5157},"Your ",{"type":40,"tag":74,"props":5159,"children":5161},{"className":5160},[],[5162],{"type":46,"value":1675},{"type":46,"value":5164}," 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":40,"tag":2567,"props":5166,"children":5167},{},[5168],{"type":46,"value":5169},"except",{"type":46,"value":5171}," the wiring that lets it actually call out to all of this. That's the next step.",{"type":40,"tag":592,"props":5173,"children":5174},{},[5175],{"type":46,"value":596},{"title":7,"searchDepth":430,"depth":430,"links":5177},[5178,5179,5180,5186],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":5181},[5182,5183,5184,5185],{"id":3926,"depth":499,"text":3929},{"id":4197,"depth":499,"text":4200},{"id":4697,"depth":499,"text":4700},{"id":4749,"depth":499,"text":4752},{"id":575,"depth":430,"text":578},"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":5191,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":5192,"description":5193,"date":10,"readingTime":1790,"category":12,"tags":5194,"difficulty":16,"module":5,"step":1765,"variants":5199,"journeys":5200,"learnMore":5201,"stepGif":31,"author":5211,"body":5212,"_type":607,"_id":6592,"_source":609,"_file":6593,"_stem":6594,"_extension":612},"/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.",[1514,5195,14,5196,5197,5198],"MCP","Claude Code","Cursor","Codex",[5196,5197,5198],[19,20],[5202,5205,5208],{"label":5203,"url":5204},"Bruin MCP setup guide","https://getbruin.com/docs/bruin/getting-started/bruin-mcp.html",{"label":5206,"url":5207},"bruin query (docs)","https://getbruin.com/docs/bruin/commands/query.html",{"label":5209,"url":5210},"MCP best practices for AI agents","https://getbruin.com/docs/bruin/getting-started/bruin-mcp.html#best-practices-for-ai-agents",{"name":33,"role":34,"image":35},{"type":37,"children":5213,"toc":6577},[5214,5218,5257,5261,5273,5317,5322,5326,5332,5337,5663,5676,5688,5809,5821,5834,5867,6243,6249,6254,6270,6275,6319,6331,6337,6444,6450,6455,6538,6550,6554,6573],{"type":40,"tag":41,"props":5215,"children":5216},{"id":43},[5217],{"type":46,"value":47},{"type":40,"tag":3827,"props":5219,"children":5220},{},[5221,5226,5252],{"type":40,"tag":186,"props":5222,"children":5223},{},[5224],{"type":46,"value":5225},"Register Bruin MCP in your AI coding tool so the agent can ask Bruin \"how do I…?\" questions",{"type":40,"tag":186,"props":5227,"children":5228},{},[5229,5231,5237,5239,5244,5246],{"type":46,"value":5230},"Add an ",{"type":40,"tag":74,"props":5232,"children":5234},{"className":5233},[],[5235],{"type":46,"value":5236},"AGENTS.md",{"type":46,"value":5238}," at the repo root that points the agent at ",{"type":40,"tag":74,"props":5240,"children":5242},{"className":5241},[],[5243],{"type":46,"value":1675},{"type":46,"value":5245}," and at ",{"type":40,"tag":74,"props":5247,"children":5249},{"className":5248},[],[5250],{"type":46,"value":5251},"bruin query",{"type":40,"tag":186,"props":5253,"children":5254},{},[5255],{"type":46,"value":5256},"Verify the loop end-to-end with a real business question",{"type":40,"tag":41,"props":5258,"children":5259},{"id":56},[5260],{"type":46,"value":59},{"type":40,"tag":49,"props":5262,"children":5263},{},[5264,5266,5271],{"type":46,"value":5265},"The context layer is half the equation. The agent also needs an ",{"type":40,"tag":66,"props":5267,"children":5268},{},[5269],{"type":46,"value":5270},"interface",{"type":46,"value":5272}," to use it:",{"type":40,"tag":182,"props":5274,"children":5275},{},[5276,5281,5293],{"type":40,"tag":186,"props":5277,"children":5278},{},[5279],{"type":46,"value":5280},"A way to learn how Bruin itself works (asset types, command flags) — that's what Bruin MCP gives you",{"type":40,"tag":186,"props":5282,"children":5283},{},[5284,5286,5291],{"type":46,"value":5285},"A way to actually run SQL against the warehouse — that's ",{"type":40,"tag":74,"props":5287,"children":5289},{"className":5288},[],[5290],{"type":46,"value":5251},{"type":46,"value":5292},", which uses the same connection you defined in step 2",{"type":40,"tag":186,"props":5294,"children":5295},{},[5296,5298,5303,5305,5310,5312],{"type":46,"value":5297},"A canonical workflow that tells the agent ",{"type":40,"tag":2567,"props":5299,"children":5300},{},[5301],{"type":46,"value":5302},"which",{"type":46,"value":5304}," of the two to use, ",{"type":40,"tag":2567,"props":5306,"children":5307},{},[5308],{"type":46,"value":5309},"when",{"type":46,"value":5311}," — that's ",{"type":40,"tag":74,"props":5313,"children":5315},{"className":5314},[],[5316],{"type":46,"value":5236},{"type":40,"tag":49,"props":5318,"children":5319},{},[5320],{"type":46,"value":5321},"Get all three in place and the agent stops guessing table names and starts citing the asset YAMLs you generated.",{"type":40,"tag":41,"props":5323,"children":5324},{"id":124},[5325],{"type":46,"value":127},{"type":40,"tag":129,"props":5327,"children":5329},{"id":5328},"_1-register-bruin-mcp-in-your-ai-tool",[5330],{"type":46,"value":5331},"1. Register Bruin MCP in your AI tool",{"type":40,"tag":49,"props":5333,"children":5334},{},[5335],{"type":46,"value":5336},"Pick the tab that matches the tool you're using. Bruin MCP is stateless — register it once per machine, not per project.",{"type":40,"tag":5338,"props":5339,"children":5341},"variant-tabs",{":variants":5340},"[{\"id\":\"claude-code\",\"label\":\"Claude Code\"},{\"id\":\"cursor\",\"label\":\"Cursor\"},{\"id\":\"codex\",\"label\":\"Codex\"}]",[5342,5432,5587],{"type":40,"tag":5343,"props":5344,"children":5345},"template",{"v-slot:claude-code":7},[5346,5351,5356,5400,5405],{"type":40,"tag":129,"props":5347,"children":5349},{"id":5348},"claude-code",[5350],{"type":46,"value":5196},{"type":40,"tag":49,"props":5352,"children":5353},{},[5354],{"type":46,"value":5355},"Run this once in your terminal:",{"type":40,"tag":148,"props":5357,"children":5359},{"className":375,"code":5358,"language":377,"meta":7,"style":7},"claude mcp add bruin -- bruin mcp\n",[5360],{"type":40,"tag":74,"props":5361,"children":5362},{"__ignoreMap":7},[5363],{"type":40,"tag":383,"props":5364,"children":5365},{"class":385,"line":17},[5366,5371,5376,5381,5386,5391,5395],{"type":40,"tag":383,"props":5367,"children":5368},{"style":389},[5369],{"type":46,"value":5370},"claude",{"type":40,"tag":383,"props":5372,"children":5373},{"style":394},[5374],{"type":46,"value":5375}," mcp",{"type":40,"tag":383,"props":5377,"children":5378},{"style":394},[5379],{"type":46,"value":5380}," add",{"type":40,"tag":383,"props":5382,"children":5383},{"style":394},[5384],{"type":46,"value":5385}," bruin",{"type":40,"tag":383,"props":5387,"children":5388},{"style":484},[5389],{"type":46,"value":5390}," --",{"type":40,"tag":383,"props":5392,"children":5393},{"style":394},[5394],{"type":46,"value":5385},{"type":40,"tag":383,"props":5396,"children":5397},{"style":394},[5398],{"type":46,"value":5399}," mcp\n",{"type":40,"tag":49,"props":5401,"children":5402},{},[5403],{"type":46,"value":5404},"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":40,"tag":49,"props":5406,"children":5407},{},[5408,5410,5422,5424,5430],{"type":46,"value":5409},"To verify, ask Claude Code: ",{"type":40,"tag":2567,"props":5411,"children":5412},{},[5413,5415,5420],{"type":46,"value":5414},"\"Use the Bruin MCP to list the available ",{"type":40,"tag":74,"props":5416,"children":5418},{"className":5417},[],[5419],{"type":46,"value":589},{"type":46,"value":5421}," commands.\"",{"type":46,"value":5423}," It should reply with a list pulled from ",{"type":40,"tag":74,"props":5425,"children":5427},{"className":5426},[],[5428],{"type":46,"value":5429},"bruin_get_overview",{"type":46,"value":5431}," rather than guessing.",{"type":40,"tag":5343,"props":5433,"children":5434},{"v-slot:cursor":7},[5435,5440,5480,5553,5561],{"type":40,"tag":129,"props":5436,"children":5438},{"id":5437},"cursor",[5439],{"type":46,"value":5197},{"type":40,"tag":3827,"props":5441,"children":5442},{},[5443,5455,5465,5475],{"type":40,"tag":186,"props":5444,"children":5445},{},[5446,5448,5453],{"type":46,"value":5447},"Open ",{"type":40,"tag":66,"props":5449,"children":5450},{},[5451],{"type":46,"value":5452},"Cursor Settings",{"type":46,"value":5454}," (Cmd/Ctrl + ,)",{"type":40,"tag":186,"props":5456,"children":5457},{},[5458,5460],{"type":46,"value":5459},"Navigate to ",{"type":40,"tag":66,"props":5461,"children":5462},{},[5463],{"type":46,"value":5464},"MCP & Integrations",{"type":40,"tag":186,"props":5466,"children":5467},{},[5468,5470],{"type":46,"value":5469},"Click ",{"type":40,"tag":66,"props":5471,"children":5472},{},[5473],{"type":46,"value":5474},"Add Custom MCP",{"type":40,"tag":186,"props":5476,"children":5477},{},[5478],{"type":46,"value":5479},"Paste:",{"type":40,"tag":148,"props":5481,"children":5485},{"className":5482,"code":5483,"language":5484,"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",[5486],{"type":40,"tag":74,"props":5487,"children":5488},{"__ignoreMap":7},[5489,5497,5505,5513,5521,5529,5537,5545],{"type":40,"tag":383,"props":5490,"children":5491},{"class":385,"line":17},[5492],{"type":40,"tag":383,"props":5493,"children":5494},{},[5495],{"type":46,"value":5496},"{\n",{"type":40,"tag":383,"props":5498,"children":5499},{"class":385,"line":430},[5500],{"type":40,"tag":383,"props":5501,"children":5502},{},[5503],{"type":46,"value":5504},"  \"mcpServers\": {\n",{"type":40,"tag":383,"props":5506,"children":5507},{"class":385,"line":499},[5508],{"type":40,"tag":383,"props":5509,"children":5510},{},[5511],{"type":46,"value":5512},"    \"bruin\": {\n",{"type":40,"tag":383,"props":5514,"children":5515},{"class":385,"line":11},[5516],{"type":40,"tag":383,"props":5517,"children":5518},{},[5519],{"type":46,"value":5520},"      \"command\": \"bruin\",\n",{"type":40,"tag":383,"props":5522,"children":5523},{"class":385,"line":1765},[5524],{"type":40,"tag":383,"props":5525,"children":5526},{},[5527],{"type":46,"value":5528},"      \"args\": [\"mcp\"]\n",{"type":40,"tag":383,"props":5530,"children":5531},{"class":385,"line":1512},[5532],{"type":40,"tag":383,"props":5533,"children":5534},{},[5535],{"type":46,"value":5536},"    }\n",{"type":40,"tag":383,"props":5538,"children":5539},{"class":385,"line":1790},[5540],{"type":40,"tag":383,"props":5541,"children":5542},{},[5543],{"type":46,"value":5544},"  }\n",{"type":40,"tag":383,"props":5546,"children":5547},{"class":385,"line":1813},[5548],{"type":40,"tag":383,"props":5549,"children":5550},{},[5551],{"type":46,"value":5552},"}\n",{"type":40,"tag":3827,"props":5554,"children":5555},{"start":1765},[5556],{"type":40,"tag":186,"props":5557,"children":5558},{},[5559],{"type":46,"value":5560},"Restart Cursor.",{"type":40,"tag":49,"props":5562,"children":5563},{},[5564,5566,5578,5580,5586],{"type":46,"value":5565},"To verify, ask Cursor's chat: ",{"type":40,"tag":2567,"props":5567,"children":5568},{},[5569,5571,5576],{"type":46,"value":5570},"\"Use the Bruin MCP to fetch the docs for ",{"type":40,"tag":74,"props":5572,"children":5574},{"className":5573},[],[5575],{"type":46,"value":2753},{"type":46,"value":5577},".\"",{"type":46,"value":5579}," It should pull the doc page via ",{"type":40,"tag":74,"props":5581,"children":5583},{"className":5582},[],[5584],{"type":46,"value":5585},"bruin_get_doc_content",{"type":46,"value":121},{"type":40,"tag":5343,"props":5588,"children":5589},{"v-slot:codex":7},[5590,5595,5607,5640,5645],{"type":40,"tag":129,"props":5591,"children":5593},{"id":5592},"codex",[5594],{"type":46,"value":5198},{"type":40,"tag":49,"props":5596,"children":5597},{},[5598,5600,5606],{"type":46,"value":5599},"Add this to ",{"type":40,"tag":74,"props":5601,"children":5603},{"className":5602},[],[5604],{"type":46,"value":5605},"~/.codex/config.toml",{"type":46,"value":2422},{"type":40,"tag":148,"props":5608,"children":5612},{"className":5609,"code":5610,"language":5611,"meta":7,"style":7},"language-toml shiki shiki-themes github-dark","[mcp_servers.bruin]\ncommand = \"bruin\"\nargs = [\"mcp\"]\n","toml",[5613],{"type":40,"tag":74,"props":5614,"children":5615},{"__ignoreMap":7},[5616,5624,5632],{"type":40,"tag":383,"props":5617,"children":5618},{"class":385,"line":17},[5619],{"type":40,"tag":383,"props":5620,"children":5621},{},[5622],{"type":46,"value":5623},"[mcp_servers.bruin]\n",{"type":40,"tag":383,"props":5625,"children":5626},{"class":385,"line":430},[5627],{"type":40,"tag":383,"props":5628,"children":5629},{},[5630],{"type":46,"value":5631},"command = \"bruin\"\n",{"type":40,"tag":383,"props":5633,"children":5634},{"class":385,"line":499},[5635],{"type":40,"tag":383,"props":5636,"children":5637},{},[5638],{"type":46,"value":5639},"args = [\"mcp\"]\n",{"type":40,"tag":49,"props":5641,"children":5642},{},[5643],{"type":46,"value":5644},"Restart Codex.",{"type":40,"tag":49,"props":5646,"children":5647},{},[5648,5650,5655,5657,5662],{"type":46,"value":5649},"To verify, ask Codex: ",{"type":40,"tag":2567,"props":5651,"children":5652},{},[5653],{"type":46,"value":5654},"\"Use Bruin MCP to list connection types Bruin supports.\"",{"type":46,"value":5656}," It should return the list from ",{"type":40,"tag":74,"props":5658,"children":5660},{"className":5659},[],[5661],{"type":46,"value":5585},{"type":46,"value":121},{"type":40,"tag":129,"props":5664,"children":5666},{"id":5665},"_2-confirm-bruin-query-works-as-the-agent-will-use-it",[5667,5669,5674],{"type":46,"value":5668},"2. Confirm ",{"type":40,"tag":74,"props":5670,"children":5672},{"className":5671},[],[5673],{"type":46,"value":5251},{"type":46,"value":5675}," works as the agent will use it",{"type":40,"tag":49,"props":5677,"children":5678},{},[5679,5681,5686],{"type":46,"value":5680},"Run a sanity-check query against your warehouse using the ",{"type":40,"tag":66,"props":5682,"children":5683},{},[5684],{"type":46,"value":5685},"scoped config",{"type":46,"value":5687},", exactly the way the agent will:",{"type":40,"tag":148,"props":5689,"children":5691},{"className":375,"code":5690,"language":377,"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",[5692],{"type":40,"tag":74,"props":5693,"children":5694},{"__ignoreMap":7},[5695,5711,5726,5741,5754,5777,5785,5793,5801],{"type":40,"tag":383,"props":5696,"children":5697},{"class":385,"line":17},[5698,5702,5707],{"type":40,"tag":383,"props":5699,"children":5700},{"style":389},[5701],{"type":46,"value":589},{"type":40,"tag":383,"props":5703,"children":5704},{"style":394},[5705],{"type":46,"value":5706}," query",{"type":40,"tag":383,"props":5708,"children":5709},{"style":484},[5710],{"type":46,"value":2970},{"type":40,"tag":383,"props":5712,"children":5713},{"class":385,"line":430},[5714,5718,5722],{"type":40,"tag":383,"props":5715,"children":5716},{"style":484},[5717],{"type":46,"value":2978},{"type":40,"tag":383,"props":5719,"children":5720},{"style":394},[5721],{"type":46,"value":2626},{"type":40,"tag":383,"props":5723,"children":5724},{"style":484},[5725],{"type":46,"value":2970},{"type":40,"tag":383,"props":5727,"children":5728},{"class":385,"line":499},[5729,5733,5737],{"type":40,"tag":383,"props":5730,"children":5731},{"style":484},[5732],{"type":46,"value":2994},{"type":40,"tag":383,"props":5734,"children":5735},{"style":394},[5736],{"type":46,"value":2999},{"type":40,"tag":383,"props":5738,"children":5739},{"style":484},[5740],{"type":46,"value":2970},{"type":40,"tag":383,"props":5742,"children":5743},{"class":385,"line":11},[5744,5749],{"type":40,"tag":383,"props":5745,"children":5746},{"style":484},[5747],{"type":46,"value":5748},"  --query",{"type":40,"tag":383,"props":5750,"children":5751},{"style":394},[5752],{"type":46,"value":5753}," \"SELECT category_name, SUM(revenue_usd) AS rev\n",{"type":40,"tag":383,"props":5755,"children":5756},{"class":385,"line":1765},[5757,5762,5767,5772],{"type":40,"tag":383,"props":5758,"children":5759},{"style":394},[5760],{"type":46,"value":5761},"           FROM ",{"type":40,"tag":383,"props":5763,"children":5764},{"style":484},[5765],{"type":46,"value":5766},"\\`",{"type":40,"tag":383,"props":5768,"children":5769},{"style":394},[5770],{"type":46,"value":5771},"bruin-playground-arsalan.contoso_dbt_reports.rpt_revenue_by_segment",{"type":40,"tag":383,"props":5773,"children":5774},{"style":484},[5775],{"type":46,"value":5776},"\\`\n",{"type":40,"tag":383,"props":5778,"children":5779},{"class":385,"line":1512},[5780],{"type":40,"tag":383,"props":5781,"children":5782},{"style":394},[5783],{"type":46,"value":5784},"           WHERE year = 2024\n",{"type":40,"tag":383,"props":5786,"children":5787},{"class":385,"line":1790},[5788],{"type":40,"tag":383,"props":5789,"children":5790},{"style":394},[5791],{"type":46,"value":5792},"           GROUP BY 1\n",{"type":40,"tag":383,"props":5794,"children":5795},{"class":385,"line":1813},[5796],{"type":40,"tag":383,"props":5797,"children":5798},{"style":394},[5799],{"type":46,"value":5800},"           ORDER BY rev DESC\n",{"type":40,"tag":383,"props":5802,"children":5803},{"class":385,"line":1831},[5804],{"type":40,"tag":383,"props":5805,"children":5806},{"style":394},[5807],{"type":46,"value":5808},"           LIMIT 10\"\n",{"type":40,"tag":49,"props":5810,"children":5811},{},[5812,5814,5819],{"type":46,"value":5813},"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":40,"tag":74,"props":5815,"children":5817},{"className":5816},[],[5818],{"type":46,"value":212},{"type":46,"value":5820}," identity.",{"type":40,"tag":129,"props":5822,"children":5824},{"id":5823},"_3-add-an-agentsmd-at-the-repo-root",[5825,5827,5832],{"type":46,"value":5826},"3. Add an ",{"type":40,"tag":74,"props":5828,"children":5830},{"className":5829},[],[5831],{"type":46,"value":5236},{"type":46,"value":5833}," at the repo root",{"type":40,"tag":49,"props":5835,"children":5836},{},[5837,5839,5844,5846,5851,5853,5858,5860,5865],{"type":46,"value":5838},"Create ",{"type":40,"tag":74,"props":5840,"children":5842},{"className":5841},[],[5843],{"type":46,"value":5236},{"type":46,"value":5845}," next to ",{"type":40,"tag":74,"props":5847,"children":5849},{"className":5848},[],[5850],{"type":46,"value":196},{"type":46,"value":5852}," (the ",{"type":40,"tag":66,"props":5854,"children":5855},{},[5856],{"type":46,"value":5857},"repo root",{"type":46,"value":5859},", not inside ",{"type":40,"tag":74,"props":5861,"children":5863},{"className":5862},[],[5864],{"type":46,"value":102},{"type":46,"value":5866},"). 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":40,"tag":148,"props":5868,"children":5871},{"className":5869,"code":5870,"language":607,"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",[5872],{"type":40,"tag":74,"props":5873,"children":5874},{"__ignoreMap":7},[5875,5883,5890,5898,5906,5913,5921,5928,5936,5944,5952,5960,5968,5976,5984,5992,6000,6008,6015,6023,6030,6038,6046,6054,6062,6070,6077,6085,6092,6101,6110,6119,6128,6137,6146,6154,6163,6171,6180,6189,6198,6207,6216,6225,6234],{"type":40,"tag":383,"props":5876,"children":5877},{"class":385,"line":17},[5878],{"type":40,"tag":383,"props":5879,"children":5880},{},[5881],{"type":46,"value":5882},"# AGENTS.md\n",{"type":40,"tag":383,"props":5884,"children":5885},{"class":385,"line":430},[5886],{"type":40,"tag":383,"props":5887,"children":5888},{"emptyLinePlaceholder":3509},[5889],{"type":46,"value":3512},{"type":40,"tag":383,"props":5891,"children":5892},{"class":385,"line":499},[5893],{"type":40,"tag":383,"props":5894,"children":5895},{},[5896],{"type":46,"value":5897},"This repo contains a dbt project plus a Bruin context layer documenting the\n",{"type":40,"tag":383,"props":5899,"children":5900},{"class":385,"line":11},[5901],{"type":40,"tag":383,"props":5902,"children":5903},{},[5904],{"type":46,"value":5905},"warehouse it builds. Use this guide before reading code or running queries.\n",{"type":40,"tag":383,"props":5907,"children":5908},{"class":385,"line":1765},[5909],{"type":40,"tag":383,"props":5910,"children":5911},{"emptyLinePlaceholder":3509},[5912],{"type":46,"value":3512},{"type":40,"tag":383,"props":5914,"children":5915},{"class":385,"line":1512},[5916],{"type":40,"tag":383,"props":5917,"children":5918},{},[5919],{"type":46,"value":5920},"## Canonical workflow\n",{"type":40,"tag":383,"props":5922,"children":5923},{"class":385,"line":1790},[5924],{"type":40,"tag":383,"props":5925,"children":5926},{"emptyLinePlaceholder":3509},[5927],{"type":46,"value":3512},{"type":40,"tag":383,"props":5929,"children":5930},{"class":385,"line":1813},[5931],{"type":40,"tag":383,"props":5932,"children":5933},{},[5934],{"type":46,"value":5935},"1. **Read context first.** Before querying, open the relevant\n",{"type":40,"tag":383,"props":5937,"children":5938},{"class":385,"line":1831},[5939],{"type":40,"tag":383,"props":5940,"children":5941},{},[5942],{"type":46,"value":5943},"   `context/assets/\u003Cschema>/\u003Ctable>.asset.yml`. It has the description, grain,\n",{"type":40,"tag":383,"props":5945,"children":5946},{"class":385,"line":1849},[5947],{"type":40,"tag":383,"props":5948,"children":5949},{},[5950],{"type":46,"value":5951},"   column docs, and quality checks for that table — written from real samples.\n",{"type":40,"tag":383,"props":5953,"children":5954},{"class":385,"line":3423},[5955],{"type":40,"tag":383,"props":5956,"children":5957},{},[5958],{"type":46,"value":5959},"2. **Use Bruin MCP for tooling questions.** Anything like \"how does\n",{"type":40,"tag":383,"props":5961,"children":5962},{"class":385,"line":4365},[5963],{"type":40,"tag":383,"props":5964,"children":5965},{},[5966],{"type":46,"value":5967},"   `bruin import` work?\" or \"what asset types exist?\" — call the MCP server,\n",{"type":40,"tag":383,"props":5969,"children":5970},{"class":385,"line":4377},[5971],{"type":40,"tag":383,"props":5972,"children":5973},{},[5974],{"type":46,"value":5975},"   don't guess from training data.\n",{"type":40,"tag":383,"props":5977,"children":5978},{"class":385,"line":4397},[5979],{"type":40,"tag":383,"props":5980,"children":5981},{},[5982],{"type":46,"value":5983},"3. **Use `bruin query` for SQL.** Always pass `--config-file context/.bruin.yml`\n",{"type":40,"tag":383,"props":5985,"children":5986},{"class":385,"line":4413},[5987],{"type":40,"tag":383,"props":5988,"children":5989},{},[5990],{"type":46,"value":5991},"   so the scoped connection is used.\n",{"type":40,"tag":383,"props":5993,"children":5994},{"class":385,"line":4431},[5995],{"type":40,"tag":383,"props":5996,"children":5997},{},[5998],{"type":46,"value":5999},"4. **Cite the asset(s) you read.** When answering, reference the\n",{"type":40,"tag":383,"props":6001,"children":6002},{"class":385,"line":4444},[6003],{"type":40,"tag":383,"props":6004,"children":6005},{},[6006],{"type":46,"value":6007},"   `context/assets/...asset.yml` files you used.\n",{"type":40,"tag":383,"props":6009,"children":6010},{"class":385,"line":4466},[6011],{"type":40,"tag":383,"props":6012,"children":6013},{"emptyLinePlaceholder":3509},[6014],{"type":46,"value":3512},{"type":40,"tag":383,"props":6016,"children":6017},{"class":385,"line":4486},[6018],{"type":40,"tag":383,"props":6019,"children":6020},{},[6021],{"type":46,"value":6022},"## Data access\n",{"type":40,"tag":383,"props":6024,"children":6025},{"class":385,"line":4502},[6026],{"type":40,"tag":383,"props":6027,"children":6028},{"emptyLinePlaceholder":3509},[6029],{"type":46,"value":3512},{"type":40,"tag":383,"props":6031,"children":6032},{"class":385,"line":4519},[6033],{"type":40,"tag":383,"props":6034,"children":6035},{},[6036],{"type":46,"value":6037},"- Connection name: `contoso_dbt_bq`\n",{"type":40,"tag":383,"props":6039,"children":6040},{"class":385,"line":4531},[6041],{"type":40,"tag":383,"props":6042,"children":6043},{},[6044],{"type":46,"value":6045},"- Auth: Application Default Credentials (inherits `gcloud auth application-default login`)\n",{"type":40,"tag":383,"props":6047,"children":6048},{"class":385,"line":4551},[6049],{"type":40,"tag":383,"props":6050,"children":6051},{},[6052],{"type":46,"value":6053},"- This is **read-only.** Never INSERT, UPDATE, DELETE, MERGE, or DROP.\n",{"type":40,"tag":383,"props":6055,"children":6056},{"class":385,"line":4571},[6057],{"type":40,"tag":383,"props":6058,"children":6059},{},[6060],{"type":46,"value":6061},"- Always show the SQL before executing it.\n",{"type":40,"tag":383,"props":6063,"children":6064},{"class":385,"line":4587},[6065],{"type":40,"tag":383,"props":6066,"children":6067},{},[6068],{"type":46,"value":6069},"- Use `LIMIT 100` (or smaller) when exploring an unfamiliar table.\n",{"type":40,"tag":383,"props":6071,"children":6072},{"class":385,"line":4604},[6073],{"type":40,"tag":383,"props":6074,"children":6075},{"emptyLinePlaceholder":3509},[6076],{"type":46,"value":3512},{"type":40,"tag":383,"props":6078,"children":6079},{"class":385,"line":4624},[6080],{"type":40,"tag":383,"props":6081,"children":6082},{},[6083],{"type":46,"value":6084},"## Layout\n",{"type":40,"tag":383,"props":6086,"children":6087},{"class":385,"line":4640},[6088],{"type":40,"tag":383,"props":6089,"children":6090},{"emptyLinePlaceholder":3509},[6091],{"type":46,"value":3512},{"type":40,"tag":383,"props":6093,"children":6095},{"class":385,"line":6094},29,[6096],{"type":40,"tag":383,"props":6097,"children":6098},{},[6099],{"type":46,"value":6100},"- `models/` — dbt models. Don't run `dbt` for analysis questions; the\n",{"type":40,"tag":383,"props":6102,"children":6104},{"class":385,"line":6103},30,[6105],{"type":40,"tag":383,"props":6106,"children":6107},{},[6108],{"type":46,"value":6109},"  warehouse is already built. Read these only when asked about transformation logic.\n",{"type":40,"tag":383,"props":6111,"children":6113},{"class":385,"line":6112},31,[6114],{"type":40,"tag":383,"props":6115,"children":6116},{},[6117],{"type":46,"value":6118},"- `context/assets/contoso_dbt_raw/` — raw dlt-loaded tables (lowest level).\n",{"type":40,"tag":383,"props":6120,"children":6122},{"class":385,"line":6121},32,[6123],{"type":40,"tag":383,"props":6124,"children":6125},{},[6126],{"type":46,"value":6127},"- `context/assets/contoso_dbt_staging/` — `stg_*` cleaned/typed views.\n",{"type":40,"tag":383,"props":6129,"children":6131},{"class":385,"line":6130},33,[6132],{"type":40,"tag":383,"props":6133,"children":6134},{},[6135],{"type":46,"value":6136},"- `context/assets/contoso_dbt_reports/` — `rpt_*` mart-level reports.\n",{"type":40,"tag":383,"props":6138,"children":6140},{"class":385,"line":6139},34,[6141],{"type":40,"tag":383,"props":6142,"children":6143},{},[6144],{"type":46,"value":6145},"  Prefer these for business questions; staging is for ad-hoc deep dives.\n",{"type":40,"tag":383,"props":6147,"children":6149},{"class":385,"line":6148},35,[6150],{"type":40,"tag":383,"props":6151,"children":6152},{"emptyLinePlaceholder":3509},[6153],{"type":46,"value":3512},{"type":40,"tag":383,"props":6155,"children":6157},{"class":385,"line":6156},36,[6158],{"type":40,"tag":383,"props":6159,"children":6160},{},[6161],{"type":46,"value":6162},"## Things to avoid\n",{"type":40,"tag":383,"props":6164,"children":6166},{"class":385,"line":6165},37,[6167],{"type":40,"tag":383,"props":6168,"children":6169},{"emptyLinePlaceholder":3509},[6170],{"type":46,"value":3512},{"type":40,"tag":383,"props":6172,"children":6174},{"class":385,"line":6173},38,[6175],{"type":40,"tag":383,"props":6176,"children":6177},{},[6178],{"type":46,"value":6179},"- **Don't hand-edit `context/assets/*.asset.yml`.** They're regenerated by\n",{"type":40,"tag":383,"props":6181,"children":6183},{"class":385,"line":6182},39,[6184],{"type":40,"tag":383,"props":6185,"children":6186},{},[6187],{"type":46,"value":6188},"  `generate_context.sh`. Improve descriptions in the dbt model's `schema.yml`\n",{"type":40,"tag":383,"props":6190,"children":6192},{"class":385,"line":6191},40,[6193],{"type":40,"tag":383,"props":6194,"children":6195},{},[6196],{"type":46,"value":6197},"  upstream and re-run the generator.\n",{"type":40,"tag":383,"props":6199,"children":6201},{"class":385,"line":6200},41,[6202],{"type":40,"tag":383,"props":6203,"children":6204},{},[6205],{"type":46,"value":6206},"- **Don't mix configs across pipelines.** This project's connection lives in\n",{"type":40,"tag":383,"props":6208,"children":6210},{"class":385,"line":6209},42,[6211],{"type":40,"tag":383,"props":6212,"children":6213},{},[6214],{"type":46,"value":6215},"  `context/.bruin.yml`; other Bruin pipelines in the repo have their own.\n",{"type":40,"tag":383,"props":6217,"children":6219},{"class":385,"line":6218},43,[6220],{"type":40,"tag":383,"props":6221,"children":6222},{},[6223],{"type":46,"value":6224},"  Always use `--config-file`.\n",{"type":40,"tag":383,"props":6226,"children":6228},{"class":385,"line":6227},44,[6229],{"type":40,"tag":383,"props":6230,"children":6231},{},[6232],{"type":46,"value":6233},"- **Don't trust row counts in descriptions.** They're snapshot-time and may\n",{"type":40,"tag":383,"props":6235,"children":6237},{"class":385,"line":6236},45,[6238],{"type":40,"tag":383,"props":6239,"children":6240},{},[6241],{"type":46,"value":6242},"  be stale. If a question hinges on exact size, run `SELECT COUNT(*)` yourself.\n",{"type":40,"tag":129,"props":6244,"children":6246},{"id":6245},"_4-try-the-loop-end-to-end",[6247],{"type":46,"value":6248},"4. Try the loop end-to-end",{"type":40,"tag":49,"props":6250,"children":6251},{},[6252],{"type":46,"value":6253},"Open your AI tool in this repo and ask a real question, e.g.:",{"type":40,"tag":106,"props":6255,"children":6256},{},[6257],{"type":40,"tag":49,"props":6258,"children":6259},{},[6260,6262,6268],{"type":46,"value":6261},"\"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":40,"tag":74,"props":6263,"children":6265},{"className":6264},[],[6266],{"type":46,"value":6267},"context/assets/...",{"type":46,"value":6269}," files you used.\"",{"type":40,"tag":49,"props":6271,"children":6272},{},[6273],{"type":46,"value":6274},"A correctly-wired agent will:",{"type":40,"tag":3827,"props":6276,"children":6277},{},[6278,6290,6303,6314],{"type":40,"tag":186,"props":6279,"children":6280},{},[6281,6282,6288],{"type":46,"value":5447},{"type":40,"tag":74,"props":6283,"children":6285},{"className":6284},[],[6286],{"type":46,"value":6287},"context/assets/contoso_dbt_reports/rpt_revenue_by_segment.asset.yml",{"type":46,"value":6289}," and confirm the grain",{"type":40,"tag":186,"props":6291,"children":6292},{},[6293,6295,6301],{"type":46,"value":6294},"Draft a SQL query against ",{"type":40,"tag":74,"props":6296,"children":6298},{"className":6297},[],[6299],{"type":46,"value":6300},"contoso_dbt_reports.rpt_revenue_by_segment",{"type":46,"value":6302}," filtered by year",{"type":40,"tag":186,"props":6304,"children":6305},{},[6306,6308],{"type":46,"value":6307},"Show the SQL, wait for a go-ahead, then run ",{"type":40,"tag":74,"props":6309,"children":6311},{"className":6310},[],[6312],{"type":46,"value":6313},"bruin query --config-file context/.bruin.yml --connection contoso_dbt_bq --query \"...\"",{"type":40,"tag":186,"props":6315,"children":6316},{},[6317],{"type":46,"value":6318},"Cite the asset YAML it read",{"type":40,"tag":49,"props":6320,"children":6321},{},[6322,6324,6329],{"type":46,"value":6323},"If it skips step 1 (reading the asset), tighten ",{"type":40,"tag":74,"props":6325,"children":6327},{"className":6326},[],[6328],{"type":46,"value":5236},{"type":46,"value":6330}," — the canonical workflow section is what enforces this behavior.",{"type":40,"tag":41,"props":6332,"children":6334},{"id":6333},"lessons-learned",[6335],{"type":46,"value":6336},"Lessons learned",{"type":40,"tag":182,"props":6338,"children":6339},{},[6340,6362,6372,6388,6411,6428],{"type":40,"tag":186,"props":6341,"children":6342},{},[6343,6354,6356,6361],{"type":40,"tag":66,"props":6344,"children":6345},{},[6346,6348,6353],{"type":46,"value":6347},"Isolate ",{"type":40,"tag":74,"props":6349,"children":6351},{"className":6350},[],[6352],{"type":46,"value":1550},{"type":46,"value":121},{"type":46,"value":6355}," A broken sibling connection breaks every command. Always ",{"type":40,"tag":74,"props":6357,"children":6359},{"className":6358},[],[6360],{"type":46,"value":2684},{"type":46,"value":2686},{"type":40,"tag":186,"props":6363,"children":6364},{},[6365,6370],{"type":40,"tag":66,"props":6366,"children":6367},{},[6368],{"type":46,"value":6369},"ADC > keyfiles",{"type":46,"value":6371}," for agent workflows. No secrets to rotate, no files to gitignore, and the agent runs as the human's identity.",{"type":40,"tag":186,"props":6373,"children":6374},{},[6375,6380,6382,6387],{"type":40,"tag":66,"props":6376,"children":6377},{},[6378],{"type":46,"value":6379},"Filter loader-internal tables before enhance",{"type":46,"value":6381}," — otherwise Claude burns time describing ",{"type":40,"tag":74,"props":6383,"children":6385},{"className":6384},[],[6386],{"type":46,"value":3459},{"type":46,"value":121},{"type":40,"tag":186,"props":6389,"children":6390},{},[6391,6409],{"type":40,"tag":66,"props":6392,"children":6393},{},[6394,6396,6401,6403,6408],{"type":46,"value":6395},"Always ",{"type":40,"tag":74,"props":6397,"children":6399},{"className":6398},[],[6400],{"type":46,"value":2579},{"type":46,"value":6402}," after ",{"type":40,"tag":74,"props":6404,"children":6406},{"className":6405},[],[6407],{"type":46,"value":3910},{"type":46,"value":121},{"type":46,"value":6410}," Cheap insurance against rare YAML corruption.",{"type":40,"tag":186,"props":6412,"children":6413},{},[6414,6426],{"type":40,"tag":66,"props":6415,"children":6416},{},[6417,6419,6424],{"type":46,"value":6418},"Re-run ",{"type":40,"tag":74,"props":6420,"children":6422},{"className":6421},[],[6423],{"type":46,"value":4767},{"type":46,"value":6425}," after schema changes.",{"type":46,"value":6427}," Descriptions are snapshot-time; a column rename without regeneration leaves the agent quietly wrong.",{"type":40,"tag":186,"props":6429,"children":6430},{},[6431,6435,6437,6442],{"type":40,"tag":66,"props":6432,"children":6433},{},[6434],{"type":46,"value":5130},{"type":46,"value":6436}," Improve them upstream in the dbt model's ",{"type":40,"tag":74,"props":6438,"children":6440},{"className":6439},[],[6441],{"type":46,"value":5138},{"type":46,"value":6443}," so the next import + enhance picks the change up.",{"type":40,"tag":41,"props":6445,"children":6447},{"id":6446},"adapting-this-to-a-different-dbt-project",[6448],{"type":46,"value":6449},"Adapting this to a different dbt project",{"type":40,"tag":49,"props":6451,"children":6452},{},[6453],{"type":46,"value":6454},"The minimal recipe for any existing dbt + warehouse setup:",{"type":40,"tag":3827,"props":6456,"children":6457},{},[6458,6467,6484,6493,6498,6507,6516],{"type":40,"tag":186,"props":6459,"children":6460},{},[6461],{"type":40,"tag":74,"props":6462,"children":6464},{"className":6463},[],[6465],{"type":46,"value":6466},"mkdir -p context/assets",{"type":40,"tag":186,"props":6468,"children":6469},{},[6470,6472,6477,6479],{"type":46,"value":6471},"Write ",{"type":40,"tag":74,"props":6473,"children":6475},{"className":6474},[],[6476],{"type":46,"value":1660},{"type":46,"value":6478}," (scoped) and ",{"type":40,"tag":74,"props":6480,"children":6482},{"className":6481},[],[6483],{"type":46,"value":1667},{"type":40,"tag":186,"props":6485,"children":6486},{},[6487],{"type":40,"tag":74,"props":6488,"children":6490},{"className":6489},[],[6491],{"type":46,"value":6492},"bruin import database --schemas \u003Cyours...> context",{"type":40,"tag":186,"props":6494,"children":6495},{},[6496],{"type":46,"value":6497},"Delete loader-internal asset YAMLs",{"type":40,"tag":186,"props":6499,"children":6500},{},[6501],{"type":40,"tag":74,"props":6502,"children":6504},{"className":6503},[],[6505],{"type":46,"value":6506},"bruin ai enhance --claude context/assets",{"type":40,"tag":186,"props":6508,"children":6509},{},[6510],{"type":40,"tag":74,"props":6511,"children":6513},{"className":6512},[],[6514],{"type":46,"value":6515},"bruin validate --config-file context/.bruin.yml context",{"type":40,"tag":186,"props":6517,"children":6518},{},[6519,6520,6525,6527,6532,6533],{"type":46,"value":5230},{"type":40,"tag":74,"props":6521,"children":6523},{"className":6522},[],[6524],{"type":46,"value":5236},{"type":46,"value":6526}," that points agents at ",{"type":40,"tag":74,"props":6528,"children":6530},{"className":6529},[],[6531],{"type":46,"value":1675},{"type":46,"value":5245},{"type":40,"tag":74,"props":6534,"children":6536},{"className":6535},[],[6537],{"type":46,"value":5251},{"type":40,"tag":49,"props":6539,"children":6540},{},[6541,6543,6548],{"type":46,"value":6542},"That's the whole context layer. Everything else (",{"type":40,"tag":74,"props":6544,"children":6546},{"className":6545},[],[6547],{"type":46,"value":4767},{"type":46,"value":6549},", parity scripts, the contoso reference) is ergonomics on top.",{"type":40,"tag":41,"props":6551,"children":6552},{"id":575},[6553],{"type":46,"value":578},{"type":40,"tag":49,"props":6555,"children":6556},{},[6557,6559,6564,6566,6571],{"type":46,"value":6558},"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":40,"tag":74,"props":6560,"children":6562},{"className":6561},[],[6563],{"type":46,"value":5251},{"type":46,"value":6565}," + ADC), and follows a canonical workflow (from ",{"type":40,"tag":74,"props":6567,"children":6569},{"className":6568},[],[6570],{"type":46,"value":5236},{"type":46,"value":6572},"). 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":40,"tag":592,"props":6574,"children":6575},{},[6576],{"type":46,"value":596},{"title":7,"searchDepth":430,"depth":430,"links":6578},[6579,6580,6581,6589,6590,6591],{"id":43,"depth":430,"text":47},{"id":56,"depth":430,"text":59},{"id":124,"depth":430,"text":127,"children":6582},[6583,6584,6586,6588],{"id":5328,"depth":499,"text":5331},{"id":5665,"depth":499,"text":6585},"2. Confirm bruin query works as the agent will use it",{"id":5823,"depth":499,"text":6587},"3. Add an AGENTS.md at the repo root",{"id":6245,"depth":499,"text":6248},{"id":6333,"depth":430,"text":6336},{"id":6446,"depth":430,"text":6449},{"id":575,"depth":430,"text":578},"content:tutorials:dbt-bruin-analyst:wire-up-agent.md","tutorials/dbt-bruin-analyst/wire-up-agent.md","tutorials/dbt-bruin-analyst/wire-up-agent",1777396703492]