Repos CLI(레거시)

Important

이 설명서는 사용 중지되었으며 업데이트되지 않을 수 있습니다.

이 정보는 레거시 Databricks CLI 버전 0.18 이하에 적용됩니다. Databricks는 최신 Databricks CLI 버전 0.205 이상을 대신 사용하는 것이 좋습니다. Databricks CLI란?을 참조하세요. Databricks CLI 버전을 찾으려면 다음을 실행 databricks -v합니다.

Databricks CLI 버전 0.18 이하에서 Databricks CLI 버전 0.205 이상으로 마이그레이션하려면 Databricks CLI 마이그레이션을 참조하세요.

참고 항목

Repos CLI에는 Databricks CLI 0.15.0 이상이 필요합니다.

Databricks 리포지토리 CLI 하위 명령을 databricks repos에 추가하여 실행합니다. 이러한 하위 명령은 Repos API호출합니다.

리포지토리에 대한 자세한 내용은 Databricks Git 폴더와 Git 통합을 참조 하세요.

databricks repos --help
Usage: databricks repos [OPTIONS] COMMAND [ARGS]...

  Utility to interact with the repos API.

Options:
  -v, --version   [VERSION]
  --debug         Debug mode. Shows full stack trace on error.
  --profile TEXT  CLI connection profile to use. The default profile is
                  "DEFAULT".

  -h, --help      Show this message and exit.

Commands:
  create      Creates a repo.
  delete      Deletes a repo.
  get         Lists information about a repo.
  list        Lists all available repos in the workspace.
  update      Updates information about a repo.

리포지토리 만들기

사용 설명서를 표시하려면 databricks repos create --help를 실행합니다.

사용

databricks repos create --url <url> --provider <provider> --path <path>

다음을

  • <url>을 리포지토리에 대한 필수 Git 공급자의 URL로 바꿉니다.

  • <provider>를 필수 Git 공급자의 이름으로 바꿉니다(예: gitHub). 사용 가능한 공급자는 다음과 같습니다.

    • azureDevOpsServices
    • bitbucketCloud
    • bitbucketServer
    • gitHub
    • gitHubEnterprise
    • gitLab
    • gitLabEnterpriseEdition

    공급자의 이름은 대/소문자를 구분하지 않는 것으로 지정할 수 있습니다(예: gitHubgithub 둘 다 유효).

  • <path>를 Azure Databricks 작업 영역의 리포지토리에 대한 선택적 경로로 바꿉니다(예: /Repos/someone@example.com/my-repo).

예제 출력

{
  "id": 1234567890123456,
  "path": "/Repos/someone@example.com/my-repo",
  "url": "https://github.com/my/my-repo",
  "provider": "gitHub",
  "branch": "master",
  "head_commit_id": "9837ac1f924a5ca56117597c5c79bb02300ff1f4"
}

작업 영역에서 사용 가능한 모든 리포지토리 나열

사용 설명서를 표시하려면 databricks repos list --help를 실행합니다.

사용

databricks repos list --path-prefix <path-prefix> --next-page-token <next-page-token>

다음을

  • <path-prefix>를 Azure Databricks 작업 영역의 리포지토리에 대한 선택적 경로 접두사로 바꿉니다(예: /Repos/someone@example.com/my-repo).
  • <next-page-token>을 결과의 다음 페이지를 가져오도록 이전에 명령을 실행하여 제공된 선택적 다음 페이지 토큰으로 바꿉니다.

예제 출력

{
  "repos": [
    {
      "id": 1234567890123456,
      "path": "/Repos/someone@example.com/my-repo",
      "url": "https://github.com/my/my-repo",
      "provider": "gitHub",
      "branch": "master",
      "head_commit_id": "9837ac1f924a5ca56117597c5c79bb02300ff1f4"
    },
    {
      "id": 2345678901234567,
      "path": "/Repos/someone@example.com/my-repo-2",
      "url": "https://github.com/my/my-repo-2",
      "provider": "gitHub",
      "branch": "master",
      "head_commit_id": "837ac1f924a5ca56117597c5c79bb02300ff1f4a"
    }
  ]
}

