airflow.providers.databricks.operators.databricks_repos¶
此模組包含 Databricks operators。
類¶
使用 POST api/2.0/repos API 端點建立 Databricks 倉庫,並可選地檢出。 |
|
使用 PATCH api/2.0/repos API 端點將指定倉庫更新到給定分支或標籤。 |
|
使用 DELETE api/2.0/repos API 端點刪除指定倉庫。 |
模組內容¶
- class airflow.providers.databricks.operators.databricks_repos.DatabricksReposCreateOperator(*, git_url, git_provider=None, branch=None, tag=None, repo_path=None, ignore_existing_repo=False, databricks_conn_id='databricks_default', databricks_retry_limit=3, databricks_retry_delay=1, **kwargs)[source]¶
基類:
airflow.models.BaseOperator使用 POST api/2.0/repos API 端點建立 Databricks 倉庫,並可選地檢出。
- 引數:
git_url (str) – 必需的 Git 倉庫 HTTPS URL
git_provider (str | None) – 可選的 Git 提供商名稱。如果無法從 URL 推斷其名稱,則必須提供。
repo_path (str | None) – 倉庫的可選路徑。必須採用
/Repos/{folder}/{repo-name}格式。如果未指定,將在使用者目錄下建立。branch (str | None) – 要檢出的分支的可選名稱。
tag (str | None) – 要檢出的標籤的可選名稱。
ignore_existing_repo (bool) – 如果給定路徑的倉庫已存在,則不丟擲異常。
databricks_conn_id (str) – 對 Databricks 連線 的引用。預設情況下通常是
databricks_default。要使用基於 token 的身份驗證,請在連線的 extra 欄位中提供token鍵,建立host鍵並留空host欄位。(模板化)databricks_retry_limit (int) – 如果 Databricks 後端不可達,重試的次數。其值必須大於或等於 1。
databricks_retry_delay (int) – 重試之間的等待秒數(可以是浮點數)。
- template_fields: collections.abc.Sequence[str] = ('repo_path', 'tag', 'branch', 'databricks_conn_id')[source]¶
- class airflow.providers.databricks.operators.databricks_repos.DatabricksReposUpdateOperator(*, branch=None, tag=None, repo_id=None, repo_path=None, databricks_conn_id='databricks_default', databricks_retry_limit=3, databricks_retry_delay=1, **kwargs)[source]¶
基類:
airflow.models.BaseOperator使用 PATCH api/2.0/repos API 端點將指定倉庫更新到給定分支或標籤。
參見: https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/update-repo
- 引數:
branch (str | None) – 要更新到的分支的可選名稱。如果省略
tag,則應指定此引數tag (str | None) – 要更新到的標籤的可選名稱。如果省略
branch,則應指定此引數repo_id (str | None) – 現有倉庫的可選 ID。如果省略
repo_path,則應指定此引數repo_path (str | None) – 現有倉庫的可選路徑。如果省略
repo_id,則應指定此引數databricks_conn_id (str) – 對 Databricks 連線 的引用。預設情況下通常是
databricks_default。要使用基於 token 的身份驗證,請在連線的 extra 欄位中提供token鍵,建立host鍵並留空host欄位。(模板化)databricks_retry_limit (int) – 如果 Databricks 後端不可達,重試的次數。其值必須大於或等於 1。
databricks_retry_delay (int) – 重試之間的等待秒數(可以是浮點數)。
- template_fields: collections.abc.Sequence[str] = ('repo_path', 'tag', 'branch', 'databricks_conn_id')[source]¶
- class airflow.providers.databricks.operators.databricks_repos.DatabricksReposDeleteOperator(*, repo_id=None, repo_path=None, databricks_conn_id='databricks_default', databricks_retry_limit=3, databricks_retry_delay=1, **kwargs)[source]¶
基類:
airflow.models.BaseOperator使用 DELETE api/2.0/repos API 端點刪除指定倉庫。
參見: https://docs.databricks.com/dev-tools/api/latest/repos.html#operation/delete-repo
- 引數:
repo_id (str | None) – 現有倉庫的可選 ID。如果省略
repo_path,則應指定此引數repo_path (str | None) – 現有倉庫的可選路徑。如果省略
repo_id,則應指定此引數databricks_conn_id (str) – 對 Databricks 連線 的引用。預設情況下通常是
databricks_default。要使用基於 token 的身份驗證,請在連線的 extra 欄位中提供token鍵,建立host鍵並留空host欄位。(模板化)databricks_retry_limit (int) – 如果 Databricks 後端不可達,重試的次數。其值必須大於或等於 1。
databricks_retry_delay (int) – 重試之間的等待秒數(可以是浮點數)。
- template_fields: collections.abc.Sequence[str] = ('repo_path', 'databricks_conn_id')[source]¶