From 3390c4c600e87fb336f7e7dee6f8174c67f71983 Mon Sep 17 00:00:00 2001 From: anandgupta42 Date: Sun, 20 Jul 2025 15:46:25 -0700 Subject: [PATCH] feat: Add dbt fusion integration option (#1712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added support for "fusion" as a dbtIntegration option that uses the cloud CLI integration. This allows users with dbt fusion installed to select it as their integration type. Changes: - Added "fusion" to the dbtIntegration enum in package.json - Updated DBTProject to use cloud integration for fusion mode - Updated DBTClient detection to use cloud detection for fusion - Updated status bar to display "dbt fusion" when fusion is selected - Updated walkthrough commands to use cloud installation for fusion The fusion integration reuses the existing cloud CLI infrastructure since dbt fusion is based on the cloud CLI architecture. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- package.json | 5 +++-- src/commands/walkthroughCommands.ts | 21 +++++++++++++-------- src/dbt_client/index.ts | 2 ++ src/manifest/dbtProject.ts | 2 ++ src/statusbar/versionStatusBar.ts | 9 ++++++++- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index cf0d54ad1..ca2283e32 100644 --- a/package.json +++ b/package.json @@ -109,10 +109,11 @@ "type": "string", "enum": [ "core", - "cloud" + "cloud", + "fusion" ], "default": "core", - "description": "Select dbt core or dbt cloud" + "description": "Select dbt core, dbt cloud, or dbt fusion" }, "dbt.dbtPythonPathOverride": { "type": "string", diff --git a/src/commands/walkthroughCommands.ts b/src/commands/walkthroughCommands.ts index a71a7fbd8..b1539cb0e 100644 --- a/src/commands/walkthroughCommands.ts +++ b/src/commands/walkthroughCommands.ts @@ -128,14 +128,19 @@ export class WalkthroughCommands { } async installDbt(): Promise { - if ( - workspace - .getConfiguration("dbt") - .get("dbtIntegration", "core") === "cloud" - ) { - this.installDbtCloud(); - } else { - this.installDbtCore(); + const dbtIntegration = workspace + .getConfiguration("dbt") + .get("dbtIntegration", "core"); + + switch (dbtIntegration) { + case "cloud": + case "fusion": + // Fusion uses cloud CLI installation for now + this.installDbtCloud(); + break; + default: + this.installDbtCore(); + break; } } diff --git a/src/dbt_client/index.ts b/src/dbt_client/index.ts index 95486c5cb..7e4c5eef0 100644 --- a/src/dbt_client/index.ts +++ b/src/dbt_client/index.ts @@ -48,6 +48,8 @@ export class DBTClient implements Disposable { switch (this.dbtIntegrationMode) { case "cloud": + case "fusion": + // Fusion uses the same detection as cloud for now this.dbtDetection = this.dbtCloudDetection; break; default: diff --git a/src/manifest/dbtProject.ts b/src/manifest/dbtProject.ts index 68349bb5b..9bbd27ae9 100644 --- a/src/manifest/dbtProject.ts +++ b/src/manifest/dbtProject.ts @@ -137,6 +137,8 @@ export class DBTProject implements Disposable { switch (dbtIntegrationMode) { case "cloud": + case "fusion": + // Fusion uses the same integration as cloud for now this.dbtProjectIntegration = this.dbtCloudIntegrationFactory( this.projectRoot, ); diff --git a/src/statusbar/versionStatusBar.ts b/src/statusbar/versionStatusBar.ts index 2463aef4f..a2d167253 100755 --- a/src/statusbar/versionStatusBar.ts +++ b/src/statusbar/versionStatusBar.ts @@ -45,7 +45,14 @@ export class VersionStatusBar implements Disposable { const dbtIntegrationMode = workspace .getConfiguration("dbt") .get("dbtIntegration", "core"); - return dbtIntegrationMode === "cloud" ? "dbt cloud" : "dbt core"; + switch (dbtIntegrationMode) { + case "cloud": + return "dbt cloud"; + case "fusion": + return "dbt fusion"; + default: + return "dbt core"; + } } private onRebuildManifestStatusChange(