<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Fumiaki Kobayashi on Medium]]></title>
        <description><![CDATA[Stories by Fumiaki Kobayashi on Medium]]></description>
        <link>https://medium.com/@fumiaki.kobayashi?source=rss-7b298c7cfdfc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*N6w4y4cKSosovWsWu0n2bQ.png</url>
            <title>Stories by Fumiaki Kobayashi on Medium</title>
            <link>https://medium.com/@fumiaki.kobayashi?source=rss-7b298c7cfdfc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 15:17:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fumiaki.kobayashi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[In the Age of AI, Humans Should Commit More to Internal Documentation]]></title>
            <link>https://blog.devgenius.io/in-the-age-of-ai-humans-should-commit-more-to-internal-documentation-d4018e3b4d75?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4018e3b4d75</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[skills]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[documentation]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 21:01:01 GMT</pubDate>
            <atom:updated>2026-07-06T21:01:01.740Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In all my years of working across various organizations, I have never encountered one with a truly well-maintained internal documentation library. Whether it’s decisions made verbally that never got written down, fragmented meeting notes that tell only half the story, or documents that exist but haven’t been updated in so long they no longer reflect reality — at least one of these always applies.</p><p>Asking a senior team member can sometimes solve the problem, but in the worst cases, you end up with only a legacy business process or system that nobody can explain or change. All the information current employees need was lost somewhere along the way.</p><p>I suspect many of you have experienced the frustration of thinking, “If only past decisions had been documented, this task would go so much smoother.” In this article, I want to explore what generative AI has made possible in the realm of documentation — what we can delegate to AI, and what humans still need to own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qCubktrKsWGPIFI-" /><figcaption>Photo by <a href="https://unsplash.com/@viktortalashuk?utm_source=medium&amp;utm_medium=referral">Viktor Talashuk</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why Internal Docs Never Get Done</h3><p>Everyone agrees that better internal documentation would be nice — so why does it keep falling to the bottom of the backlog?</p><p>Companies do invest meaningful resources in customer-facing documentation. Organizations with SaaS products often hire dedicated technical writers. The reason is straightforward: if external docs are incomplete or outdated, customer satisfaction suffers directly. The business case is obvious, so the resources follow.</p><p>Internal documentation lacks that same obvious urgency. And the practitioners themselves have their own reasons to ignore it:</p><ul><li>Writing documentation feels less directly valuable than writing code or building a product.</li><li>Documentation requires continuous upkeep after it’s created, and keeping it up-to-date is exhausting and often abandoned.</li><li>Small teams that started without documentation figured out a way to communicate just fine, and those habits stick.</li></ul><p>For all these reasons, achieving anything close to thorough internal documentation has historically been unrealistic unless your organization communicates entirely in async text. But the rise of generative AI is starting to change that situation dramatically.</p><p><strong>Note: Intended audience</strong></p><p>This article is written primarily for engineers and project managers inside product development organizations whose stakeholders are largely internal. Creating polished external or client-facing documentation is not their primary job.</p><p><strong>Note: Scope of “internal documentation”</strong></p><p>For this article, internal documentation includes:</p><ul><li>Meeting notes</li><li>Design documents and specifications</li><li>Onboarding materials such as READMEs</li><li>Decision-tracking documents like Architecture Decision Records (ADRs)</li><li>AI-specific documents (Agent Skills, CLAUDE.md files, etc.)</li><li>Operational runbooks and maintenance procedures</li></ul><h2>What AI Has Changed</h2><p>AI has introduced a kind of leverage that didn’t exist before. Even a team of one to three people can now work as if it had several times the headcount, by pairing with AI that draws on well-maintained documentation.</p><p>To make this concrete, imagine each person on your team has access to a dedicated support crew:</p><ul><li>A reasonably capable junior engineer who reads the docs and acts quickly on them</li><li>A senior engineer who reviews what you’ve written and flags gaps or excess</li><li>A technical writer who continuously handles document updates</li></ul><p>The catch is that this AI support crew isn’t sitting next to you. It can only communicate through text. Even if every human on your team is in the same office, the AI is always working remotely from somewhere else.</p><p>The COVID-era shift to full remote forced organizations to rethink how they communicate. AI is triggering a similar reckoning: how do we structure our communication so that AI can work alongside us effectively?</p><h3>The Right Time to Invest in Docs Has Moved Earlier</h3><p>The old rule of thumb was that small teams that don’t have external stakeholders could get away with minimal documentation — just enough to remind yourself six months later, like a personal time capsule. A README with the key commands or a comment on the code explaining why a particular function is required.</p><p>As teams grow, the need for documentation inevitably rises. Code ownership gets distributed, other teams start asking questions, and new members join regularly. That’s usually when organizations start seriously thinking about onboarding guides and process documentation.</p><p>But now that AI is actively participating in development, this inflection point has moved significantly earlier. The return on early documentation investment is higher than ever.</p><p>The core value of documentation has always been <em>leveraging asynchronous communication</em>. One person writes it; a hundred or a thousand people can reference it. That scaling effect is documentation’s greatest strength.</p><p>AI multiplies this effect dramatically. Now, in addition to those thousand human readers, potentially tens of thousands of AI agents access the same documentation and act on it.</p><p>The audience for your internal documents is no longer only human — and that is the defining shift that should reshape how we think about documentation strategy in the AI era.</p><h2>Connecting AI to Your Existing Tools Won’t Produce Miracles</h2><p>We should be aware that at this moment, AI cannot solve all the existing documentation problems by itself. The same lesson from the earlier data science buzz applies here: for AI to perform at its best, it needs well-organized, high-quality information.</p><h3>Access Alone Isn’t Enough</h3><p>AI integrations with collaboration tools are expanding. Slack, Notion, and similar platforms now offer AI that can search across them. But simply “connecting” AI to these tools won’t unlock its potential.</p><p>Collaboration tools accumulate enormous amounts of information that loses its value over time. Old meeting notes for features that no longer exist, unrelated chat threads, stale decisions — all of this inflates the token count when the AI tries to retrieve relevant context. The more noise in the environment, the harder it is for the AI to find what it needs, and the more expensive each query becomes.</p><p>If humans struggle to find information in a given environment, AI will struggle too. This is why it makes sense to maintain a dedicated documentation environment — a Git repository, for instance — that is separate from your live collaboration tools. The ideal is a place where only valuable, current documents live, organized for easy retrieval.</p><p>Collaboration tools are excellent for managing ongoing, high-velocity communication like project management and daily collaboration. But because they generate massive volumes of information every day, they are not well-suited as long-term archives for structured knowledge.</p><h3>The Importance of Cost Optimization</h3><p>Scrutiny over AI usage costs is intensifying. Model vendors are moving toward consumption-based pricing, and the era of unlimited access to top-tier models is ending. Even large companies like Uber have made headlines for AI spending that blew through its budget ahead of schedule:</p><ul><li><a href="https://techcrunch.com/2026/06/02/uber-caps-employee-ai-spending-after-blowing-through-budget-in-four-months/">Uber caps employee AI spending after blowing through budget in 4 months | TechCrunch</a></li><li><a href="https://fortune.com/2026/05/26/uber-coo-ai-spending-tokens-claude-code/">Uber burned through its entire 2026 AI budget in four months. Now its COO is questioning whether it&#39;s worth it | Fortune</a></li></ul><p>Under pay-per-token pricing, the cost-performance ratio of every AI operation matters. Designs that always use the highest-tier models and consume the most tokens will quickly become unsustainable once the current AI hype cycle normalizes.</p><p>Because you will be required to get the most out of a fixed AI budget quite soon, you need to enable AI to find relevant information with cheaper models using fewer tokens by optimizing the documentation environment itself for AI consumption.</p><h2>What Humans Need to Do to Make Documentation Work for AI</h2><p>So what does it actually look like for humans to set up an environment where AI can make effective use of documentation?</p><h3>Apply the Pre-AI Best Practices</h3><p>Many of the documentation best practices that predate generative AI are still valuable for AI-assisted workflows.</p><p><em>Software Engineering at Google</em> recommends keeping important documentation under the same source control used to manage code:</p><blockquote>The way to improve the situation was to move important documentation under the same sort of source control that was being used to track code changes. Documents began to have their own owners, canonical locations within the source tree, and processes for identifying bugs and fixing them; the documentation began to dramatically improve. Additionally, the way documentation was written and maintained began to look the same as how code was written and maintained. Errors in the documents could be reported within our bug tracking software. Changes to the documents could be handled using the existing code review process. Eventually, engineers began to fix the documents themselves or send changes to technical writers (who were often the owners).</blockquote><p><a href="https://abseil.io/resources/swe-book/html/ch10.html#documentation_is_like_code">Software Engineering at Google</a></p><p>The implication is clear: documentation isn’t supplementary material — it deserves the same quality management as code.</p><p>GitLab, famous for being a fully remote company with no offices, publishes much of its internal documentation publicly on the web. The depth and quality of its handbook are genuinely one of the best in the industry:</p><p><a href="https://handbook.gitlab.com/">The GitLab Handbook</a></p><p>Reaching that level of completeness isn’t realistic for most teams, but it represents one vision of what well-managed documentation can look like.</p><h3>Watch Out for AI Slop</h3><p>AI slop refers to the low-quality, redundant content that AI generates at scale. Now that AI can assist with writing documentation, there is a real risk that unreviewed AI output gets merged in — containing inaccuracies, or just being uselessly long.</p><p>GitLab addresses this explicitly in its communication guidelines, which permit AI as a support tool while setting clear guardrails against slop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEe7AXX4QODXXSN_msGwmA.png" /><figcaption>Communicaating When Using Generative AI Tools</figcaption></figure><p><a href="https://handbook.gitlab.com/handbook/communication/#communicating-when-using-generative-ai-tools">GitLab Communication</a></p><p>When AI is writing your docs, it is tempting to annotate a piece of content with “AI says this” and move on without verifying the content. But as the guidelines make clear, the ultimate responsibility for accuracy rests with the human. Incorrect information in documentation propagates. Validating content is — and will increasingly be — a distinctly human responsibility.</p><h3>Turning Tacit Knowledge into Explicit, AI-Readable Knowledge</h3><p>Helping AI understand the tacit knowledge held by senior team members is one of the most impactful documentation investments your team can make. Some concrete approaches:</p><p><strong>Agent Skills for knowledge encoding</strong></p><p>Development conventions, debugging procedures, and other accumulated know-how that lives in people’s heads can be encoded into Agent Skills — documents that AI agents pull in on demand, rather than loading all at once. Skills can be distributed from a central organization-wide repository to individual project repositories, enabling consistent knowledge reuse across teams.</p><p><a href="https://docs.github.com/en/copilot/concepts/agents/about-agent-skills">About agent skills - GitHub Docs</a></p><p><strong>ADRs, design documents, and specifications</strong></p><p>Tooling like OpenSpec allows the decisions and changes that emerge during a product development cycle to be systematically documented alongside code.</p><p><a href="https://github.com/Fission-AI/OpenSpec/">GitHub - Fission-AI/OpenSpec: Spec-driven development (SDD) for AI coding assistants.</a></p><p>However, full specification-driven development requires documenting every significant change, which can be burdensome for smaller applications. Starting with just the initial system design and key ADRs may be more sustainable. The priority is keeping documentation current and accurate — finding the right balance between operational overhead and documentation richness is more important than any particular format.</p><p><strong>CI/CD as guardrails</strong></p><p>AI behaves probabilistically — the same input doesn’t always produce the same output. And even if ADRs live in the same repository, there’s no guarantee that AI or humans will notice when a change conflicts with an existing decision.</p><p>For the decisions that most need to be respected, the most reliable enforcement mechanism is automating them as code. Policy as Code tools like <a href="https://www.hashicorp.com/en/sentinel">Sentinel</a> and <a href="https://www.openpolicyagent.org/">Open Policy Agent</a> let you encode rules — always make storage private, restrict expensive instance types — that were previously enforced only by human review. With these in place, violations surface as clear errors before anything reaches production.</p><h2>Conclusion</h2><p>Generative AI has fundamentally changed the landscape around internal documentation. The cost of creating documentation has fallen sharply, and the pool of “readers” — including AI agents — has grown dramatically. Documentation has become a more powerful lever for accelerating software development productivity than ever before.</p><p>But this change has a flip side. Organizations that have not invested in managing their documentation will find that AI-powered automation does not work as efficiently as expected. In other words, the quality of your documentation is increasingly synonymous with your organization’s productivity in the AI era.</p><p>There is an interesting workplace dynamic at play here as well. The return-to-office debate has often centered on the value of spontaneous in-person communication and mentoring junior colleagues. Meanwhile, practitioners may find that having a well-informed AI agent at their side is more productive than ad hoc desk conversations. Organizations that rely heavily on synchronous, in-person knowledge-sharing naturally deprioritize documentation — and as a result, are less positioned to benefit from AI agents. Hybrid and fully remote organizations, which have already built async-first communication cultures, tend to be better aligned with the way AI works.</p><p>Documentation work has always been unglamorous. Nobody thanks you for keeping it up to date, and nobody writes a viral post about the breakthrough they achieved by maintaining their ADR library. But it is an indispensable foundation for keeping AI costs manageable and driving sustained productivity gains over the long term. Precisely because we are in the AI era, humans need to take documentation more seriously than ever.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4018e3b4d75" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/in-the-age-of-ai-humans-should-commit-more-to-internal-documentation-d4018e3b4d75">In the Age of AI, Humans Should Commit More to Internal Documentation</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating to Zensical, the Successor to MkDocs]]></title>
            <link>https://medium.com/@fumiaki.kobayashi/migrating-to-zensical-the-successor-to-mkdocs-864df7b17819?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/864df7b17819</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[mkdocs]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 05:32:25 GMT</pubDate>
            <atom:updated>2026-04-15T05:32:25.885Z</atom:updated>
            <content:encoded><![CDATA[<h2>What Is MkDocs?</h2><p>MkDocs is a Python-based static site generator that builds documentation sites from Markdown files. Thanks to its simplicity and ease of use, it has been widely adopted for documentation across a broad range of projects.</p><p>Most engineers have encountered it at some point — the documentation for <a href="https://docs.astral.sh/uv/">uv</a>, for example, is built with MkDocs.</p><p>Markdown-based static site generators are plentiful — <a href="https://docusaurus.io/">Docusaurus</a> being one well-known example — but MkDocs stood out for its accessibility to people without a frontend background. Installing it through Python’s ecosystem also made it a natural fit for cloud practitioners and data teams.</p><p>In those teams, many contributors have little or no experience with frontend technologies like React, and even setting up a Node.js environment can become a barrier. When non-engineers such as product managers also need to contribute to documentation, reducing the technical overhead matters considerably — and MkDocs addressed that need well.</p><p>When combined with <a href="https://squidfunk.github.io/mkdocs-material/">Material for MkDocs</a>, a widely used extension library, the result was a clean and polished documentation site achievable with minimal effort — both functionally and visually. This made it a strong option for internal wikis and OSS documentation sites where a solid user experience was needed without significant investment in custom UI work.</p><h2>The Fall of MkDocs and the Rise of Zensical</h2><p>Despite that balance of simplicity and functionality, running the latest version of the library now shows a serious warning:</p><pre> │  ⚠  Warning from the Material for MkDocs team<br> │<br> │  MkDocs 2.0, the underlying framework of Material for MkDocs,<br> │  will introduce backward-incompatible changes, including:<br> │<br> │  × All plugins will stop working – the plugin system has been removed<br> │  × All theme overrides will break – the theming system has been rewritten<br> │  × No migration path exists – existing projects cannot be upgraded<br> │  × Closed contribution model – community members can&#39;t report bugs<br> │  × Currently unlicensed – unsuitable for production use<br> │<br> │  Our full analysis:<br> │<br> │  https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/</pre><p>The wording may seem puzzling at first. This message is actually published by the Material for MkDocs team — not by the MkDocs core project. To clarify: despite their close relationship, MkDocs and Material for MkDocs are two separate projects maintained by different people.</p><p>In other words, MkDocs core and its most popular extension are now in direct conflict. The full story is covered in <a href="https://fpgmaas.com/blog/collapse-of-mkdocs/">this blog post</a>, but to summarize:</p><ul><li>The MkDocs core maintainer community effectively collapsed following internal disputes.</li><li>A group of maintainers began independently developing MkDocs 2.0. However, the changes were too extreme — including removing compatibility with Material for MkDocs — and the effort stalled after receiving strong criticism.</li><li>The creator of Material for MkDocs decided to build an entirely new tool, <a href="https://zensical.org/"><strong>Zensical</strong></a>, which would also cover the functionality of MkDocs core.</li></ul><p>There was also a deeper structural issue: MkDocs core depended heavily on volunteer contributors working in their spare time, while Material for MkDocs had built a successful sponsorship model and was on considerably stronger financial footing. The result is that MkDocs core went quiet after 2024, and Material for MkDocs has since entered maintenance mode — limited to security patches for a fixed period. For all practical purposes, MkDocs as an OSS project is over.</p><h2>A New Architecture and a Performance Boost</h2><p>With that backdrop in mind, Zensical brings meaningful improvements built on a more modern architecture.</p><p>As discussed in the video below, the key advantages include:</p><ul><li>Freedom from MkDocs core’s slow release cycle, enabling a much more agile development process</li><li>Being rewritten in Rust from scratch, eliminating years of accumulated technical debt and enabling features like fast incremental reloading</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FV1BvvIPUzes%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DV1BvvIPUzes&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FV1BvvIPUzes%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/786b4e0e679ca14e004e36a18c710a14/href">https://medium.com/media/786b4e0e679ca14e004e36a18c710a14/href</a></iframe><p>Zensical’s ambition goes beyond compatibility — it aims to be a more capable static site generator in its own right. The community has received it as the legitimate successor to MkDocs, and its GitHub star growth reflects that recognition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JVOOUSIg6FKZZ430Tv3W4g.png" /></figure><h2>Migrating from an Existing MkDocs Project</h2><p>Zensical is still in alpha, but for minimal setups, migration is already possible and straightforward.</p><p>Taking a minimal project as an example, here are the required changes:</p><pre>[project]<br>name = &quot;mkdocs-example&quot;<br>version = &quot;0.1.0&quot;<br>description = &quot;Add your description here&quot;<br>readme = &quot;README.md&quot;<br>requires-python = &quot;&gt;=3.12&quot;<br>dependencies = [<br>    &quot;mkdocs&gt;=1.6.1&quot;,<br>    &quot;mkdocs-material&gt;=9.7.6&quot;,<br>]</pre><p>The migration itself is simple: replace mkdocs and mkdocs-material with zensical.</p><pre>[project]<br>name = &quot;mkdocs-example&quot;<br>version = &quot;0.1.0&quot;<br>description = &quot;Add your description here&quot;<br>readme = &quot;README.md&quot;<br>requires-python = &quot;&gt;=3.12&quot;<br>dependencies = [<br>-    &quot;mkdocs&gt;=1.6.1&quot;,<br>-    &quot;mkdocs-material&gt;=9.7.6&quot;,<br>+    &quot;zensical&gt;=0.0.32&quot;<br>]</pre><p>If you call mkdocs in a Makefile or GitHub Actions workflow, replace it with zensical:</p><ul><li>mkdocs serve → zensical serve</li><li>mkdocs build → zensical build</li></ul><p>Zensical’s native configuration file is called zensical.toml, which has a different format from mkdocs.yaml. However, at this stage, you can still use your existing MkDocs configuration file without changes. According to the Zensical team, a migration tool is planned, so you do not need to convert your configuration right away:</p><blockquote>At this point in time (January 2026) we do not recommend switching to zensical.toml for existing MkDocs projects. The zensical.toml configuration mirrors the mkdocs.yml format, except that everything is moved into the project scope. Once we change anything in the configuration format, we will prompt you and offer tooling to convert.</blockquote><p><a href="https://zensical.org/docs/community/faqs/?h=material#should-i-convert-my-mkdocsyml-to-zensicaltoml">Zensical</a></p><h3>What Does It Look Like?</h3><p>Below is the familiar UI from MkDocs + Material for MkDocs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaMPIQxEmkX8V4Dm4KMxuQ.jpeg" /><figcaption>ya</figcaption></figure><p>And here is Zensical running locally after migration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QODnNVDeNJBG_t2rz3AF4w.jpeg" /></figure><p>The default UI feels noticeably more modern. Customization is certainly possible, but the defaults are more than sufficient for internal documentation or an OSS site.</p><p>For those who want to adjust the appearance, CSS can be added in docs/stylesheets/extra.css. Personally, I only reduced the horizontal padding to ensure wide tables display without horizontal scrolling:</p><pre>.md-grid {<br>  max-width: initial;<br>}</pre><pre>extra_css:<br>  - stylesheets/extra.css</pre><p>To preserve the original Material for MkDocs appearance after migration, set the theme variant in mkdocs.yaml:</p><pre>site_name: My Docs</pre><pre>theme:<br>  variant: classic</pre><h2>Conclusion</h2><p>The decline of MkDocs serves as a reminder of how difficult it is to sustain open source projects over the long term. That said, Material for MkDocs had already built substantial sponsorship support, so seeing it evolve into Zensical — under a more financially stable team — is genuinely encouraging.</p><p>There is a broader trend worth considering here as well. As AI becomes more central to how teams operate, documentation systems are receiving renewed attention — particularly around how to give AI models reliable access to project-specific context and conventions. Markdown-based documentation sites are well-positioned to address that need.</p><p>Documentation can reside in many places, but most organizations encounter the same challenges:</p><ul><li>Important content is stored somewhere AI tools cannot easily access or edit.</li><li>Outdated and current documentation coexist without a clear distinction, making it difficult for both humans and AI to determine what is accurate.</li></ul><p>As AI takes on more responsibility for information synthesis, system design, and content generation, these problems become increasingly consequential. When even humans struggle to locate accurate, current information, the challenge for AI is compounded further.</p><p>One approach that seems increasingly practical: keep flow-oriented content — task logs, meeting notes, status updates — in project management tools like Notion, where it naturally lives, while maintaining durable, reference-quality documentation in a static site generator like Zensical, where it can be properly versioned and reliably accessed. As AI becomes more deeply embedded in daily workflows, this kind of separation may well become the standard approach to knowledge management.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=864df7b17819" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Multiple dbt Projects Cleanly with Cross-Project References]]></title>
            <link>https://blog.devgenius.io/managing-multiple-dbt-projects-cleanly-with-cross-project-references-b8a45c300176?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8a45c300176</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[dbt]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Sat, 21 Mar 2026 21:26:00 GMT</pubDate>
            <atom:updated>2026-03-21T21:26:00.629Z</atom:updated>
            <content:encoded><![CDATA[<h2>Introduction</h2><p>As any system grows large enough, new pain points emerge that were unimaginable when it was small.</p><p>dbt is no exception. What started as a single, compact dbt project can balloon in size until running a command takes long enough to grab a coffee and come back. Meanwhile, neighboring teams start adopting dbt, and repository sprawl begins. As dependencies grow more complex, it becomes unclear who to contact when an incident occurs, making triage increasingly difficult.</p><p>When a large system reaches its operational limits, the solution is to break it into appropriately sized modules and manage the dependencies between them. dbt offers exactly this kind of solution through what is known as the <strong>dbt Mesh</strong> architecture.</p><h3>What Are dbt Mesh and Data Mesh?</h3><p>dbt Mesh is designed around a concept called <a href="https://www.datamesh-architecture.com/">Data Mesh</a>.</p><p>Data Mesh is a decentralized data architecture and organizational philosophy that moves away from the traditional centralized model — where a single, large data team manages all data pipelines — toward a model where individual business domain teams autonomously own and serve their data. In this paradigm, data is treated not as a byproduct but as a <strong>data product</strong>, with domain teams responsible for owning and exposing it in a consumable form for others.</p><p>As compelling as this concept is, putting it into practice hits a technical wall: “Once you split projects, how do you manage dependencies across them and guarantee quality?”</p><p><a href="https://docs.getdbt.com/docs/mesh/about-mesh">dbt Mesh</a> is the solution for realizing Data Mesh within the dbt ecosystem and overcoming that technical barrier. By leveraging dbt Mesh features, you can split a single massive dbt project into multiple projects organized by layer or domain, while still maintaining a unified, cross-project data lineage. This enables each team to deploy and develop independently at speed, while preserving data reliability and governance across the organization.</p><p>Both Data Mesh and dbt Mesh are broad collections of concepts and capabilities. This article focuses specifically on <a href="https://docs.getdbt.com/docs/mesh/govern/project-dependencies">Cross-project references</a> — the feature that lets you connect multiple dbt projects with ref.</p><h2>How to Configure Cross-Project References</h2><p>Setting up cross-project model exposure and reference requires configuration in both the upstream and downstream dbt projects.</p><p>In the <strong>downstream</strong> project (the one doing the referencing), you pass two arguments to the ref function: the first is the project name, and the second is the model name. This lets you reference a model from a different project:</p><pre>with monthly_revenue as (<br>    select * from {{ ref(&#39;jaffle_finance&#39;, &#39;monthly_revenue&#39;) }}<br>),<br>...</pre><p>In the <strong>upstream</strong> project (the one being referenced), you need to set the model’s access level to public:</p><pre>version: 2<br><br>models:<br>  - name: monthly_revenue<br>    config:<br>      access: public<br>    ...models:<br>  - name: monthly_revenue<br>    config:<br>      access: public<br>    ...</pre><p>With these two settings in place, the downstream project can reference upstream models using metadata stored in a file called manifest.json. There are also a few solution-specific configurations required, but those are beyond the scope of this article.</p><p>That said, “referencing external data” sounds like something other features could handle as well. In the next sections, I’ll walk through how cross-project references differ from source and package.</p><h2>Differences from source</h2><p>dbt already provides a resource called source for referencing data created outside of your dbt project.</p><p><a href="https://docs.getdbt.com/docs/build/sources">Add sources to your DAG | dbt Developer Hub</a></p><p>For smaller setups, sources alone are sufficient. But as your dbt ecosystem grows, it becomes common for downstream dbt projects to consume data produced by upstream dbt projects — creating inter-project dependencies.</p><p>If each project defines its own sources independently, <strong>lineage breaks at the project boundary</strong>, making it hard to track dependencies using dbt’s native features alone. Cross-project references, on the other hand, preserve lineage across project boundaries, giving you full visibility into how data flows end-to-end.</p><p>Anyone who has built data pipelines has probably experienced the heart-stopping moment when an unexpected team sends a message saying: “A query referencing a table your team manages is throwing an error.” Cross-project references can help eliminate that kind of surprise.</p><p>Beyond lineage, you can use the deprecation_date property to notify data consumers that they need to migrate away from a deprecated model — facilitating communication about data changes directly through dbt&#39;s native features.</p><p>As your project grows in scale, the ability to understand the blast radius of changes and formally communicate migration needs — all through native tooling — becomes extremely valuable.</p><h2>Differences from package</h2><p>Another way to access models from a different dbt project is to install it as a package within your own project.</p><p><a href="https://docs.getdbt.com/docs/build/packages">Packages | dbt Developer Hub</a></p><p>However, installing a package pulls the source code directly into your project, which runs counter to the goal of splitting projects in the first place.</p><p>Moreover, if you install a large project (or multiple projects) as a package just to reference a handful of models, you end up further bloating your own dbt project.</p><p>There are also governance concerns: teammates could accidentally build models from an installed package that belong to another team, making packages an ill-suited mechanism for inter-team data sharing.</p><h2>Implementing Cross-Project References</h2><p>Now that we’ve seen how cross-project references compare to other approaches, let’s look at how to actually implement them.</p><p>Currently, dbt-core provides the interface but cannot be used standalone. Implementation comes down to two paths:</p><ul><li>Combine the third-party tool <strong>dbt-loom</strong> with dbt-core</li><li>Use dbt Mesh as part of the <strong>dbt Cloud Enterprise</strong> plan or higher</li></ul><h2>dbt-loom</h2><p><a href="https://github.com/nicholasyager/dbt-loom">dbt-loom</a> achieves cross-project references by injecting the manifest.json generated by an upstream project — stored locally or in cloud environments — into the metadata of the downstream project.</p><p>Internally, it leverages dbt-core’s dbtPlugin extension class, designed to run within the same lifecycle as dbt commands. As a result, when you execute a dbt command, dbt-loom&#39;s processing runs alongside dbt&#39;s normal behavior:</p><pre>$ dbt parse<br>08:32:01  Running with dbt=1.10.18<br>08:32:02  Initializing dbt-loom=0.9.4<br>08:32:02  dbt-loom: Patching ref protection methods to support dbt-loom dependencies.<br>08:32:02  dbt-loom: Loading manifest for `potato` from `file`<br>08:32:02  Registered adapter: duckdb=1.9.4<br>08:32:02  Unable to do partial parsing because saved manifest not found. Starting full parse.<br>08:32:03  dbt-loom: Injecting nodes</pre><p>Because dbt-loom is tightly coupled to dbt-core, it comes with constraints. It cannot be used with dbt Fusion, which distributes binaries with only partial source code exposed. Similarly, the official dbt VS Code extension — which assumes dbt Fusion — cannot process it correctly and throws errors.</p><p><a href="https://github.com/nicholasyager/dbt-loom/issues/129">dbt fusion engine · Issue #129 · nicholasyager/dbt-loom</a></p><p>On the other hand, the third-party VS Code extension <strong>dbt-power-user</strong> officially supports dbt-loom.</p><p><a href="https://docs.myaltimate.com/govern/multiproject/">Multi-project Support with dbt-loom - dbt Power User</a></p><p>In practice, a key operational consideration is where and how you store the upstream project’s manifest.json. A common pattern is to use GitHub Actions (or a similar CI/CD tool) to upload the generated manifest.json to object storage like S3 or GCS on merge, and then have the downstream project reference it from there.</p><p>One small but notable detail: originally dbt-loom was designed to inject only public models, but around version 0.5.0 this behavior changed to inject all models.</p><p><a href="https://github.com/nicholasyager/dbt-loom/issues/40">Enable errors for Private and Protected nodes · Issue #40 · nicholasyager/dbt-loom</a></p><p>As a result, protected and private upstream models now also appear in lineage. In the image below, only orders_v2 is exposed as a public model by the upstream project, yet the staging layer models beneath it are also visible from the downstream project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*25WcIzjU5gN1SnQmFcjooA.jpeg" /><figcaption><em>Lineage generated by dbt-power-user</em></figcaption></figure><p>Of course, lineage visibility is one thing — actually accessing a non-public model from a downstream project will still result in an error.</p><h2>Cross-Project References in dbt Platform</h2><p>The other option is to use dbt Mesh as part of dbt Platform’s Enterprise plan or higher.</p><p>The internal logic is not publicly documented, but based on what’s required on the user side, it appears to work similarly to dbt-loom: passing metadata derived from the upstream project’s manifest.json to the downstream project.</p><p>In this case, only the referenced public models appear in the downstream project’s lineage — the internal logic of the upstream project remains hidden. This makes it feel closer to the microservice or API model in software development, where inter-project dependencies are managed at the interface level. It’s designed to accommodate scenarios where you don’t want to expose internal logic, offering higher levels of security and governance.</p><p>Additionally, the data catalog in dbt Platform shows which downstream projects are referencing a given model, making it possible to understand usage patterns without needing to configure exposures manually.</p><h3>Environment Configuration</h3><p>While dbt-loom requires you to point directly at a manifest.json file, dbt Platform introduces the concept of <strong>environments</strong> to control which environment&#39;s metadata the downstream project references. There are four environment types: production, staging, development, and general.</p><p><a href="https://docs.getdbt.com/docs/dbt-cloud-environments">dbt environments | dbt Developer Hub</a></p><p>One potentially confusing point: “environment” here refers to how dbt Platform categorizes the metadata generated in that context — it has nothing to do with the DWH environment controlled by target. For example, even if you deploy to a development DWH using a production environment on dbt Platform, that deployment is still treated as production environment metadata.</p><p>dbt Platform uses the environment setting to control which upstream environment’s metadata the downstream project references.</p><p>The straightforward case: a downstream production environment references the upstream project’s production environment.</p><p>Where things get nuanced: if the upstream project has <strong>no staging environment defined</strong>, downstream development environments will also reference the upstream project’s production environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0cVVFfZ4LyTgQ-tXisHLw.png" /><figcaption><em>Behavior when no staging environment is defined</em></figcaption></figure><p>If the upstream project <strong>does</strong> have a staging environment defined, non-production downstream environments reference the upstream’s staging environment. If no staging environment exists, they fall back to production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Qz6Jm9mSHp11RP3HvjNUg.png" /><figcaption><em>Behavior when a staging environment is defined</em></figcaption></figure><ul><li><a href="https://docs.getdbt.com/docs/mesh/govern/project-dependencies#safeguarding-production-data-with-staging-environments">Project dependencies | dbt Developer Hub</a></li><li><a href="https://docs.getdbt.com/docs/deploy/deploy-environments">Deployment environments | dbt Developer Hub</a></li></ul><p>Whether to adopt a staging environment comes down to a few considerations:</p><ul><li>Do you already use a staging branch in your Git branching strategy, following a development → staging → production release flow?</li><li>Do business requirements make it risky to deploy frequently to production — e.g., because production incidents directly affect customers?</li></ul><p>If neither applies, maintaining a staging environment adds operational overhead without much benefit: you’d need to keep the staging environment in sync with production and ensure the tables the downstream project needs are available there. In that case, using a general environment type prevents it from being treated as a staging environment.</p><h2>How to Split dbt Projects</h2><p>There is considerable flexibility in how to split a large dbt project. dbt’s own documentation covers two main approaches: splitting <strong>vertically</strong> (by data transformation layer) and <strong>horizontally</strong> (by data source domain).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oXPSJNk1aFIh7BlB.png" /><figcaption><em>Source: </em><a href="https://docs.getdbt.com/best-practices/how-we-mesh/mesh-3-structures"><em>https://docs.getdbt.com/best-practices/how-we-mesh/mesh-3-structures</em></a></figcaption></figure><p>One important caveat when splitting across projects: a single dbt command can no longer span the entire pipeline. For example, running dbt build --select +foo in a downstream project will not build upstream models due to governance boundaries — you must run the build command in each project separately.</p><p>Cross-project command dependencies must be managed externally through something like dbt Platform or an orchestration tool. To avoid introducing unnecessary complexity, it’s worth mapping out your existing build and run command execution scopes before deciding on separation boundaries.</p><p>As a rough guideline based on personal experience, dbt-core tends to feel noticeably slow on parse operations once model counts exceed around 5,000. That’s a reasonable point to start evaluating whether a project split makes sense.</p><h2>Tip: Validating Data in the Staging Layer with Cross-Project References</h2><p>When introducing cross-project references, you’ll replace source definitions with ref — but this means losing access to <strong>source freshness</strong>, a feature that was previously available at the source level.</p><p>With source definitions, you could run source freshness checks before building dbt models, validating the upstream data early in the pipeline. Removing sources eliminates this “pre-build validation” step.</p><p>A practical workaround is to <strong>create</strong> <strong>ephemeral models</strong> <strong>in the staging layer</strong> and use tests like dbt_utils.recency as a source freshness substitute, along with any other data quality checks relevant to the downstream project&#39;s perspective.</p><p>You might assume that since the upstream project is also a dbt project, it already validates data quality before deploying. That’s fair — but model creation can still fail mid-run, and corrupt data can slip in through untested paths. There will also naturally be test cases specific to the downstream project’s perspective that you’ll want to define independently.</p><p>For all these reasons, running data quality tests against upstream data in your own staging layer remains valuable even after adopting cross-project references.</p><p>Using ephemeral models in the staging layer avoids creating unnecessary tables in the DWH while still enabling downstream tests:</p><pre>{{ config(materialized=&#39;ephemeral&#39;) }}<br><br>select * from {{ ref(&quot;upstream_project&quot;, &quot;upstream_model&quot;) }}</pre><pre>version: 2<br><br>models:<br>  - name: stg__upstream_project__upstream_model<br>    data_tests:<br>      - dbt_utils.recency:<br>          arguments:<br>            datepart: day<br>            field: created_at<br>            interval: 1</pre><h2>Conclusion</h2><p>In large-scale data infrastructure, the real value comes not just from running individual dbt projects in isolation, but from connecting them with each other and with the broader ecosystem around them.</p><p>It’s worth noting that this topic is squarely aimed at heavy dbt users — not every team needs to adopt these patterns right away. For early-stage or smaller deployments, running independent projects works perfectly fine.</p><p>The right time to consider a dbt Mesh architecture is when collaboration across teams becomes more frequent, or when your dbt project is showing signs of further growth. Refactoring for the split isn’t a ground-up rewrite either, so the implementation effort is manageable.</p><p>For implementation: if you’re a dbt-core user, dbt-loom is the go-to option; if you’re on dbt Platform, the native dbt Mesh features are the natural fit. If anything, dbt Platform’s approach feels more enterprise-oriented — with heavier emphasis on governance and security controls.</p><p>When the growing pains of a maturing dbt project start to surface, I hope this article helps you take your data platform to the next stage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8a45c300176" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/managing-multiple-dbt-projects-cleanly-with-cross-project-references-b8a45c300176">Managing Multiple dbt Projects Cleanly with Cross-Project References</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Combining dbt Platform (dbt Cloud) with Orchestration Tools]]></title>
            <link>https://medium.com/towards-data-engineering/combining-dbt-platform-dbt-cloud-with-orchestration-tools-d96d49fae6be?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d96d49fae6be</guid>
            <category><![CDATA[orchestration]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[analytics-engineering]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Sun, 11 Jan 2026 09:16:06 GMT</pubDate>
            <atom:updated>2026-01-11T09:16:06.827Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In analytics engineering teams, the primary work typically revolves around data modeling and analytical support tasks, such as creating dbt models. However, needs occasionally arise for tasks like:</p><ul><li>Syncing data to production databases like Cloud SQL.</li><li>Feeding data to machine learning models for predictions, then aggregating those predictions with other data.</li></ul><p>These scenarios require <strong>executing processes that go beyond what can be written solely in SQL</strong>.</p><p>While it’s possible to build and execute dedicated ETL batch jobs using services like Cloud Run Jobs, not all analytics engineers have a software engineering background. Introducing new tools like Docker and maintaining custom ETL jobs can be challenging if it doesn’t align with the team’s current skill set.</p><p>Therefore, it is ideal to combine existing tools the team is already familiar with, achieving the goal with minimal maintenance overhead.</p><p>In this article, I’ll explain how to use dbt Platform in combination with orchestration tools, assuming the following team structure and collaboration between teams.</p><p><strong>Analytics Engineering Team</strong></p><ul><li>Primarily uses dbt Platform</li></ul><p><strong>Data Engineering Team</strong></p><ul><li>Primarily uses orchestration tools such as Airflow, Prefect, or Dagster, operating various ETL batch processes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObgnQsgCS7Rl8mzqhpgqSA.jpeg" /><figcaption><em>Image of collaboration by Gemini</em></figcaption></figure><h3>Constraints of dbt Platform</h3><p>As you know, <a href="https://www.getdbt.com/product/dbt">dbt Platform (dbt Cloud)</a> provides numerous advanced features for building data transformation processes as a managed service for dbt.</p><p>On dbt Platform, you can execute multiple dbt commands together in a resource called a job. However, dbt is a tool specialized in data transformation, and its capabilities beyond that are somewhat limited.</p><p>For example, while jobs can be linked together to create simple dependencies, you cannot do things that orchestration tools excel at, such as “executing a job while changing date variables in a loop.”</p><p>For use cases that cannot be handled by dbt or dbt Platform alone, the dbt side also introduces <a href="https://docs.getdbt.com/docs/deploy/deployment-tools">methods of combining with orchestration tools</a> in their official documentation.</p><h3>Executing dbt Platform Jobs from Orchestration Tools</h3><p>Many orchestration tools provide Operators or Tasks that support both dbt Core and dbt Platform.</p><p>Assuming the analytics engineering team uses the dbt Platform, we’ll adopt the approach of triggering dbt Platform jobs from the orchestration tool via its API.</p><p>By leveraging the dbt Platform, all dbt execution details are defined within the platform itself. This allows for a cleaner implementation that keeps dbt code out of the orchestration tool’s codebase.</p><p>I’ll use <a href="https://airflow.apache.org/">Airflow</a>, one of the most widely used orchestration tools, as an example. For Airflow, you need to install the apache-airflow-providers-dbt-cloud package.</p><p>By the way, if you’re using Google Cloud’s Cloud Composer, this package is already installed by default, so no additional installation work is required.</p><p><a href="https://docs.cloud.google.com/composer/docs/composer-versions">Cloud Composer version list | Google Cloud Documentation</a></p><h4>Connection Settings Between Airflow and dbt Platform</h4><p>As an initial setup, configure the connection settings with dbt Platform on the Airflow side.</p><p>To use the dbt Platform API, you need to issue authentication credentials called a Service Token.</p><p><a href="https://docs.getdbt.com/docs/dbt-cloud-apis/service-tokens">Service account tokens | dbt Developer Hub</a></p><p>Since we’re only using it to trigger Jobs, having Job Runner or Job Admin permissions should be sufficient.</p><p><a href="https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/stable/connections.html">Connecting to dbt Cloud - apache-airflow-providers-dbt-cloud Documentation</a></p><p>In addition to authentication credentials, you’ll also need configuration values such as Host URL and Account ID.</p><p>Register all of these in Airflow’s connection settings via the Web UI or other means as a Connection ID named dbt_cloud_default.</p><h4>Airflow DAG Implementation Example</h4><p>Now that the connection settings are complete, let’s build the actual pipeline. For this example, I’ll construct a pipeline that includes machine learning prediction processing with the following three steps:</p><ul><li>Execute a job on dbt Platform to create the data needed for the machine learning prediction batch</li><li>Execute a Vertex AI Batch Prediction job</li><li>Execute another job on dbt Platform to perform additional aggregation along with the prediction results</li></ul><p>Note that the following code is a minimal implementation. In actual code, it’s advisable to add modularization and other processing in preparation for cases where multiple pipelines are defined.</p><pre>from datetime import datetime<br>from airflow import DAG<br>from airflow.providers.dbt.cloud.operators.dbt import DbtCloudRunJobOperator<br>from airflow.providers.google.cloud.operators.vertex_ai.batch_prediction_job import CreateBatchPredictionJobOperator<br><br># Configuration values<br>DBT_CLOUD_CONN_ID = &quot;dbt_cloud_default&quot;<br>GCP_PROJECT_ID = &quot;your-gcp-project-id&quot;<br>GCP_LOCATION = &quot;us-central1&quot;<br>VERTEX_MODEL_NAME = &quot;projects/your-gcp-project-id/locations/us-central1/models/your-model-id&quot;<br># dbt Job IDs<br>DBT_JOB_ID_PREPROCESS = 12345<br>DBT_JOB_ID_POSTPROCESS = 67890<br>with DAG(<br>    dag_id=&quot;dbt_vertex_pipeline_minimal&quot;,<br>    start_date=datetime(2024, 1, 1),<br>    schedule_interval=None,<br>    catchup=False,<br>    tags=[&quot;dbt&quot;, &quot;vertex_ai&quot;],<br>) as dag:<br>    # 1. Execute dbt Cloud Job (preprocessing)<br>    dbt_job_preprocess = DbtCloudRunJobOperator(<br>        task_id=&quot;dbt_job_preprocess&quot;,<br>        dbt_cloud_conn_id=DBT_CLOUD_CONN_ID,<br>        job_id=DBT_JOB_ID_PREPROCESS,<br>    )<br>    # 2. Execute Batch Prediction on Vertex AI<br>    # Since the DWH is BigQuery, specify BigQuery for input/output<br>    vertex_batch_predict = CreateBatchPredictionJobOperator(<br>        task_id=&quot;vertex_batch_predict&quot;,<br>        project_id=GCP_PROJECT_ID,<br>        location=GCP_LOCATION,<br>        job_display_name=&quot;dbt-vertex-prediction-job&quot;,<br>        model_name=VERTEX_MODEL_NAME,<br>        # Input data (BigQuery)<br>        instances_format=&quot;bigquery&quot;,<br>        bigquery_source=&quot;bq://your-project.dataset.input_table&quot;,<br>        # Output destination (BigQuery)<br>        predictions_format=&quot;bigquery&quot;,<br>        bigquery_destination_prefix=&quot;bq://your-project.dataset.output_table&quot;,<br>    )<br>    # 3. Execute dbt Cloud Job (postprocessing)<br>    dbt_job_postprocess = DbtCloudRunJobOperator(<br>        task_id=&quot;dbt_job_postprocess&quot;,<br>        dbt_cloud_conn_id=DBT_CLOUD_CONN_ID,<br>        job_id=DBT_JOB_ID_POSTPROCESS,<br>    )<br>    # Define dependencies<br>    dbt_job_preprocess &gt;&gt; vertex_batch_predict &gt;&gt; dbt_job_postprocess</pre><p>Using Airflow allows you to implement this with very little code, whereas building it from scratch would require significantly more effort.</p><p>Since the dbt Platform doesn’t have an official Python SDK, you would otherwise need to call the API directly using a library like requests, and implement your own job status monitoring and retry logic.</p><p>This would cause code unrelated to business logic to balloon, increasing the risk of bugs and taking time away from delivering essential value.</p><p>However, orchestration tools like Airflow provide dedicated Operators that encapsulate this general-purpose functionality — a key benefit of using these tools.</p><p>Looking at the Operator’s internal implementation, it first executes the dbt Platform job via the self.hook.trigger_job_run method, then waits for the job to succeed using the self.hook.wait_for_job_run_status method.</p><pre># https://github.com/apache/airflow/blob/providers-dbt-cloud/4.5.0/providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py#L182-L215<br>...<br>            trigger_job_response = self.hook.trigger_job_run(<br>                account_id=self.account_id,<br>                job_id=self.job_id,<br>                cause=self.trigger_reason,<br>                steps_override=self.steps_override,<br>                schema_override=self.schema_override,<br>                retry_from_failure=is_retry and self.retry_from_failure,<br>                additional_run_config=self.additional_run_config,<br>            )<br>            self.run_id = trigger_job_response.json()[&quot;data&quot;][&quot;id&quot;]<br>            job_run_url = trigger_job_response.json()[&quot;data&quot;][&quot;href&quot;]<br><br>        # Push the ``job_run_url`` and ``job_run_id`` value to XCom regardless of what happens during execution.<br>        # This enables job monitoring via the operator link and provides direct access<br>        # to the job run ID without requiring users to parse the URL manually<br>        context[&quot;ti&quot;].xcom_push(key=&quot;job_run_url&quot;, value=job_run_url)<br>        context[&quot;ti&quot;].xcom_push(key=&quot;job_run_id&quot;, value=self.run_id)<br><br>        if self.wait_for_termination and isinstance(self.run_id, int):<br>            if self.deferrable is False:<br>                self.log.info(&quot;Waiting for job run %s to terminate.&quot;, self.run_id)<br><br>                if self.hook.wait_for_job_run_status(<br>                    run_id=self.run_id,<br>                    account_id=self.account_id,<br>                    expected_statuses=DbtCloudJobRunStatus.SUCCESS.value,<br>                    check_interval=self.check_interval,<br>                    timeout=self.timeout,<br>                ):<br>                    self.log.info(&quot;Job run %s has completed successfully.&quot;, self.run_id)<br>                else:<br>                    raise DbtCloudJobRunException(f&quot;Job run {self.run_id} has failed or has been cancelled.&quot;)<br><br>                return self.run_id</pre><p>Looking inside the self.hook.wait_for_job_run_status method, you can see it&#39;s processing that periodically polls the job status and waits until it reaches the expected state (Success in this case).</p><pre># https://github.com/apache/airflow/blob/providers-dbt-cloud/4.5.0/providers/dbt/cloud/src/airflow/providers/dbt/cloud/hooks/dbt.py#L781-L824<br>    def wait_for_job_run_status(<br>        self,<br>        run_id: int,<br>        account_id: int | None = None,<br>        expected_statuses: int | Sequence[int] | set[int] = DbtCloudJobRunStatus.SUCCESS.value,<br>        check_interval: int = 60,<br>        timeout: int = 60 * 60 * 24 * 7,<br>    ) -&gt; bool:<br>        &quot;&quot;&quot;<br>        Wait for a dbt Cloud job run to match an expected status.<br><br>        :param run_id: The ID of a dbt Cloud job run.<br>        :param account_id: Optional. The ID of a dbt Cloud account.<br>        :param expected_statuses: Optional. The desired status(es) to check against a job run&#39;s current<br>            status. Defaults to the success status value.<br>        :param check_interval: Time in seconds to check on a pipeline run&#39;s status.<br>        :param timeout: Time in seconds to wait for a pipeline to reach a terminal status or the expected<br>            status.<br>        :return: Boolean indicating if the job run has reached the ``expected_status``.<br>        &quot;&quot;&quot;<br>        expected_statuses = (expected_statuses,) if isinstance(expected_statuses, int) else expected_statuses<br><br>        DbtCloudJobRunStatus.check_is_valid(expected_statuses)<br><br>        job_run_info = JobRunInfo(account_id=account_id, run_id=run_id)<br>        job_run_status = self.get_job_run_status(**job_run_info)<br><br>        start_time = time.monotonic()<br><br>        while (<br>            not DbtCloudJobRunStatus.is_terminal(job_run_status) and job_run_status not in expected_statuses<br>        ):<br>            # Check if the job-run duration has exceeded the ``timeout`` configured.<br>            if start_time + timeout &lt; time.monotonic():<br>                raise DbtCloudJobRunException(<br>                    f&quot;Job run {run_id} has not reached a terminal status after {timeout} seconds.&quot;<br>                )<br><br>            # Wait to check the status of the job run based on the ``check_interval`` configured.<br>            time.sleep(check_interval)<br><br>            job_run_status = self.get_job_run_status(**job_run_info)<br><br>        return job_run_status in expected_statuses</pre><p>Additionally, even if the dbt Platform API version is updated, using the Operator means you can support the latest API just by upgrading the package version, making it superior in terms of maintainability as well.</p><h2>Ease of Cross-Team Collaboration</h2><p>Moreover, this architecture is not only highly maintainable but also excellent for cross-team collaboration.</p><p>Cross-team collaboration can become a bottleneck if not managed well, so it’s important to design with the following goals in mind:</p><ul><li>Minimize the learning curve for analytics engineers adopting new technology stacks.</li><li>Reduce the operational and support burden on the data engineering team sharing resources with other teams.</li></ul><h4>Simplifying the Deployment Approval Process</h4><p>Pipelines containing significant business logic are rarely “deploy and forget” — they require continuous updates. For example, updating a machine learning model may require new features.</p><p>If dbt code resides within the Airflow environment (e.g., executing dbt Core directly on Airflow), modifying dbt code requires deploying changes to the Airflow repository. The analytics engineer would then need to request reviews not only from their own team but also from the data engineering team managing Airflow. Reviewing business logic code for requirements they don’t fully understand places a significant burden on data engineers.</p><p>On the other hand, with the current configuration where code resides on the dbt Platform, you can complete updates simply by modifying the dbt code and deploying it to the dbt Platform. There is no need to request reviews or send Pull Requests to the data engineering team for every change.</p><h4>Eliminating Local Airflow Setup</h4><p>As mentioned earlier, since analytics engineers don’t need to touch Airflow code, they don’t need to set up a local Airflow development environment.</p><p>While tools like <a href="https://github.com/GoogleCloudPlatform/composer-local-dev/tree/main">composer-local-dev</a> exist for Cloud Composer, the setup and verification process can still be complex and time-consuming.</p><p>For those unfamiliar with Docker, setting this up from scratch can be a significant hurdle for the analytics engineering team.</p><p>Therefore, it is more productive for both teams if analytics engineers focus on learning the Airflow Web UI and basic concepts rather than environment management.</p><h3>Cost</h3><p>While this architecture has many benefits, it also has downsides. One is the infrastructure cost.</p><p>Since this approach combines tools already in use, there are no additional costs in this scenario. However, if introducing them for the first time, you will incur infrastructure costs for the orchestration tool in addition to dbt Platform fees.</p><p>Both are tools with enterprise-grade features and substantial costs. It may be financially difficult for a single small team to contract and operate both.</p><p>If your internal data team consists only of data engineers handling ETL processing and no analytics engineers have been hired yet, it may be more cost-effective to use libraries like <a href="https://www.astronomer.io/cosmos/">Cosmos</a> by Astronomer, or tools like Dagster that have high affinity with dbt Core, rather than introducing the dbt Platform.</p><h3>Conclusion</h3><p>In this article, I’ve explained how to combine the dbt Platform with orchestration tools.</p><p>AI can now generate code instantly, and its accuracy is constantly improving. However, architectural design — ensuring maintainability and selecting the right execution platform — remains an area where human expertise truly shines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d96d49fae6be" width="1" height="1" alt=""><hr><p><a href="https://medium.com/towards-data-engineering/combining-dbt-platform-dbt-cloud-with-orchestration-tools-d96d49fae6be">Combining dbt Platform (dbt Cloud) with Orchestration Tools</a> was originally published in <a href="https://medium.com/towards-data-engineering">Towards Data Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How the Long-established BI Tool “Looker” Survives the AI Era]]></title>
            <link>https://blog.dataengineerthings.org/how-the-long-established-bi-tool-looker-survives-the-ai-era-8ddf454a7ffc?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ddf454a7ffc</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[looker]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Tue, 30 Sep 2025 15:47:48 GMT</pubDate>
            <atom:updated>2025-09-30T15:47:48.667Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>Looker is an enterprise BI tool provided by Google Cloud. First launched in 2012, it has over 10 years of history, making it quite a veteran in the Modern Data Stack. It means that Looker was born around the same time as cloud data warehouses like BigQuery and Redshift.[¹]</p><p>For those who are not familiar with Looker, the product naming can be confusing, so let me clarify the three types of Google BI tools currently called “Looker”:</p><ul><li><strong>Looker</strong>: Enterprise-grade high-feature BI platform (the main subject of this article)</li><li><strong>Looker Studio Pro</strong>: Paid version of Looker Studio</li><li><strong>Looker Studio</strong>: Free, simple BI tool</li></ul><p>Among these, Looker Studio was originally called Google Data Studio, but was rebranded in 2022 to align with Looker, which Google acquired in 2019. This overlapping brand naming creates the annoying side effect where searching for Looker documentation often returns Looker Studio results instead.</p><p>While Looker Studio is excellent as a free, accessible BI tool, it has virtually no APIs and makes integrated management difficult. In contrast, Looker has been provided as an enterprise SaaS for over 10 years, naturally becoming feature-rich to the point where even engineers managing Looker instances now find it difficult to grasp all its capabilities.</p><p>This abundance of features is a double-edged sword. While it enables various use cases, when providing access broadly within and outside organizations, administrators need to do more than just manage licenses. They must understand Looker’s features to determine which ones to enable and how to design permissions — essentially taking on a platform team role to ensure proper governance. This is especially important since Looker has rich APIs, which could lead to uncontrolled access to and manipulation of Looker resources from anywhere without proper management.</p><p>Now, Looker has been rapidly integrating with AI in recent years. The product’s design, centered around LookML — a proprietary language for semantic layers — shows high compatibility with the current AI era.</p><p>In this article, I’ll explore how Looker has evolved over time and how it’s adapting to the current AI era.</p><p>Note: If you’d like to dive deeper into how to build dashboards in Looker, this video has more details:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPuLUcmAzyO8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPuLUcmAzyO8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPuLUcmAzyO8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/40a545f646c2a7f7a8ad9d0d89af3e1b/href">https://medium.com/media/40a545f646c2a7f7a8ad9d0d89af3e1b/href</a></iframe><h3><strong>Features That Were Ahead of Their Time</strong></h3><p>In recent years, we often hear about “BI as Code” — the concept of managing dashboards with code. Remarkably, Looker had already implemented this concept <a href="https://cloud.google.com/looker/docs/looker-2-release-notes?hl=en#lookml"><strong>over 10 years ago</strong></a>.</p><p>Like other BI tools, Looker allows creating dashboards through drag-and-drop in a browser, but it also supports code-based dashboard definitions using LookML.</p><p><a href="https://cloud.google.com/looker/docs/types-of-dashboards">Comparing user-defined and LookML dashboards | Looker | Google Cloud</a></p><p>LookML dashboards can be version-controlled in Git repositories like other LookML, enabling safe deployment through review processes.</p><p>Since Looker’s strength lies in use cases requiring high quality, such as providing dashboards to executives and clients, this development process that doesn’t affect production environments is crucial.</p><p>Dashboard files use YAML format rather than LookML, and the specification assumes reusing dashboards defined in GUI rather than human coding from scratch. However, with generative AI now capable of writing these files, creating LookML dashboards has become much more efficient.</p><p><a href="https://cloud.google.com/looker/docs/reference/param-lookml-dashboard">LookML dashboard parameters | Looker | Google Cloud</a></p><h3><strong>Legacy Features</strong></h3><p>Of course, not all features are cutting-edge and aligned with current times. From a Modern Data Stack perspective, some features make you wonder, “Is this feature really necessary?”</p><p>A prime example is <strong>PDT (Persistent Derived Table)</strong>.</p><h4><strong>What is PDT?</strong></h4><p>Simply put, PDT is Looker’s built-in scheduler functionality for table creation. It can periodically execute SQL defined in Looker and physically create tables from the results.</p><p>By pre-creating tables for chart rendering, you can expect reduced rendering time and optimized query costs.</p><p>PDT was also <a href="https://cloud.google.com/looker/docs/looker-1-release-notes#persistent_derived_tables">released in 2014</a>. Since BigQuery’s Scheduled Query <a href="https://cloud.google.com/bigquery/docs/release-notes#July_19_2019">became GA in 2019</a>, PDT existed about 5 years earlier.</p><h4><strong>Past Rationality and Current Challenges</strong></h4><p>In the 2010s, schedulers usable by non-engineers, like data analysts, were extremely limited. Therefore, Looker’s PDT met a real need, and using it was a rational choice at the time.</p><p>Alternative options could be considered, but all had high barriers:</p><ul><li>Building custom SQL execution schedulers running on cron</li><li>Handing SQL to engineers for execution on workflow tools like Airflow</li></ul><p>However, the situation has changed dramatically. SQL-based data transformation tools like dbt and sqlmesh have become widespread, and numerous managed services manageable by non-engineers have emerged.</p><p>Modern features like data quality testing and dependency management/visualization are being continuously developed. For continuous operation, SQL executed outside git version control like Scheduled Queries are often now targeted for elimination as “rogue queries”.</p><p>Meanwhile, Looker’s PDT hasn’t sufficiently added the rich features for managing SQL mentioned above. Also, when teams have already adopted SQL workflow tools like dbt, placing SQL queries in Looker’s repository increases operational costs and complexity.</p><p>Therefore, unless there are special circumstances like having data engineers who are familiar with Looker on the team with clear expectations for query execution optimization, new PDT usage should generally be avoided.</p><p>The better approach currently is to handle data transformation with specialized modern tools like dbt, and use Looker purely as a BI tool.</p><h3><strong>Swept Away by the AI Wave? The abandoned “Looker Modeler” Project</strong></h3><p>An interesting episode in Looker’s history is the project called <strong>Looker Modeler</strong>.</p><h4><strong>What was Looker Modeler?</strong></h4><p>In early 2023, Google announced a new concept called Looker Modeler.</p><p><a href="https://cloud.google.com/blog/products/data-analytics/introducing-looker-modeler?hl=en">Introducing Looker Modeler | Google Cloud Blog</a></p><p>This was a concept to provide a dedicated interface for using LookML semantic layers defined in Looker from other tools. In other words, it would enable business logic defined in LookML to be utilized in other tools beyond Looker.</p><p>However, after this announcement, there was no further information about Looker Modeler. The timing coincided with Google’s resource shift toward AI, including organizational restructuring, so you can imagine what happened.</p><h4><strong>MCP Server and BI Connector</strong></h4><p>However, this idea didn’t completely disappear.</p><p>Recently, the <a href="https://cloud.google.com/blog/products/business-intelligence/introducing-looker-mcp-server"><strong>Looker MCP Server</strong></a> was released. While this takes a different approach from the original Looker Modeler, it ultimately provides similar value by enabling AI agents to create charts and dashboards via API.</p><p>Additionally, a feature called <a href="https://cloud.google.com/looker/docs/bi-connectors"><strong>BI Connector</strong></a> has been developed in parallel, now making it possible to analyze data in major BI tools like spreadsheets and Power BI.</p><p>Considering these two features together, the original concept of “using LookML from other tools” envisioned by Looker Modeler has been achieved to a certain extent.</p><h4><strong>AI Integration</strong></h4><p>Including the aforementioned MCP Server, Looker’s biggest focus in recent years has been integration with the rapidly evolving AI field.</p><p>Particularly noteworthy is the <a href="https://cloud.google.com/gemini/docs/conversational-analytics-api/overview"><strong>Conversational Analytics</strong></a> feature.</p><p>While functionally similar to MCP, it enables more sophisticated analysis (with sufficient data preparation) through data agents that can have additional contextual information for each data source.</p><p>Moreover, since this feature is integrated into Looker itself, it can also be used as a managed service.</p><h4><strong>Asset Value of LookML</strong></h4><p>For Conversational Analytics data sources, since APIs are provided, it’s possible to use BigQuery tables in addition to Looker. Therefore, if building AI-oriented data sources from scratch, Looker isn’t necessarily required.</p><p>However, the story is different for organizations that have used Looker for many years and have already developed LookML as Explores enabling users to utilize various metrics.</p><p>When wanting to leverage existing assets accumulated in Looker, it becomes rational to further enhance LookML for AI utilization.</p><p>LookML itself has added AI-conscious properties such as <a href="https://cloud.google.com/looker/docs/reference/param-field-synonyms">synonyms</a>, making it possible to make LookML user-friendly not only for humans but also for AI.</p><h3><strong>The Emergence of Open Semantic Interchange (OSI)</strong></h3><p>While not yet directly related to Looker, there was recently a major announcement about <a href="https://www.snowflake.com/en/blog/open-semantic-interchange-ai-standard/"><strong>Open Semantic Interchange (OSI)</strong></a>, a new semantic layer standardization project.</p><p>Speaking of standardization, while MCP (Model Context Protocol) has become widely adopted as an interface for AI agents, nothing similar has existed for semantic layers until now.</p><p>Since individual products define their own semantic layers and interfaces, interoperability has been low. Sharing data between different tools requires either product-side development of managed connectors, such as Looker’s BI Connector, or incurring high learning costs to understand the specifications.</p><p>However, Google (and thus Looker) is unfortunately absent from the list of companies participating in this program.</p><p>For Looker, the ability to protect LookML assets that existing customers have built over many years is a source of competitive advantage. Making semantic layers easily portable to external systems offers little business model benefit, which is understandable.</p><p>Nevertheless, semantic layer standardization is a feature users have long awaited. If this initiative becomes standard, Looker will eventually be forced to respond.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9SJj5POKqVe9ajQw" /><figcaption>Photo by <a href="https://unsplash.com/@goumbik?utm_source=medium&amp;utm_medium=referral">Lukas Blazek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>What I Hope for Future Looker (In addition to AI Integration)</strong></h3><p>Looker is already feature-rich, but regular updates continue with various new features being added.</p><p>Since the product side is clearly prioritizing AI integration and Looker should evolve alongside AI progress, I’ll deliberately avoid discussing that and instead mention some other points to enhance Looker’s capabilities.</p><h4><strong>More Modern Code Development Environment</strong></h4><p>Looker provides a browser-based IDE, but honestly, it has quite a legacy UI/UX.</p><p>Not only is it sluggish, but it also has a single-tab UI reminiscent of old Internet Explorer, making it quite inconvenient since you can’t open multiple files simultaneously.</p><p>However, coding in browsers itself isn’t a very modern choice now, considering that various AI products integrate around IDEs like VS Code.</p><p>This area is also gradually receiving updates, with CI functionality now being offered as a managed service.</p><p><a href="https://cloud.google.com/looker/docs/continuous-integration">Looker Continuous Integration | Google Cloud</a></p><p>This feature was originally provided as a third-party tool called Spectacles, but became a Looker feature when Spectacles was acquired by Looker.</p><p>CI validation, which was mainly done in browsers, now can run when creating pull requests through this feature, making local IDE development more comfortable.</p><p>Additionally, if official VS Code extensions were provided offering syntax highlighting, snippets, and syntax checking, it would create a much more comfortable local development environment.[²]</p><h4><strong>Official Terraform Provider</strong></h4><p>Not limited to Looker, being able to manage infrastructure configuration values with code and tfstate is crucial for improved reusability and rapid recovery during emergencies.</p><p>Particularly for enterprise SaaS like Looker, with hundreds to thousands of users or business clients requiring high service levels, GUI operations carry significant risks.</p><p>Unfortunately, currently only third-party Terraform Providers using Looker API exist.</p><ul><li><a href="https://github.com/devoteamgcloud/terraform-provider-looker">GitHub - devoteamgcloud/terraform-provider-looker: Terraform Provider for Looker</a></li><li><a href="https://github.com/hirosassa/terraform-provider-looker">GitHub - hirosassa/terraform-provider-looker: Terraform Provider for managing Looker</a></li></ul><p>Only the latter Provider receives regular updates. Also, due to its history, this Provider is built with the legacy SDKv2.</p><p>Therefore, there’s risk of delayed adaptation when Looker or Terraform receives major updates.</p><p>Having an official Provider maintained and enhanced by the official team would mitigate such risks, so I hope for releasing an official Provider.</p><h4><strong>Sandbox Environment for Easy API Testing</strong></h4><p>Looker has very rich APIs and provides an extension called <a href="https://cloud.google.com/looker/docs/api-explorer">API explorer</a> that allows sending API requests from GUI.</p><p>However, resources operable from API explorer are actual data from that instance, creating high psychological barriers for casually experimenting with Update or Delete operations.</p><p>Ideally, a sandbox environment isolated from actual instances would be provided, but currently, when a complete development environment is needed, you must separately contract a “<a href="https://cloud.google.com/looker/docs/looker-core-overview">non-production environment instance</a>&quot; for development.</p><p>However, except for cases requiring strict requirements like serving external clients, getting approval for a development instance just because “I want to try APIs” is unlikely.</p><p>It’s unrealistic for Looker’s product team alone to meet all extension feature needs utilizing rich APIs. To activate Looker’s ecosystem, including Terraform Providers mentioned earlier, I hope for environments where developers can easily try APIs.</p><h4><strong>90-Day Trial Instance</strong></h4><p>Somewhat related to this sandbox environment issue, a new option called <a href="https://cloud.google.com/looker/docs/looker-core-overview#trials">90-day trial instance</a> was released.</p><p>Previously, there was a 30-day trial instance option, but this had a trap where it automatically switched to the paid version after trial completion.</p><p>The newly added 90-day version requires deletion or creation of a new paid instance after the trial period ends, making it safer.</p><p>While a periodic refresh is needed, it could likely be used for purposes like testing APIs.</p><p>However, when I tried it on my personal GCP project, it was greyed out, requiring a sales contact, and I couldn’t create an instance. Unfortunately, it seems environments for easy individual-level experimentation still aren’t provided.</p><h3><strong>Conclusion</strong></h3><p>The BI tool field is a highly competitive landscape, and Looker is no exception. Furthermore, considering semantic layer standardization like the aforementioned OSI and further AI evolution, BI tools themselves might be replaced by something else entirely.</p><p>When newly selecting BI tools for organizations, currently, all tools have pros and cons, and optimal solutions change based on countless factors, including the technology stack beyond BI tools, organization size, and users’ data literacy.</p><p>For example, as of 2025, if widely adopting dbt as a data transformation tool, <a href="https://github.com/lightdash/lightdash">Lightdash</a> would emerge as a strong candidate.</p><p>As another example, when I was on the business side, I was in an unusual team that built our own data pipelines and created dashboards for monitoring KPIs where we expected changes from projects.</p><p>In such teams where members are both data owners and consumers, using simple GUI-based BI tools like Looker Studio for building and destroying dashboards to see the exact data might be more productive than defining metrics with LookML each time.</p><p>However, in general cases where dashboard creators and viewers are separated across organizations or companies, the value of using BI tools with rich governance features like Looker remains high.</p><p>Looker has very advanced AI integration among BI tools and is expected to evolve as a high-feature BI tool linked with Gemini. At least, there’s no immediate future where Looker joins <a href="https://killedbygoogle.com/">Killed By Google</a>.</p><h4>References:</h4><ol><li>Looker’s nearly complete release notes can be found <a href="https://cloud.google.com/looker/docs/looker-releases">here</a>.</li></ol><p>2. Unofficial extensions seem to exist: <a href="https://marketplace.visualstudio.com/items?itemName=Cobry.looker-vscode">https://marketplace.visualstudio.com/items?itemName=Cobry.looker-vscode</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ddf454a7ffc" width="1" height="1" alt=""><hr><p><a href="https://blog.dataengineerthings.org/how-the-long-established-bi-tool-looker-survives-the-ai-era-8ddf454a7ffc">How the Long-established BI Tool “Looker” Survives the AI Era</a> was originally published in <a href="https://blog.dataengineerthings.org/">Data Engineer Things</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key Considerations When Migrating to dbt-fusion]]></title>
            <link>https://medium.com/@fumiaki.kobayashi/key-considerations-when-migrating-to-dbt-fusion-47465d1ec2a9?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/47465d1ec2a9</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 00:56:48 GMT</pubDate>
            <atom:updated>2025-06-20T00:56:48.723Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Introduction</strong></h4><p>The 2025 dbt Launch Showcase was recently held as a product reveal event for the new dbt engine and related products.</p><p>Along with the event launch, a massive number of documents were also published simultaneously, so I immediately went through them to catch up. Here are some points that caught my attention.</p><p>Note<strong>: </strong>I’ll omit prior knowledge about the new engine, such as SDF details. If you want to know them in advance, please refer to articles like the following:</p><ul><li><a href="https://www.getdbt.com/blog/dbt-labs-acquires-sdf-labs">dbt Labs acquires SDF Labs to advance analytics engineering | dbt Labs</a></li><li><a href="https://docs.getdbt.com/blog/the-levels-of-sql-comprehension">The Three Levels of SQL Comprehension: What they are and why you need to know about them | dbt Developer Blog</a></li></ul><h4><strong>dbt-fusion is an Independent Product from dbt-core</strong></h4><p>I had long wondered how the Rust-based SDF would integrate with existing dbt-core. The result is quite surprising. The dbt-fusion was announced as an independent product separate from the dbt-core.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxVBodgsPHtw5EGdi1EL8Q.png" /><figcaption>dbt-fusion is a new product. This image is generate by AI</figcaption></figure><p>dbt-fusion supports local development through the official VS Code extension and other tools, so while it requires some setup like account creation, it can be used for free even if you’re not a dbt Cloud user.</p><p>Additionally, the dbt-core itself won’t end development with this release, and <a href="https://www.getdbt.com/blog/new-code-new-license-understanding-the-new-license-for-the-dbt-fusion-engine">it’s clearly stated that support will continue</a>.</p><h4><strong>Breaking Changes Exist</strong></h4><p>Several breaking changes are documented when migrating to dbt-fusion.</p><p><a href="https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-fusion">Upgrading to the dbt Fusion engine (v2.0) | dbt Developer Hub</a></p><p>Specifically, there are two main points:</p><ul><li>Deprecation warnings occurring in dbt core will become errors in the upcoming dbt-fusion preview release</li><li>Flags that can change dbt core behavior will become unusable</li></ul><p>For the first point about deprecation warnings, dbt Labs recommends we use a support package called dbt-autofix.</p><p><a href="https://github.com/dbt-labs/dbt-autofix">GitHub - dbt-labs/dbt-autofix: CLI to help users refactor dbt projects by automatically fixing deprecations</a></p><p>When I tried it locally, I found that there was no partial application command, making it too risky to apply to massive dbt projects with thousands of models. I’ve created <a href="https://github.com/dbt-labs/dbt-autofix/issues/43">a feature request issue</a>, so if anyone else has similar concerns, please support with👍.</p><p>Additionally, you have to pay attention to external packages and Python libraries. As of May 2025, only the following packages developed by dbt-labs are explicitly stated to be compatible with dbt-fusion:</p><ul><li>dbt_utils</li><li>audit_helper</li><li>dbt_external_tables</li><li>dbt_project_evaluator</li></ul><p>Third-party tools will check their compatibility after this first launch, so you’ll need to verify whether the tools you’re using support dbt-fusion by checking each tool’s updates before migration.</p><h4><strong>Only Snowflake is Supported in Beta</strong></h4><p>Currently, Snowflake is the only data warehouse supported by dbt-fusion. Other data warehouses are planned to be supported until the release of GA.</p><p>You can see the schedule when the data warehouse you use is supported in the following page:</p><p><a href="https://github.com/dbt-labs/dbt-fusion?tab=readme-ov-file#timeline">GitHub - dbt-labs/dbt-fusion: The next-generation engine for dbt</a></p><p>A roadmap for other features has also been published.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xfvL1SXsRoE9nZlS" /><figcaption>Source: <a href="https://docs.getdbt.com/blog/dbt-fusion-engine-path-to-ga">https://docs.getdbt.com/blog/dbt-fusion-engine-path-to-ga</a></figcaption></figure><p>Among other things, there’s mention of “next-gen dbt docs” in the GA section — does it imply that they replace it with the existing data catalog in dbt-core? Since I’ve previously written about the architectural limitations, I’m curious to see what form this will take.</p><p><a href="https://medium.com/art-of-data-engineering/troubleshooting-heavy-dbt-docs-generate-command-2036606925a7">Troubleshooting Heavy dbt docs generate Command</a></p><h4><strong>dbt-fusion License is not Apache License 2.0</strong></h4><p>This was the biggest surprise for me. dbt-fusion will be provided under the ELv2 license instead of the Apache License 2.0.</p><p>Though I don’t want to go into detailed explanations, the most notable point is that this license doesn’t allow others to provide managed services for dbt-fusion that can compete with dbt Cloud without permission.</p><p>For detailed Q&amp;A, please see <a href="https://www.getdbt.com/licenses-faq">https://www.getdbt.com/licenses-faq</a>.</p><p>When features that only work with dbt-fusion emerge in the future, you need to consider whether to migrate from tools that can only use dbt-core.</p><p>This license change seems intended to secure dbt Cloud’s competitive advantage, but from a user perspective, it adds another concern to consider.</p><h4><strong>Summary</strong></h4><p>After reading through the documentation, I got the impression that dbt-fusion, including its ecosystem, will be stably available from the second half of 2025.</p><p>While the new engine will undoubtedly improve the local development experience, there have been significant changes like licensing, so careful consideration will be necessary when deciding which tools to use as the scheduler for dbt for the next few years.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47465d1ec2a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Troubleshooting Heavy dbt docs generate Command]]></title>
            <link>https://medium.com/art-of-data-engineering/troubleshooting-heavy-dbt-docs-generate-command-2036606925a7?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2036606925a7</guid>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics-engineering]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Tue, 25 Feb 2025 08:52:59 GMT</pubDate>
            <atom:updated>2025-06-06T07:53:57.904Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you able to run the <a href="https://docs.getdbt.com/reference/commands/cmd-docs">dbt docs generate</a>command without issues in your dbt projects? If you can execute it smoothly, you’re the lucky ones.</p><p>Unfortunately, there are too many models (more than 2,000) in the project I&#39;m currently managing, causing memory exhaustion even when running locally.</p><p>Even if it does run successfully in other projects, it often takes more than 10 minutes. The more you use dbt, the more likely you encounter challenges with dbt docs.</p><p>In this article, we’ll cover:</p><ul><li>The mechanics and issues of dbt’s data catalog feature</li><li>Methods to execute dbt docscommands despite these challenges</li></ul><h3><strong>What is dbt docs generate?</strong></h3><p>dbt docs generateis a command that creates documentation source files that serve as a data catalog based on information from dbt models and sources.</p><p>The documentation feature consists of three files:</p><ul><li>manifest.json</li><li>index.html</li><li>catalog.json</li></ul><p>manifest.json is created during parsing and compilation when running or building in dbt, containing metadata about models and sources. By default, additional compilation is performed when executing the dbt docs generate command.</p><p>Regarding the frontend source, index.html, it is <a href="https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/task/docs/index.html">a file that exists in dbt-core</a> and the dbt command copies it to the target directory in your dbt project.</p><p>Lastly, during the generation of catalog.json, queries are sent to the data warehouse to fetch additional data. The source code of the SQL query is <a href="https://github.com/dbt-labs/dbt-bigquery/tree/main/dbt/include/bigquery/macros/catalog">defined as macros</a>, which retrieve data from INFORMATION_SCHEMA.</p><p>Looking at the code, you can see queries to INFORMATION_SCHEMA are issued per dataset. The process of retrieving and transforming this data is what causes the performance issues.</p><h3><strong>Performance Improvements</strong></h3><p>The dbt docs generatecommand has long been known to be resource-intensive, and several improvements aimed at performance enhancement were implemented around dbt core versions 1.6–1.7. Let’s review them in the next section.</p><h4><strong>Improvements to avoid retrieving unnecessary data</strong></h4><p>In old versions of dbt core, when a dataset containing sources and models was huge, and dbt was only using a small portion of tables from that dataset, it would unnecessarily fetch metadata for all tables, which caused performance issues.</p><p>This issue was fixed in dbt core 1.7, and now it includes filter processing that only retrieves resources defined in dbt.</p><ul><li><a href="https://github.com/dbt-labs/dbt-core/issues/8521">https://github.com/dbt-labs/dbt-core/issues/8521</a></li><li><a href="https://github.com/dbt-labs/dbt-bigquery/pull/1063">https://github.com/dbt-labs/dbt-bigquery/pull/1063</a></li></ul><pre>-- https://github.com/dbt-labs/dbt-bigquery/blob/v1.9.1/dbt/include/bigquery/macros/catalog/by_relation.sql<br>{% macro bigquery__get_catalog_relations(information_schema, relations) -%}<br><br>    {%- if (relations | length) == 0 -%}<br>        {# Hopefully nothing cares about the columns we return when there are no rows #}<br>        {%- set query = &quot;select 1 as id limit 0&quot; -%}<br><br>    {%- else -%}<br>        {%- set query -%}<br>            with<br>                table_shards_stage as ({{ _bigquery__get_table_shards_sql(information_schema) }}),<br>                table_shards as (<br>                    select * from table_shards_stage<br>                    where (<br>                        {%- for relation in relations -%}<br>                            (<br>                                upper(table_schema) = upper(&#39;{{ relation.schema }}&#39;)<br>                            and upper(table_name) = upper(&#39;{{ relation.identifier }}&#39;)<br>                            )<br>                            {%- if not loop.last %} or {% endif -%}<br>                        {%- endfor -%}<br>                    )<br>                ),<br>...</pre><p>As shown above, ANDfilters for dataset names and table names are created in a loop process.</p><p>However, this method still has some issues:</p><ul><li>Since it uses exact matching for filtering, date-sharded tables using wildcards in sources are excluded</li><li>If there are many sources and models defined in the same dataset, the query byte size might exceed BigQuery’s limits</li></ul><p>Additionally, when a dataset contains a massive number of tables (hundreds of thousands), queries to INFORMATION_SCHEMA might exceed execution limits, so dividing large datasets into smaller ones may be necessary.</p><h4><strong>New Options</strong></h4><p>Several new options have been added to the dbt docs generatecommand to improve processing speed and usability.</p><p><strong>--no-compile</strong>option skips the compilation process during docs generation. While there&#39;s a significant drawback in that you won&#39;t be able to see compiled queries (unless manifest.json already exists), it allows you to create dbt docs without data warehouse authentication credentials.</p><p><strong>--empty-catalog </strong>skips the process of querying the data warehouse and creates an empty catalog.json like this:</p><pre>{<br> “metadata”: {<br> “dbt_schema_version”: “https://schemas.getdbt.com/dbt/catalog/v1.json&quot;,<br> “dbt_version”: “1.8.x”,<br> “generated_at”: …<br> “invocation_id”: …<br> “env”: {}<br> },<br> “nodes”: {},<br> “sources”: {},<br> “errors”: null<br>}<br>```</pre><p>You might think an empty catalog would show nothing in the documentation, but as mentioned earlier, manifest.json is also a source of documentation information, so you can still see metadata such as:</p><ul><li>Data lineage</li><li>Column names</li><li>Column descriptions</li><li>Tests</li><li>Compiled queries (if compilation was already performed)</li></ul><p>However, the following information will be missing:</p><ul><li>Column data types</li><li>Table row counts</li></ul><p>While manifest.json contains data type information, it seems the frontend code is currently configured to ignore this information.</p><p>Though the<strong>--select</strong>option wasn’t available for dbt docs generate command before, it was also added in dbt core 1.7.</p><p>If you only need catalog.json for specific pipelines, you can use this option to retrieve information only for the necessary sections.</p><p>However, this select option still seems to have some bugs, occasionally responding to nodes that weren’t specified in the selection. While the cause is currently unclear, I plan to create an issue once I can identify the conditions that trigger this behavior.</p><h3>Different Situations, Different Solutions</h3><p>As we’ve seen, various improvements have been made. However, they haven’t fundamentally resolved the performance issues. The solution likely requires a comprehensive architectural review, but currently, development resources regarding data catalogs are focused on <a href="https://docs.getdbt.com/docs/collaborate/explore-projects">dbt explorer</a> (data catalog only available in dbt cloud), so dramatic changes aren’t expected soon.</p><p>Since this data catalog process is unrelated to data transformation (run or build), choosing not to use it is certainly an option. However, few alternatives can create a data catalog cost-effectively using the metadata defined in dbt.</p><p>While there are increasing numbers of third-party data catalogs that can import dbt metadata, many of these also require executing the dbt docs generatecommand.</p><p>Even for dbt explorer, while it retrieves catalog information from various resources like job execution results, running the dbt docs generatecommand is mandatory for column information.</p><p>Therefore, there are still many situations where we need to run the dbt docs generatecommand to fully utilize dbt metadata. Let’s consider how to execute it efficiently by combining the options we’ve discussed.</p><h4><strong>For dbt core Users who can accept losing some information like row counts</strong></h4><p>Using the --empty-catalogoption allows you to skip the heaviest processes of retrieving metadata from the data warehouse and creating catalog.json, making it extremely fast.</p><p>In addition to achieving faster execution, since major information like column descriptions and tests from manifest.json remains available, this might be sufficient for many dbt core users.</p><p>Also, when running commands in CI environments like GitHub Actions where you don’t want to store data warehouse authentication credentials, you can use the --no-compileoption together to create documentation without authentication information.</p><h4><strong>For dbt cloud users who need catalog.json for dbt explorer</strong></h4><p>While the --empty-catalog option might seem like a universal solution, it’s not always applicable. In the dbt cloud, even if you run dbt docs generate with the --empty-catalog option, column information won’t be added to dbt explorer, so you need to include actual data in catalog.json.</p><p>While you need to generate catalog.json with real data, it’s important to note that dbt explorer only requires data in catalog.json format — it doesn’t need to be a single huge catalog.json file.</p><p>Therefore, you can use the --select option to generate smaller catalog.json files with multiple jobs, which will be individually imported into dbt explorer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yAX89uiJA9N8puowBF7JPw.png" /><figcaption><em>Example of running docs generate along with each pipeline execution for the same scope</em></figcaption></figure><p>By narrowing the scope using the --select option, you can significantly reduce the number of data warehouse queries and the amount of data handled, making the process faster, especially for larger dbt projects.</p><h4><strong>Conclusion</strong></h4><p>By combining recently added command options, we can make dbt docs generate command execution lighter, albeit with some compromises.</p><p>Also, with the recent trend of automatic metadata generation synchronized with data warehouses using tools like dbt-osmosis, we might see future methods that don’t require additional SQL execution when creating data catalogs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2036606925a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/art-of-data-engineering/troubleshooting-heavy-dbt-docs-generate-command-2036606925a7">Troubleshooting Heavy dbt docs generate Command</a> was originally published in <a href="https://medium.com/art-of-data-engineering">Art of Data Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding dbt from the code to reveal hidden functionality]]></title>
            <link>https://blog.dataengineerthings.org/understanding-dbt-from-the-code-906035fdbf6d?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/906035fdbf6d</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics-engineering]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[bigquery]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 18:58:46 GMT</pubDate>
            <atom:updated>2024-10-15T00:33:40.494Z</atom:updated>
            <content:encoded><![CDATA[<h4>An essential knowledge to become an advanced dbt user</h4><p>When you want to create a dbt package, when you come across buggy behavior, or just out of curiosity, you may have the opportunity to read the code behind dbt. Here is a summary with some examples.</p><h3>dbt Architecture</h3><p>Firstly, let’s take a quick look at the architecture of dbt. To use dbt, we need to install a core and an adapter library for each DWH. Each of the libraries plays the following role.</p><ul><li><strong>dbt-core: </strong>responsible for user interface such as CLI</li><li><strong>dbt-adapters:</strong> Abstraction layer in charge of connecting to the DWH</li><li><strong>specific adapters such as dbt-bigquery:</strong> concrete implementations that inherit from dbt-adapters</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3BShfT7dpzeeaPHYYfyd9g.png" /><figcaption>source: <a href="https://docs.getdbt.com/guides/adapter-creation?step=1"><em>https://docs.getdbt.com/guides/adapter-creation?step=1</em></a></figcaption></figure><p>Therefore, in cases where you want to investigate results that include DWH responses, it is often helpful to read the code on the adapter side instead of dbt-core to find the specific implementation and identify the cause of the problem.</p><p>Here are some of the most important implementations you should read.</p><p>Firstly, codes in the <strong>macros/materialization</strong> directory describe the implementation for each materialization type specified in the config block.</p><pre># source code<br># https://github.com/dbt-labs/dbt-bigquery/blob/v1.8.2/dbt/include/bigquery/macros/materializations/view.sql<br><br>{% macro bigquery__handle_existing_table(full_refresh, old_relation) %}<br>    {%- if full_refresh -%}<br>      {{ adapter.drop_relation(old_relation) }}<br>    {%- else -%}<br>      {{ exceptions.relation_wrong_type(old_relation, &#39;view&#39;) }}<br>    {%- endif -%}<br>{% endmacro %}<br><br><br>{% materialization view, adapter=&#39;bigquery&#39; -%}<br>    -- grab current tables grants config for comparision later on<br>    {% set grant_config = config.get(&#39;grants&#39;) %}<br><br>    {% set to_return = bigquery__create_or_replace_view() %}<br><br>    {% set target_relation = this.incorporate(type=&#39;view&#39;) %}<br><br>    {% do persist_docs(target_relation, model) %}<br><br>    {% if config.get(&#39;grant_access_to&#39;) %}<br>      {% for grant_target_dict in config.get(&#39;grant_access_to&#39;) %}<br>        {% do adapter.grant_access_to(this, &#39;view&#39;, None, grant_target_dict) %}<br>      {% endfor %}<br>    {% endif %}<br><br>    {% do return(to_return) %}<br><br>{%- endmaterialization %}</pre><p>In this code, They define BigQuery’s view behavior by writing <strong>{% materialization view, adapter=’bigquery’ -%}</strong>.</p><p>Though BigQuery does not allow the creation of a view if a table with the same name already exists, the implementation of <strong>bigquery__handle_existing_table</strong> at the beginning of this code shows that if <strong>full_refresh</strong> is enabled, the table is deleted in advance before creating the view, which allows us to create it directly.</p><p>The other is the Adapter class, which is a collection of concrete methods for interacting with DWH like BigQuery, and the dbt main operation is executed through it. the class is implemented by inheriting from the BaseAdapter defined in the dbt-adapters repository.</p><pre># source code<br># https://github.com/dbt-labs/dbt-bigquery/blob/v1.8.2/dbt/adapters/bigquery/impl.py#L106-L113<br><br>class BigQueryAdapter(BaseAdapter):<br>    RELATION_TYPES = {<br>        &quot;TABLE&quot;: RelationType.Table,<br>        &quot;VIEW&quot;: RelationType.View,<br>        &quot;MATERIALIZED_VIEW&quot;: RelationType.MaterializedView,<br>        &quot;EXTERNAL&quot;: RelationType.External,<br>    }</pre><p>However, this is still not very interesting, so let’s deepen our understanding by reading more about the code and taking as examples the strange behavior I have encountered.</p><h3>Case1: Table overwrite operation including a change of partition specification does not cause an error</h3><p>In BigQuery, when changing partitions, the original table must be deleted before the new table can be created.</p><p>If you try to repartition a table, which was originally partitioned by day, by month using a DDL statement like the following code, you will get the error like this:</p><blockquote>Cannot replace a table with a different partitioning spec. Instead, DROP the table, and then recreate it. New partitioning spec is interval(type:month,field:date) and existing spec is interval(type:day,field:date)</blockquote><pre>-- DDL statement<br>CREATE OR REPLACE TABLE<br>  `your-project.your-dataset.sample_partitioned_table`<br>PARTITION BY<br>  DATE_TRUNC(date, MONTH) AS<br>SELECT<br>  ...</pre><p>However, when I write the same operation in dbt and do a dbt run, no error occurs. Why?</p><pre># this does not cause the error<br><br>{{ config(<br>    materialized=&#39;table&#39;,<br>    partition_by={<br>      &quot;field&quot;: &quot;date&quot;,<br>      &quot;data_type&quot;: &quot;date&quot;,<br>      &quot;granularity&quot;: &quot;month&quot;<br>    }<br>)}}<br><br>select<br>...</pre><p>The answer lies in the specific implementation of the materialization definition introduced earlier.</p><pre># source code<br># https://github.com/dbt-labs/dbt-bigquery/blob/v1.8.2/dbt/include/bigquery/macros/materializations/table.sql#L23-L35<br><br>  -- build model<br>  {%- set raw_partition_by = config.get(&#39;partition_by&#39;, none) -%}<br>  {%- set partition_by = adapter.parse_partition_by(raw_partition_by) -%}<br>  {%- set cluster_by = config.get(&#39;cluster_by&#39;, none) -%}<br>  {% if not adapter.is_replaceable(old_relation, partition_by, cluster_by) %}<br>    {% do log(&quot;Hard refreshing &quot; ~ old_relation ~ &quot; because it is not replaceable&quot;) %}<br>    {% do adapter.drop_relation(old_relation) %}<br>  {% endif %}<br><br>  -- build model<br>  {%- call statement(&#39;main&#39;, language=language) -%}<br>    {{ create_table_as(False, target_relation, compiled_code, language) }}<br>  {%- endcall -%}</pre><p>You can see that there is conditional branching. If <strong>adapter.is_replaceable</strong> is false, the original table is deleted via <strong>drop_relation</strong> before the target table is created via API.</p><p>Now let’s also look at <strong>is_replaceable</strong> in the code of the adapter class.</p><pre># source code<br># https://github.com/dbt-labs/dbt-bigquery/blob/v1.8.2/dbt/adapters/bigquery/impl.py#L540-L566<br><br>    @available.parse(lambda *a, **k: True)<br>    def is_replaceable(<br>        self, relation, conf_partition: Optional[PartitionConfig], conf_cluster<br>    ) -&gt; bool:<br>        &quot;&quot;&quot;<br>        Check if a given partition and clustering column spec for a table<br>        can replace an existing relation in the database. BigQuery does not<br>        allow tables to be replaced with another table that has a different<br>        partitioning spec. This method returns True if the given config spec is<br>        identical to that of the existing table.<br>        &quot;&quot;&quot;<br>        if not relation:<br>            return True<br><br>        try:<br>            table = self.connections.get_bq_table(<br>                database=relation.database, schema=relation.schema, identifier=relation.identifier<br>            )<br>        except google.cloud.exceptions.NotFound:<br>            return True<br><br>        return all(<br>            (<br>                self._partitions_match(table, conf_partition),<br>                self._clusters_match(table, conf_cluster),<br>            )<br>        )</pre><p>The <strong>is_replaceable</strong> method returns false if there is a difference between the old table and the new one in regards to partition and cluster configuration.</p><p>Though users just execute a dbt run command, we now figure out that dbt is comparing data and deleting tables behind the scenes through the adapter. This was how the dbt run command created tables with different partitions without error.</p><h3>Case 2: Source freshness using metadata returns the current time</h3><p>As another example, let’s look at the implementation of source freshness.</p><p>Source freshness can be calculated in two ways in BigQuery, and the behavior depends on whether <strong>loaded_at_field</strong> is specified or not.</p><blockquote>If a loaded_at_field is provided, dbt will calculate freshness via a select query (behavior prior to v1.7).</blockquote><blockquote>If a loaded_at_field is not provided, dbt will calculate freshness via warehouse metadata tables when possible (new in v1.7 on supported adapters).</blockquote><p><strong>Reference: </strong><a href="https://docs.getdbt.com/reference/resource-properties/freshness#definition">https://docs.getdbt.com/reference/resource-properties/freshness#definition</a></p><p>This time, we will not define <strong>loaded_at_field</strong> and will try to get the source freshness of the sharding table from the metadata.</p><pre>version: 2<br><br>sources:<br><br>  - name: dummy_source<br>    database: your-project<br>    schema: your-dataset<br>    freshness:<br>      warn_after: {count: 1, period: day}<br>      error_after: {count: 2, period: day}<br>    tables:<br>      - name: dummy_*</pre><p>The source.json resulting from running the source freshness command looks like this:</p><pre>{<br>    &quot;metadata&quot;: {<br>        &quot;dbt_schema_version&quot;: &quot;https://schemas.getdbt.com/dbt/sources/v3.json&quot;,<br>        &quot;dbt_version&quot;: &quot;1.8.3&quot;,<br>        &quot;generated_at&quot;: &quot;2024-09-27T10:10:58.326203Z&quot;,<br>        &quot;invocation_id&quot;: &quot;xxxxxx&quot;,<br>        &quot;env&quot;: {}<br>    },<br>    &quot;results&quot;: [<br>        {<br>            &quot;unique_id&quot;: &quot;source.my_new_project.dummy_source.dummy_*&quot;,<br>            &quot;max_loaded_at&quot;: &quot;2024-09-27T10:10:57.753000+00:00&quot;,<br>            &quot;snapshotted_at&quot;: &quot;2024-09-27T10:10:58.320901+00:00&quot;,<br>            &quot;max_loaded_at_time_ago_in_s&quot;: 0.567901,<br>            &quot;status&quot;: &quot;pass&quot;,<br>            &quot;criteria&quot;: {<br>                &quot;warn_after&quot;: {<br>                    &quot;count&quot;: 1,<br>                    &quot;period&quot;: &quot;day&quot;<br>                },<br>                &quot;error_after&quot;: {<br>                    &quot;count&quot;: 2,<br>                    &quot;period&quot;: &quot;day&quot;<br>                },<br>                &quot;filter&quot;: null<br>            },<br>            ...<br>        }<br>    ],<br>    &quot;elapsed_time&quot;: 7.178150415420532<br>}</pre><p>The dbt source freshness command itself completed successfully, but oddly, <strong>max_loaded_at_time_ago_in_s</strong> is only 0.57 seconds, which means that <strong>max_loaded_at</strong> is a value that looks like the current time, and it appears that the data was not obtained correctly.</p><p>Now we should check the code behind source freshness. This source freshness via metadata method is defined in the adapter class and is as follows.</p><pre># source code<br># https://github.com/dbt-labs/dbt-bigquery/blob/v1.8.2/dbt/adapters/bigquery/impl.py#L726-L744<br><br>    def calculate_freshness_from_metadata(<br>        self,<br>        source: BaseRelation,<br>        macro_resolver: Optional[MacroResolverProtocol] = None,<br>    ) -&gt; Tuple[Optional[AdapterResponse], FreshnessResponse]:<br>        conn = self.connections.get_thread_connection()<br>        client: google.cloud.bigquery.Client = conn.handle<br><br>        table_ref = self.get_table_ref_from_relation(source)<br>        table = client.get_table(table_ref)<br>        snapshot = datetime.now(tz=pytz.UTC)<br><br>        freshness = FreshnessResponse(<br>            max_loaded_at=table.modified,<br>            snapshotted_at=snapshot,<br>            age=(snapshot - table.modified).total_seconds(),<br>        )<br><br>        return None, freshness</pre><p>Until I looked at the source code, I guessed that it was retrieved from INFORMATION_SCHEMA data, but in fact, a <strong>Table</strong> instance is retrieved from the BigQuery API using the <strong>get_table</strong> method, and <strong>max_loaded_at</strong> uses a <strong>modified </strong>property.</p><p>Also, based on the usage of the BaseRelation class that holds the path of the table, it can be inferred that passing a source table with a wildcard will not work correctly, since this method seems intended to get the update time from the metadata of a single table, not multiple tables.</p><p>As for why the current time is returned, the main cause is BigQuery API. If you run the following code, you can reproduce that the current time is returned.</p><pre>from google.cloud import bigquery<br><br>client = bigquery.Client(project=&quot;your-project&quot;)<br><br>table_ref = client.dataset(&quot;your_dataset&quot;).table(&quot;dummy_*&quot;)<br>table = client.get_table(table_ref)<br><br>print(table.modified)</pre><p>After I created <a href="https://github.com/googleapis/python-bigquery/issues/2035">an issue</a> on the python-bigQuery repository and asked about this seemingly strange behavior, they told me that the <strong>get_table</strong> method is designed to create a temporary table that merges a set of matched tables when a wild-carted string is passed. In other words, the modified property returns the current time as the modification time of the temporary table created at the time of the request.</p><p>Since this bigquery API implementation seems not to be taken into account on the method in dbt-bigquery, I have also reported this to the dbt-bigquery repository as <a href="https://github.com/dbt-labs/dbt-bigquery/issues/1363">an issue</a> as well.</p><h3>Conclusion</h3><p>Although we completely ignored the specific implementation on the dbt-core this time, even a simple understanding of the dependencies between libraries would have made the source code easier to decipher.</p><p>Also, since large open source code like dbt is highly organized and readable, reading the code will help you write good code yourself as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=906035fdbf6d" width="1" height="1" alt=""><hr><p><a href="https://blog.dataengineerthings.org/understanding-dbt-from-the-code-906035fdbf6d">Understanding dbt from the code to reveal hidden functionality</a> was originally published in <a href="https://blog.dataengineerthings.org/">Data Engineer Things</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multiple Service Accounts Now Available in dbt Cloud’s Team Plan]]></title>
            <link>https://blog.devgenius.io/multiple-service-accounts-now-available-in-dbt-clouds-team-plan-d28d1aa475d0?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d28d1aa475d0</guid>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics-engineering]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[bigquery]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Wed, 09 Oct 2024 17:42:22 GMT</pubDate>
            <atom:updated>2024-10-15T00:38:51.418Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.getdbt.com/product/dbt-cloud">dbt cloud</a> is a tool that allows us to execute the data transformation process in a more managed way compared to the oss dbt core.</p><p>Recently, there was <a href="https://docs.getdbt.com/docs/dbt-versions/dbt-cloud-release-notes">an update</a> regarding the connections resource, which manages the connection settings with DWH in the dbt cloud.</p><blockquote>New: Connections are now available under Account settings as a global setting. Previously, they were found under Project settings. This is being rolled out in phases over the coming weeks.</blockquote><p>The connection resource has been moved from project settings to account settings. Along with this change, the restriction of having only one connection (service account) per dbt cloud project has been lifted. This change is quite significant for the users with Team Plan, in which the number of dbt cloud projects is restricted to one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uO0zPgxkdKdmVtF08rzeFw.jpeg" /><figcaption><em>A new Connections tab has been added</em></figcaption></figure><p>Previously, we could set up only one service account per dbt cloud project. In this situation, we have to share the same service account with both developments in the dbt cloud IDE and job execution by the scheduler.</p><p>Although it was possible to separate the output environment using features like the target variable, there was a risk of executing queries against the production environment from the dbt cloud IDE if users modified the settings. This raised governance concerns.</p><p>To set multiple service accounts, one had to subscribe to the Enterprise Plan to create another project and environment. However, with this update, it is now possible to set multiple service accounts even with the Team Plan.</p><p>The linkage between jobs, IDE, and connections is done via the Environments resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ViS5UCLo-kNAP-NSxvoJeQ.jpeg" /><figcaption><em>You can select the connection to use when editing the environment</em></figcaption></figure><p>Now you can separate the execution environments for the IDE and jobs with new connection settings. Moreover, you can also configure the Slim CI job that runs when creating a Pull Request. For this job, you can specify the staging environment in the dbt cloud and the development DWH project as the execution environment.</p><p>This update is already reflected in <a href="https://registry.terraform.io/providers/dbt-labs/dbtcloud/latest/docs">the Terraform provider</a>, and you can configure it with the following code:</p><pre>resource &quot;dbtcloud_global_connection&quot; &quot;bigquery&quot; {<br>  name = &quot;My BigQuery connection&quot;<br>  bigquery = {<br>    gcp_project_id              = &quot;my-gcp-project-id&quot;<br>    timeout_seconds             = 1000<br>    private_key_id              = &quot;my-private-key-id&quot;<br>    private_key                 = &quot;ABCDEFGHIJKL&quot;<br>    client_email                = &quot;my_client_email&quot;<br>    client_id                   = &quot;my_client_id&quot;<br>    auth_uri                    = &quot;my_auth_uri&quot;<br>    token_uri                   = &quot;my_token_uri&quot;<br>    auth_provider_x509_cert_url = &quot;my_auth_provider_x509_cert_url&quot;<br>    client_x509_cert_url        = &quot;my_client_x509_cert_url&quot;<br>    application_id              = &quot;oauth_application_id&quot;<br>    application_secret          = &quot;oauth_secret_id&quot;<br>  }<br>}<br><br>resource &quot;dbtcloud_environment&quot; &quot;ci_environment&quot; {<br>  dbt_version   = &quot;versionless&quot;<br>  name          = &quot;CI&quot;<br>  project_id    = dbtcloud_project.dbt_project.id<br>  type          = &quot;deployment&quot;<br>  credential_id = dbtcloud_bigquery_credential.ci_credential.credential_id<br>  connection_id = dbtcloud_global_connection.bigquery.id<br>}</pre><p>A few years ago, the dbt cloud had only minimal features, but with frequent updates, it has now become a sufficiently capable data orchestration tool.</p><h4>References</h4><p><a href="https://docs.getdbt.com/docs/cloud/connect-data-platform/about-connections#connection-management">https://docs.getdbt.com/docs/cloud/connect-data-platform/about-connections#connection-management</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d28d1aa475d0" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/multiple-service-accounts-now-available-in-dbt-clouds-team-plan-d28d1aa475d0">Multiple Service Accounts Now Available in dbt Cloud’s Team Plan</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Fix an Error in the DBT Command with the Empty Flag Due to _TABLE_SUFFIX or _PARTITIONTIME]]></title>
            <link>https://medium.com/art-of-data-engineering/how-to-fix-an-error-in-the-dbt-command-with-the-empty-flag-due-to-table-suffix-or-partitiontime-1ca8dad8af06?source=rss-7b298c7cfdfc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ca8dad8af06</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics-engineering]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[bigquery]]></category>
            <dc:creator><![CDATA[Fumiaki Kobayashi]]></dc:creator>
            <pubDate>Thu, 18 Jul 2024 14:34:11 GMT</pubDate>
            <atom:updated>2024-11-01T13:00:13.660Z</atom:updated>
            <content:encoded><![CDATA[<h4>Utilize dbt variables to fix the error</h4><p>Since dbt core 1.8, the empty flag that allows us to create empty resources has been added.</p><p><a href="https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.8#the---empty-flag">Upgrading to v1.8 (latest) | dbt Developer Hub</a></p><p>When this flag is specified, a condition limit 0 is added to your query, which means that the output will be empty as well as there will be no cost of the scanning.</p><p>This function can be used in a variety of ways, for example,</p><ul><li>You have written some new queries and want to check that the all of SELECT statements are valid within 30 seconds.</li><li>You want to write a yaml with dbt-osmosis, so you want to create empty tables.</li></ul><p>I often hesitate to repeatedly execute queries that require a lot of analysis cost in DWH for debugging, so I am grateful for such cost-saving features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bAgTeDwoy7cSqoPf" /><figcaption>Photo by <a href="https://unsplash.com/@__b_d__?utm_source=medium&amp;utm_medium=referral">Bobby Donald</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>However, you need to be careful when using this feature in the case of queries that select pseudo-columns such as _TABLE_SUFFIX and _PARTITIONTIME in BigQuery.</p><p>For example, suppose we have the following model.</p><pre>SELECT<br>  *<br>FROM<br>  {{ source(&quot;ga4&quot;, &quot;events_*&quot;) }}<br>WHERE<br>  _TABLE_SUFFIX BETWEEN FORMAT_DATE(&quot;%Y%m%d&quot;, CURRENT_DATE(&quot;+9&quot;) -3 )<br>  AND FORMAT_DATE(&quot;%Y%m%d&quot;, CURRENT_DATE(&quot;+9&quot;))</pre><p>Running dbt run with the empty flag on this model results in the following error.</p><pre>Unrecognized name: _TABLE_SUFFIX at [6:3]</pre><p>To investigate the error, Let’s look at the compiled query.</p><pre>SELECT<br>  *<br>FROM<br>  (select * from `bigquery-public-data`.`ga4_obfuscated_sample_ecommerce`.`events_*` where false limit 0)<br>WHERE<br>  _TABLE_SUFFIX BETWEEN FORMAT_DATE(&quot;%Y%m%d&quot;, CURRENT_DATE(&quot;+9&quot;) -3 )<br>  AND FORMAT_DATE(&quot;%Y%m%d&quot;, CURRENT_DATE(&quot;+9&quot;))</pre><p>You can see that when adding the empty flag, the data source referenced by source or ref is wrapped as a subquery with limit 0.</p><p>Since the pseudo column is no longer retained after the subquery select * is executed, it is no longer possible to select _TABLE_SUFFIX in subsequent queries. That is the cause of the error.</p><p>This behavior was reported immediately after the 1.8 release. In fact, this behavior is not a bug, and therefore, a workaround should be considered.</p><p><a href="https://github.com/dbt-labs/dbt-bigquery/issues/1243">[Bug] --empty flag not working on Pseudo-columns · Issue #1243 · dbt-labs/dbt-bigquery</a></p><p>A simple way to handle this is to use flags, a variable that can be used in Jinja to determine whether or not cli options are specified.</p><ul><li><a href="https://github.com/dbt-labs/dbt-core/issues/10152">[Feature] `--empty` flag should be exposed in `flags` variable · Issue #10152 · dbt-labs/dbt-core</a></li><li><a href="https://docs.getdbt.com/reference/dbt-jinja-functions/flags">About flags variable | dbt Developer Hub</a></li></ul><p>We need to look at <a href="https://github.com/dbt-labs/dbt-core/blob/4c7d922a6da0d4c63980115f0fc46296b80e191d/core/dbt/context/base.py#L656">the dbt-core code</a> to understand the details, but we can see that True/False is stored as the return value of flagsand thus can be used in the same way as is_incremental().</p><p>If the scan amount becomes zero by the emptyflag, there is no need to filter by _TABLE_SUFFIX, so all we need to do is to use this variable to not refer to _TABLE_SUFFIX if the emptyflag is specified.</p><pre>SELECT<br>  *<br>FROM<br>  {{ source(&quot;ga4&quot;, &quot;events_*&quot;) }}<br>{% if not flags.EMPTY %}<br>WHERE<br>  _TABLE_SUFFIX BETWEEN FORMAT_DATE(&quot;%Y%m%d&quot;, CURRENT_DATE(&quot;+9&quot;) -3 )<br>  AND FORMAT_DATE(&quot;%Y%m%d&quot;, CURRENT_DATE(&quot;+9&quot;))<br>{% endif %}</pre><p>Nevertheless, there is a slight problem with this method: the query that has require_partition_filter = true and uses _PARTITIONTIME as the partition column still cannot be executed.</p><p>In that case, There are still some other solutions you can take:</p><ul><li>remove require_partition_filter</li><li>specify a real data column as the partition column instead of using a pseudo-column partition</li><li>rewrite the behavior of empty flag in combination with other Jinja functions as described in <a href="https://github.com/dbt-labs/dbt-bigquery/issues/1243#issuecomment-2115120778">the comments in the issue</a>.</li></ul><p>However, a better method may be available by the time dbt core 1.9 is released since dbt-core is updated quickly.</p><p>In addition, while these dbt-specific variables and functions are useful and utilizing them makes us feel smarter, you are careful of using them excessively because the learning cost of new members rapidly increases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ca8dad8af06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/art-of-data-engineering/how-to-fix-an-error-in-the-dbt-command-with-the-empty-flag-due-to-table-suffix-or-partitiontime-1ca8dad8af06">How to Fix an Error in the DBT Command with the Empty Flag Due to _TABLE_SUFFIX or _PARTITIONTIME</a> was originally published in <a href="https://medium.com/art-of-data-engineering">Art of Data Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>