Databricksの操作とDatabricks CLIの親スキル(エントリーポイント)です。認証、プロファイル選択、バンドル(設定パッケージ)の管理に対応しています。 CLIの操作、認証、プロファイル設定、バンドルタスクを行う場合は、まずこのスキルを読み込んでから、対応する各製品スキルを読み込んでください。 データの検索や閲覧、データに関する質問への回答、SQLの生成を行う場合は、databricks-data-discovery スキルを読み込んでください(Genie Oneへのルーティングに対応)。 Databricks関連のCLIタスクについて、最新のガイドラインを含みます。
Databricks CLI operations and the parent/entry-point skill for Databricks CLI use: authentication, profile selection, and bundles. Load this first for CLI, auth, profile, and bundle tasks, then load the matching product skill. For finding or exploring data, answering questions about the data, or generating SQL, load the databricks-data-discovery skill (it routes to Genie One). Contains up-to-date guidelines for Databricks-related CLI tasks.
Databricks CLI(コマンドラインツール)、認証、データ探索の基本スキルです。
特定の製品については、以下の専用スキルを使用してください:
データの発見、探索、クエリ生成(テーブルの検索、データについての自然言語質問への回答、SQL生成など)には、databricks-data-discovery を使用してください(まず Genie One に問い合わせ、次に手動探索にフォールバック)。インストールされていない場合は、下記の AI ツールコマンドと手動データ探索を使用してください。
CLI がインストール済み: databricks --version で確認します。
DATABRICKS_HOST および DATABRICKS_TOKEN 環境変数を使用した直接 REST API 呼び出しへのフォールバックをユーザーに提案してください。Databricks REST API ドキュメントを参照してください。認証済み: databricks auth profiles
プロフィールを自動選択しないでください。
databricks auth profiles各 Bash コマンドは別々のシェルセッションで実行されます。
# 動作: --profile フラグ
databricks apps list --profile my-workspace
# 動作: && でつなぐ
export DATABRICKS_CONFIG_PROFILE=my-workspace && databricks apps list
# 動作しない: 別々のコマンド
export DATABRICKS_CONFIG_PROFILE=my-workspace
databricks apps list # プロフィールが設定されない!
カタログ/スキーマ/テーブルを手動で操作する代わりに、以下を使用してください:
# テーブル構造を探索(列、データ型、サンプルデータ、統計情報)
databricks experimental aitools tools discover-schema catalog.schema.table --profile <PROFILE>
# アドホック SQL クエリを実行
databricks experimental aitools tools query "SELECT * FROM table LIMIT 10" --profile <PROFILE>
# デフォルトウェアハウスを検索
databricks experimental aitools tools get-default-warehouse --profile <PROFILE>
名前は厳密です。 カタログ/スキーマ/テーブル名は正確に指定してください — ハイフンをアンダースコアに変更したり、他に正規化しないでください。SQL では、特殊文字を含む名前部分をバッククォートで囲んでください(例: `my-catalog`.schema.table); クォートなしのハイフンはパースエラーになります。
これらのコマンドは既知の SQL 実行とデータ分析(統計分析)のための一級の方法です — Genie は不要です。自然言語でのデータ質問、正確に特定できないデータの検索、または質問からのクエリ生成については、インストール済みの場合は databricks-data-discovery スキル(上記)を優先してください。完全なコマンド一覧、クォート規則、トラブルシューティングについては手動データ探索を参照してください。
⚠️ 重要: 一部のコマンドはフラグではなく位置引数(順序で指定する引数)を使用します
# 現在のユーザー
databricks current-user me --profile <PROFILE>
# リソースを一覧表示
databricks apps list --profile <PROFILE>
databricks jobs list --profile <PROFILE>
databricks clusters list --profile <PROFILE>
databricks warehouses list --profile <PROFILE>
databricks pipelines list --profile <PROFILE>
databricks serving-endpoints list --profile <PROFILE>
# ⚠️ Unity Catalog — 位置引数(フラグではない)
databricks catalogs list --profile <PROFILE>
# ✅ 正解: 位置引数
databricks schemas list <CATALOG> --profile <PROFILE>
databricks tables list <CATALOG> <SCHEMA> --profile <PROFILE>
databricks tables get <CATALOG>.<SCHEMA>.<TABLE> --profile <PROFILE>
# ❌ 誤り: これらのフラグ/コマンドは存在しません
# databricks schemas list --catalog-name <CATALOG> ← 失敗する
# databricks tables list --catalog <CATALOG> ← 失敗する
# databricks sql-warehouses list ← 存在しない。`warehouses list` を使用
# databricks execute-statement ← 存在しない。`experimental aitools tools query` を使用
# databricks sql execute ← 存在しない。`experimental aitools tools query` を使用
# 不明な場合はヘルプを確認:
# databricks schemas list --help
# 詳細情報を取得
databricks apps get <NAME> --profile <PROFILE>
databricks jobs get --job-id <ID> --profile <PROFILE>
databricks clusters get --cluster-id <ID> --profile <PROFILE>
# バンドル
databricks bundle init --profile <PROFILE>
databricks bundle validate --profile <PROFILE>
databricks bundle deploy -t <TARGET> --profile <PROFILE>
databricks bundle run <RESOURCE> -t <TARGET> --profile <PROFILE>
| エラー | 解決方法 |
|---|---|
cannot configure default credentials |
--profile フラグを使用するか、まず認証してください |
configuration does not support OAuth tokens |
コマンドが OAuth を必要としています(例: databricks apps logs)。databricks auth login --host <URL> --profile <PROFILE> で再認証してください。CLI 認証を参照してください。 |
PERMISSION_DENIED |
ワークスペース/Unity Catalog のアクセス権を確認してください |
RESOURCE_DOES_NOT_EXIST |
リソース名/ID とプロフィールを確認してください |
| タスク | 進める前に読んでください |
|---|---|
| 初回セットアップ | CLI インストール |
| 認証の問題 / 新規ワークスペース | CLI 認証 |
| テーブル/スキーマの探索 | 手動データ探索(またはインストール済みの場合は databricks-data-discovery) |
| ジョブ/パイプラインのデプロイ | /databricks-dabs を使用 |
Core skill for Databricks CLI, authentication, and data exploration.
For specific products, use dedicated skills:
For data discovery, exploration, and query generation — finding tables, answering natural-language questions about the data, or generating SQL — use databricks-data-discovery (it asks Genie One first, then falls back to manual exploration). If it isn't installed, use the AI-tool commands below and Manual Data Exploration.
CLI installed: Run databricks --version to check.
DATABRICKS_HOST and DATABRICKS_TOKEN environment variables if present in the shell. See the Databricks REST API docs.Authenticated: databricks auth profiles
NEVER auto-select a profile.
databricks auth profilesEach Bash command runs in a separate shell session.
# WORKS: --profile flag
databricks apps list --profile my-workspace
# WORKS: chained with &&
export DATABRICKS_CONFIG_PROFILE=my-workspace && databricks apps list
# DOES NOT WORK: separate commands
export DATABRICKS_CONFIG_PROFILE=my-workspace
databricks apps list # profile not set!
Use these instead of manually navigating catalogs/schemas/tables:
# discover table structure (columns, types, sample data, stats)
databricks experimental aitools tools discover-schema catalog.schema.table --profile <PROFILE>
# run ad-hoc SQL queries
databricks experimental aitools tools query "SELECT * FROM table LIMIT 10" --profile <PROFILE>
# find the default warehouse
databricks experimental aitools tools get-default-warehouse --profile <PROFILE>
Names are literal. Use catalog/schema/table names exactly as given — never change a
hyphen to an underscore or otherwise normalize them. In SQL, backtick-quote any name part
with special characters (e.g. `my-catalog`.schema.table); unquoted hyphens cause a
parse error.
These commands are first-class for running known SQL and profiling — Genie isn't
required for that. For natural-language data questions, locating data you can't
pin down, or generating a query from a question, prefer the databricks-data-discovery
skill (above) if it's installed. See Manual Data Exploration for the
full command surface, quoting rules, and troubleshooting.
⚠️ CRITICAL: Some commands use positional arguments, not flags
# current user
databricks current-user me --profile <PROFILE>
# list resources
databricks apps list --profile <PROFILE>
databricks jobs list --profile <PROFILE>
databricks clusters list --profile <PROFILE>
databricks warehouses list --profile <PROFILE>
databricks pipelines list --profile <PROFILE>
databricks serving-endpoints list --profile <PROFILE>
# ⚠️ Unity Catalog — POSITIONAL arguments (NOT flags!)
databricks catalogs list --profile <PROFILE>
# ✅ CORRECT: positional args
databricks schemas list <CATALOG> --profile <PROFILE>
databricks tables list <CATALOG> <SCHEMA> --profile <PROFILE>
databricks tables get <CATALOG>.<SCHEMA>.<TABLE> --profile <PROFILE>
# ❌ WRONG: these flags/commands DON'T EXIST
# databricks schemas list --catalog-name <CATALOG> ← WILL FAIL
# databricks tables list --catalog <CATALOG> ← WILL FAIL
# databricks sql-warehouses list ← doesn't exist, use `warehouses list`
# databricks execute-statement ← doesn't exist, use `experimental aitools tools query`
# databricks sql execute ← doesn't exist, use `experimental aitools tools query`
# When in doubt, check help:
# databricks schemas list --help
# get details
databricks apps get <NAME> --profile <PROFILE>
databricks jobs get --job-id <ID> --profile <PROFILE>
databricks clusters get --cluster-id <ID> --profile <PROFILE>
# bundles
databricks bundle init --profile <PROFILE>
databricks bundle validate --profile <PROFILE>
databricks bundle deploy -t <TARGET> --profile <PROFILE>
databricks bundle run <RESOURCE> -t <TARGET> --profile <PROFILE>
| Error | Solution |
|---|---|
cannot configure default credentials |
Use --profile flag or authenticate first |
configuration does not support OAuth tokens |
The command requires OAuth (e.g., databricks apps logs). Re-authenticate with databricks auth login --host <URL> --profile <PROFILE>. See CLI Authentication. |
PERMISSION_DENIED |
Check workspace/UC permissions |
RESOURCE_DOES_NOT_EXIST |
Verify resource name/id and profile |
| Task | READ BEFORE proceeding |
|---|---|
| First time setup | CLI Installation |
| Auth issues / new workspace | CLI Authentication |
| Exploring tables/schemas | Manual Data Exploration (or databricks-data-discovery if installed) |
| Deploying jobs/pipelines | Use /databricks-dabs |
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。