리포지토리에 대한 정보 나열

사용 설명서를 표시하려면 databricks repos get --help를 실행합니다.

사용

databricks repos get --repo-id <repo-id> --path <path>

다음을

  • <repo-id>를 리포지토리의 ID로 바꿉니다(예: 1234567890123456). ID를 가져오려면 list 명령을 실행합니다. --repo-id 또는 --path이 필요한 경우
  • <path>를 Azure Databricks 작업 영역의 리포지토리에 대한 경로로 바꿉니다(예: /Repos/someone@example.com/my-repo). 경로를 가져오려면 get 또는 list 명령을 실행합니다. --repo-id 또는 --path이 필요한 경우

예제 출력

{
  "id": 1234567890123456,
  "path": "/Repos/someone@example.com/my-repo",
  "url": "https://github.com/my/my-repo",
  "provider": "gitHub",
  "branch": "master",
  "head_commit_id": "9837ac1f924a5ca56117597c5c79bb02300ff1f4"
}

리포지토리를 원격 분기의 가장 최근 커밋 또는 태그로 업데이트

사용 설명서를 표시하려면 databricks repos update --help를 실행합니다.

사용

databricks repos update --repo-id <repo-id> --branch <branch>

또는

databricks repos update --repo-id <repo-id> --tag <tag>

또는

databricks repos update --path <path> --branch <branch>

또는

databricks repos update --path <path> --tag <tag>

--repo-id 또는 --path 중 정확히 하나가 필요하며 --branch 또는 --tag 중 정확히 하나가 필요합니다.

--repo-id 또는 --path 업데이트해야 하는 Databricks Git 폴더를 식별합니다. --branch또는 --tag 업데이트할 커밋 또는 검사 새 분기를 식별합니다. 현재 검사 있는 분기를 참조하거나 --tag 참조하는 경우 --branch Databricks Git 폴더는 끌어오기 작업을 수행하여 해당 분기에 대한 최신 커밋으로 업데이트합니다. 현재 검사 없는 분기를 참조하거나 --tag 참조하는 경우 --branch Databricks Git 폴더는 지정된 분기를 검사.

다음을

  • <repo-id>를 리포지토리의 ID로 바꿉니다(예: 1234567890123456). ID를 가져오려면 list 명령을 실행합니다.
  • <path>를 Azure Databricks 작업 영역의 리포지토리에 대한 경로로 바꿉니다(예: /Repos/someone@example.com/my-repo). 경로를 가져오려면 get 또는 list 명령을 실행합니다.
  • <branch>를 사용할 리포지토리의 분기 이름으로 바꿉니다(예: my-branch).
  • <tag>를 사용할 리포지토리의 분기 이름으로 바꿉니다(예: my-tag).

예제 출력

{
  "id": 1234567890123456,
  "path": "/Repos/someone@example.com/my-repo",
  "url": "https://github.com/my/my-repo",
  "provider": "gitHub",
  "branch": "my-branch",
  "head_commit_id": "9837ac1f924a5ca56117597c5c79bb02300ff1f4"
}

리포지토리 삭제

사용 설명서를 표시하려면 databricks repos delete --help를 실행합니다.

사용

databricks repos delete --repo-id <repo-id>

또는

databricks repos delete --path <path>

다음을

  • <repo-id>를 리포지토리의 ID로 바꿉니다(예: 1234567890123456). ID를 가져오려면 list 명령을 실행합니다. --repo-id 또는 --path이 필요한 경우
  • <path>를 Azure Databricks 작업 영역의 리포지토리에 대한 경로로 바꿉니다(예: /Repos/someone@example.com/my-repo). 경로를 가져오려면 get 또는 list 명령을 실행합니다. --repo-id 또는 --path이 필요한 경우

성공하면 출력이 표시되지 않습니다.