---
title: dbtCloudとdbtCoreのハイブリッド利用
description: dbtCoreとdbtCloudのハイブリッド利用方法を紹介します。dbtCoreで開発し、dbtCloudでデプロイすることで、開発メンバーが無料で開発でき、コスト削減になります。是非お試しください。
image: https://knowledge.insight-lab.co.jp/hubfs/dbt-signature_tm_navy.png
---

[![BI-LAB_01](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/BI-LAB_01.png?width=800&height=220&name=BI-LAB_01.png) ![BI-LAB_01](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/BI-LAB_01.png?width=800&height=220&name=BI-LAB_01.png)](https://knowledge.insight-lab.co.jp/bi)

[![ご相談・お問い合わせ](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/5935783/interactive-160578501294.png)](https://knowledge.insight-lab.co.jp/hs/cta/wi/redirect?encryptedPayload=AVxigLJKKWtiJlNM3jPeESp8km9kLSuLBG%2FSDALfzTMsBGdoDnFs2kb%2Bz1mC5V7P7Ueo%2FsRZZj6TycG0xID%2FOS4R78VcuOrZobGaQ3AaHDjm483FdyplsPAX94TJNjgeg8fX4WRyNg6G6Pdn6aI8B7HPqs%2FWMhYZjMx1z143ds%2BvCoDCzknpjZUIF7Jl&webInteractiveContentId=160578501294&portalId=5935783)

<https://knowledge.insight-lab.co.jp/bi/dbtcloud-and-dbtcore#tmpmodule_159469655889724>

- サービス紹介
    - [DATA-TERASU](https://service.insight-lab.co.jp/data-terasu)
    - [DATA-CONPASS](https://service.insight-lab.co.jp/data-conpass)
    - [Data Analytics Dojo](https://service.insight-lab.co.jp/data-DOJO)
- 取り扱い製品
    - [Snowflake](https://service.insight-lab.co.jp/snowflake)
    - [dbt](https://service.insight-lab.co.jp/dbt)
    - [TROCCO](https://service.insight-lab.co.jp/TROCCO)
    - [Qlik](https://service.insight-lab.co.jp/Qlik)
    - [Vizlib](https://service.insight-lab.co.jp/Vizlib)
    - [Sisense](https://service.insight-lab.co.jp/sisense)
    - [Tableau](https://service.insight-lab.co.jp/Tableau)
- [導入事例](https://solution.insight-lab.co.jp/bi/download-case-studies)
- [お役立ち資料](https://download.insight-lab.co.jp/bi/download)
- [ニュース](https://knowledge.insight-lab.co.jp/bi/tag/%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B9)

###### 3 分で読むことができます。

# [dbtCloudとdbtCoreのハイブリッド利用](https://knowledge.insight-lab.co.jp/bi/dbtcloud-and-dbtcore)

 執筆者 [uta](https://knowledge.insight-lab.co.jp/bi/author/uta) 更新日時 2023年12月29日

###### Topics: [dbtCore](https://knowledge.insight-lab.co.jp/bi/tag/dbtcore) [dbtCloud](https://knowledge.insight-lab.co.jp/bi/tag/dbtcloud)

![](https://knowledge.insight-lab.co.jp/hubfs/dbt-signature_tm_navy.png)

 目次

## はじめに

---

dbtにはOSS版の「dbtCore」とSaaS版の「dbtCloud」があります。

dbtCoreは無料かつ開発を楽にするPythonライブラリを使用できますが、dbtCloudのデプロイ機能やCI機能などが搭載されていません。

しかし、dbtCloudでは、dbt-osmosisといったdbt用のPythonライブラリが使えず、複数人で開発するケースだと、1シート(ユーザ)あたり100ドルかかってしまいます。

実は、dbtCloudで初期化したリポジトリをdbtCoreでクローンし、profiles.yml等の認証設定ファイルを設定するだけで、dbtCloudとdbtCoreを併用して開発・デプロイすることができてしまいます。

 

## 前提

- 先にdbtCloudでプロジェクトを作成している
- バージョン管理はGitHubを使用

 

## 環境

- dbtCloud
- dbtCore（今回はDockerですがPythonが使えればローカルやvenvでも○）
- VSCode
- GitHub
- Snowflake

 

## 事前準備

- GitHubで空のリポジトリを作成

 

## 環境構築

### dbtCloud

作成したリポジトリを元にdbtプロジェクトを作成、初期化します。

 

### ブランチ作成

以下の作業ブランチを使用します。

- main
- dev\_dbtcore（GitHubから作成）
- dev\_dbtcloud（dbtCloudから作成）

![branches](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/branches.png?width=709&height=334&name=branches.png)

 

### dbtCore

dbtCoreの環境構築は、以下記事のGit連携まで進めます。  
[https://knowledge.insight-lab.co.jp/bi/-dbtcore-simple-start](https://knowledge.insight-lab.co.jp/bi/-dbtcore-simple-start)

 

この記事の中で、CLONEするgitリポジトリをdbtCloudで初期化したリポジトリで行います。

> git clone xxxxxxx.git

※ユーザ名とトークンを入力

 

dbtCoreをインストールします。

> python -m pip install dbt-snowflake

![dbtcore_install](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbtcore_install.png?width=2000&height=397&name=dbtcore_install.png)

 

~/.dbt/profiles.ymlを作成

> my\_new\_project:  
>   target: dev  
>   outputs:  
>     dev:  
>       type: snowflake  
>       account: xxxxxxxxx.ap-northeast-1.aws  
>       database: xxxxxxxxxxxx  
>       password: xxxxxxxxxxxx  
>       role: xxxxxxxxxxxx  
>       schema: dev\_uta  
>       user: xxxxxxxxxxxx  
>       warehouse: xxxxxxxxxxxx

 

ブランチをdev\_dbtcoreに切り替えます。

![branche_checkout](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/branche_checkout.png?width=727&height=180&name=branche_checkout.png)

 

dbtCloudで既にinitしているため、profile設定が’default’になっています。ここをprofiles.ymlに設定した名称に変更します。

![dbt_project](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbt_project.png?width=566&height=324&name=dbt_project.png)

 

以下のコマンドを実行し、dbtCoreの設定に不足なく正しく動作する状態か確認します。

> dbt debug

![dbtcore_debug](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbtcore_debug.png?width=514&height=198&name=dbtcore_debug.png)

 

## 実行確認

 

### dbtCore

dbtCloudで作成していたモデルを実行してみます。

> dbt run --select stg\_sale

![dbt_run](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbt_run.png?width=2000&height=637&name=dbt_run.png)

 

Snowflake側にモデルのSQLが実行されています。

![dbt_results](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbt_results.png?width=2000&height=961&name=dbt_results.png)

 

### GitHub

変更をCommit/Syncします。

![commit](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/commit.png?width=538&height=237&name=commit.png)

 

GitHubを確認すると、origin/dev\_dbtcoreに変更が来ているので、プルリクを作成。

![pull_request](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/pull_request.png?width=612&height=141&name=pull_request.png)

 

mainブランチにマージします。

![merge](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/merge.png?width=543&height=310&name=merge.png)

 

### dbtCloud

mainブランチへのマージが完了すると、Version controlがPull fom “main”に変わります。

![dbtcloud_pull](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbtcloud_pull.png?width=2000&height=502&name=dbtcloud_pull.png)

 

Pullが完了するとprofileの記述が、dbtCoreで編集した内容に変更されます。

![dbtcloud_results](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/dbtcloud_results.png?width=2000&height=510&name=dbtcloud_results.png)

 

## おわりに

今回は、dbtCloudで使用していたリポジトリをDockerコンテナ上でクローンし、dbtCoreとdbtCloudの両方で併用できるか検証しました。

dbtCoreで開発し、dbtCloudでデプロイするといったハイブリッドな利用ができると、開発メンバーが何人いても無料で開発を行い、デプロイはdbtCloud1アカウントの契約だけで利用できるので、コスト削減になります。

また、dbtCoreで開発作業ができると、dbt開発を加速させるPythonライブラリを使用することができるので、是非お試し下さい。

 

BIツールを体験してみませんか？

INSIGHT LABでは、BIツールの無料紹介セミナー（動画）を配信しています。初めてBIツールをご利用される方を対象に、BIツールの概要や、複数あるBIツールの違いについて分かりやすくご説明いたします。

[![セミナー一覧はこちら](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/5935783/28023fdf-0a76-48bf-9815-43744ce7a2b2.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/5935783/28023fdf-0a76-48bf-9815-43744ce7a2b2)

- [Tweet](https://twitter.com/share)

![uta](https://knowledge.insight-lab.co.jp/hubfs/IMG_4095.jpg)

#### 執筆者 [uta](https://knowledge.insight-lab.co.jp/bi/author/uta)

野良猫を見かけると追わずにはいられません。

###### [前の投稿](https://knowledge.insight-lab.co.jp/bi/-dagster-simple-start-dbt-snowflake)

[![](https://knowledge.insight-lab.co.jp/hubfs/dagster-primary-horizontal.png)](https://knowledge.insight-lab.co.jp/bi/-dagster-simple-start-dbt-snowflake)

###### [【dagster】環境構築からモデル実行までをシンプルにやってみる（dbtCore+Snowflake）](https://knowledge.insight-lab.co.jp/bi/-dagster-simple-start-dbt-snowflake)

###### [次の投稿](https://knowledge.insight-lab.co.jp/bi/-notion-personal-best-practices)

[![](https://knowledge.insight-lab.co.jp/hubfs/notion-logo.png)](https://knowledge.insight-lab.co.jp/bi/-notion-personal-best-practices)

###### [【Notion】継続的な運用を見据えたページ配置と構成の個人的ベストプラクティス](https://knowledge.insight-lab.co.jp/bi/-notion-personal-best-practices)

 

## 最新記事

<https://knowledge.insight-lab.co.jp/bi/databricks-update-june>

###### 5 分で読むことができます。

#### [【2026年6月版】ビジネス視点で紐解くDatabricks最新機能！現場のデータ運用が劇的に楽になるポイント解説](https://knowledge.insight-lab.co.jp/bi/databricks-update-june)

###### 2026年 7月 5日

<https://knowledge.insight-lab.co.jp/bi/ai-reality-tour-tokyo-2026>

###### 2 分で読むことができます。

#### [AI Reality Tour Tokyo 2026にブース出展いたします！](https://knowledge.insight-lab.co.jp/bi/ai-reality-tour-tokyo-2026)

###### 2026年 6月 8日

<https://knowledge.insight-lab.co.jp/bi/semantic-layer-game-kpi>

###### 7 分で読むことができます。

#### [ゲーム運営でのデータ分析を次のステージへ。KPI共通化と定義管理の効率化を実現する「セマンティックレイヤー」の重要性](https://knowledge.insight-lab.co.jp/bi/semantic-layer-game-kpi)

###### 2026年 5月 29日

##### サービス

サービス

- [DATA-CONPASS](https://service.insight-lab.co.jp/data-conpass)
- [DATA-TERASU](https://service.insight-lab.co.jp/data-terasu)
- [DATA-ANALYTICS-DOJO](https://service.insight-lab.co.jp/data-analytics-dojo)
- [Data Knowledge Library](https://knowledge.insight-lab.co.jp/)
- [セミナーアーカイブ](https://download.insight-lab.co.jp/seminar-archive)

##### データ活用ツール

データ活用ツール

- [Snowflake](https://service.insight-lab.co.jp/snowflake)
- [dbt](https://service.insight-lab.co.jp/dbt)
- [TROCCO](https://service.insight-lab.co.jp/TROCCO)
- [Qlik](https://service.insight-lab.co.jp/Qlik)
- [Vizlib](https://service.insight-lab.co.jp/Vizlib)
- [Sisense](https://service.insight-lab.co.jp/sisense)
- [Tableau](https://service.insight-lab.co.jp/Tableau)

##### 実績・事例

実績・事例

- [トヨタ自動車北海道](https://download.insight-lab.co.jp/bi/case-studies/toyota)
- [テレビ東京コミュニケーションズ](https://download.insight-lab.co.jp/bi/case-studies/tv-tokyo)
- [プラントフォーム](https://download.insight-lab.co.jp/bi/case-studies/plantform)
- [スタイルブレッド](https://download.insight-lab.co.jp/ja/bi/case-studies/style-bread)
- [協和企画](https://download.insight-lab.co.jp/bi/case-studies/kk)
- [Jマテ．カッパープロダクツ](https://listen-web.com/story/isao-tooyama2/)

##### 運営会社

運営会社

- [会社概要](https://insight-lab.co.jp/about/)
- [サイト運営責任者](https://twitter.com/Kajiwara81)
- [お問い合わせ](https://contact.insight-lab.co.jp/main)

[![Logo_yoko_C+W-1](https://knowledge.insight-lab.co.jp/hs-fs/hubfs/Logo_yoko_C+W-1.png?width=500&height=133&name=Logo_yoko_C+W-1.png "Logo_yoko_C+W-1")](https://www.insight-lab.co.jp/)

- [個人情報保護方針/個人情報の取り扱いについて](https://insight-lab.co.jp/privacy/)

Copyright © ＩＮＳＩＧＨＴ ＬＡＢ, Inc．All Rights Reserved.

<https://twitter.com/INSIGHTLAB_INC><https://www.youtube.com/channel/UCOKNKiO4uuza4NioSZpBMhg/featured>

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "uta",
    "url" : "https://knowledge.insight-lab.co.jp/bi/author/uta"
  },
  "dateModified" : "2023-12-29T05:41:58.136Z",
  "datePublished" : "2023-12-29T05:41:58.000Z",
  "headline" : "dbtCloudとdbtCoreのハイブリッド利用",
  "image" : [ "https://knowledge.insight-lab.co.jp/hubfs/dbt-signature_tm_navy.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://knowledge.insight-lab.co.jp/bi/dbtcloud-and-dbtcore",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://knowledge.insight-lab.co.jp/hubfs/Logo_tate-2.png"
    },
    "name" : "INSIGHT LAB"
  }
}
```