Start of Main Content

We’re only one month into 2025 and the biggest dbt Labs headline is their acquisition of Luka Dončić. Sorry, I meant SDF Labs. We're excited about dbt Labs' acquisition of SDF Labs, but we’re also excited about some new dbt Labs features from a data engineering perspective.

One feature, in particular, is the new dbt invocation command. Invocation is a nifty new dbt Cloud CLI command that helps analytics engineers debug active running dbt commands such as run and build. This is a helpful feature for identifying long-running nodes when working with the dbt Cloud CLI. We'll dive into this dbt feature and give a quick scenario on adding invocation to your data ops workflow.

Diagram of how the dbt Cloud CLI works with dbt Cloud's infrastructure to run dbt commands from your local command line.
Image courtesy of dbt Labs

As we mentioned, dbt invocation is a dbt Cloud CLI command that lists active running dbt commands. The “active running” part is key — invocation is a real-time, in-the-moment debugging command for your friendly multitasking analytics engineer. Before you can run it, you’ll want to update to the latest version of dbt Cloud CLI. If you already have the Cloud CLI version installed — this is as easy as running brew upgrade dbt.

A command line screenshot of the upgrade process for dbt Cloud CLI.

Once you’ve upgraded your dbt Cloud CLI you can check out the help command for invocation. Presently, when you run dbt invocation help, the only command under invocation is list. If you run the dbt invocation list command while there are no active runs — it will return an empty list.

A command line screenshot of dbt invocation commands and help on using them.
Image courtesy of dbt Labs

Here’s a real-world scenario where you’d use dbt invocation:

  • Environment — Your dbt project is on dbt Cloud.
  • Developer — You have cloned your project locally and are running commands via the dbt Cloud CLI.
  • Situation — You are working on multiple workstreams with a fair share of context-switching.

You then run a dbt build and get the Session occupied message:

A command line screenshot with the message "Session occupied."

Your first thought of course is “Oh great - what SQL queries are hanging?” Your second thought is “What other select statements could be running?” Your next thought would be to just close all your terminal windows and delete all your code. Now with the dbt invocation list — you can find that hanging invocation that’s blocking your session.

A command line screenshot that shows a dbt invocation list with an active running invocation.

The results indicate that you have an invocation dbt build --select config.materialized:table+ that's still running in the background. If you decide to stop this invocation — you can run dbt cancel to end the job.

 

 

Get help with your dbt debugging.

Our analytics engineers can help you troubleshoot any issues you might be experiencing and show you more ways the dbt invocation feature can assist you in the dbt Cloud CLI.

For analytics engineers like me, this is a neat little command. Since I sometimes use the dbt Cloud CLI, I don’t get all the nice UI elements from working with dbt Cloud natively. I can definitely add this to my workflow, but I see room for this feature to grow. Here are two possible paths:

  1. Instead of just having the Session occupied error appear when an invocation fails, just put the results of the dbt invocation list in the error message. That would remove the burden on engineers to run the invocation command right after.
  2. dbt Labs expands on the invocation command further to see invocations from other sessions besides your own. I could see analytics engineers using it to find long-running production, CI, or staging queries when they're outside of the dbt Cloud UI.

dbt invocation is a great way to understand what commands are currently running in your dbt Cloud CLI. This feature is a promising signal for dbt Labs' focus on the user experience and tools for analytics engineers who are used to the dbt core experience. As someone who's used dbt core in the past for data transformations, I’m curious to see how the command evolves in the future and how dbt Labs levels up the dbt Cloud CLI experience as it grows with the modern data stack.

If you’re and data practitioner looking for help with their data platform and are interested in learning more about dbt, we have a team of analytics engineers here at Brooklyn Data who are excited to chat with you about it. Just reach out to start the conversation.

Note: Brooklyn Data did not acquire Luka Dončić (yet) and he's (probably) not the data analytics engineer most companies are after. Though Luka if you're reading, I'd love to have you as an analyst in our data org.

 

Published:
  • Data and Analytics Engineering
  • Data Tooling Optimization
  • dbt Labs
  • dbt

Take advantage of our expertise on your next project