メインコンテンツまでスキップ

Google Cloud の認証情報認証

Google Cloudの認証情報認証 では、Google Cloudのサービスアカウントの認証情報を使用して、対象となるGoogle Cloudサービスアカウントを認証します。

Google Cloud 認証情報認証を使用する準備をするには、「 Google Cloud 認証情報認証の設定と使用」を参照してください。

Databricks で Google Cloud 資格情報認証を構成するには、次の関連する環境変数 ( .databrickscfg フィールド、Terraform フィールド、または Config フィールド) を設定する必要があります。

  • Databricksホスト

    • アカウント操作の場合は、https://accounts.gcp.databricks.com を指定します。
    • ワークスペース操作の場合は、 ワークスペースの URL を指定します (例: https://1234567890123456.7.gcp.databricks.com)。
  • アカウント操作の場合、Databricks アカウント ID

  • Google Cloud の認証情報 (Google Cloud サービス アカウントの Google 管理キー ペアの秘密キー部分へのローカル パスとして指定)、またはこの秘密キー部分の内容 (JSON 形式)。

Databricks で Google Cloud 資格情報認証を実行するには、参加しているツールまたは SDK に基づいて、コード内に以下を統合します。

To use environment variables for a specific Databricks authentication type with a tool or SDK, see Authorizing access to Databricks resources or the tool’s or SDK’s documentation. See also Environment variables and fields for client unified authentication and the Default methods for client unified authentication.

For account-level operations, set the following environment variables:

  • DATABRICKS_HOST, set to the value of your Databricks account console URL, https://accounts.gcp.databricks.com.
  • DATABRICKS_ACCOUNT_ID
  • GOOGLE_CREDENTIALS

For workspace-level operations, set the following environment variables:

  • DATABRICKS_HOST, set to the value of your Databricks workspace URL, for example https://1234567890123456.7.gcp.databricks.com.
  • GOOGLE_CREDENTIALS