2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DatabricksにおけるClaude Codeのネイティブサポート

Posted at

Claude Code普段使いの自分にとってはこれは嬉しい。

モデルサービングのページにアクセスすると、見慣れないコーディングエージェントを統合のパネルが。

Screenshot 2025-10-21 at 11.28.05.png

Get Startedをクリックすると右側にパネルが開きます。
Screenshot 2025-10-21 at 11.28.35.png

なお、設定にはパーソナルアクセストークンが必要です。
Screenshot 2025-10-21 at 11.49.16.png

デフォルトのモデルを選択します。設定に応じて下の~/.claude/settings.jsonが更新されますのでコピーします。
Screenshot 2025-10-21 at 11.29.00.png

Claude Codeのマニュアルに従って、ローカルマシンで~/.claude/settings.jsonを編集します。私は以下ような設定にしています。

~/.claude/settings.json
{
  "env": {
        "ANTHROPIC_MODEL": "databricks-claude-sonnet-4-5",
        "ANTHROPIC_BASE_URL": "https://xxxxx.cloud.databricks.com/serving-endpoints/anthropic",
        "ANTHROPIC_AUTH_TOKEN": "<Databricksパーソナルアクセストークン>",
        "ANTHROPIC_DEFAULT_OPUS_MODEL": "databricks-claude-opus-4-1"
  },
  "hooks": {
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "/usr/bin/afplay /System/Library/Sounds/Glass.aiff"
          }
        ]
      }
    ]
  }
}

Claude Codeを起動します。

claude

おおー、Databricks上のdatabricks-claude-sonnet-4-5が表示されています。
Screenshot 2025-10-21 at 11.40.06.png

念のため質問してみます。
Screenshot 2025-10-21 at 11.41.37.png

さらにシステムテーブルでも確認してみます。

SELECT 
  eu.*,
  convert_timezone('UTC', 'Asia/Tokyo', eu.request_time) AS request_time_jst,
  se.endpoint_name 
FROM system.serving.endpoint_usage eu
JOIN system.serving.served_entities se
  ON eu.served_entity_id = se.served_entity_id
WHERE eu.requester = "takaaki.yayoi@databricks.com"
ORDER BY eu.request_time DESC
LIMIT 10

呼び出されてますね。
Screenshot 2025-10-21 at 12.00.10.png

上はClaude Codeの設定例ですが、多分Cursorとかでもいけるのではないでしょうか。

はじめてのDatabricks

はじめてのDatabricks

Databricks無料トライアル

Databricks無料トライアル

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?