Delta Live Tables 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 마이그레이션을 참조하세요.

Databricks Delta Live Tables CLI 하위 명령은 databricks pipelines에 추가하여 실행합니다. 이러한 하위 명령은 Delta Live Tables API를 호출합니다.

databricks pipelines -h
Usage: databricks pipelines [OPTIONS] COMMAND [ARGS]...

  Utility to interact with Databricks Delta Live Tables Pipelines.

Options:
  -v, --version   0.18.0
  --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 pipeline.
  delete  Deletes the pipeline and cancels any active updates.
  deploy  [Deprecated] This command is deprecated, use create and edit
          commands instead.  Creates or edits a pipeline specified by the
          pipeline settings.

  edit    Edits a pipeline.
  get     Gets a pipeline's current settings and status.
  list    Lists all pipelines and their statuses.
  reset   [Deprecated] Use the "start --full-refresh" command instead. Resets
          a pipeline so that data can be reprocessed from the beginning.

  run     [Deprecated] Use the "start" command instead. Starts a pipeline
          update.

  start   Starts a pipeline update.
  stop    Stops the pipeline by cancelling any active update.

파이프라인 만들기

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

사용

databricks pipelines create --settings create-pipeline.json

create-pipeline.json:

{
    "name": "Wikipedia pipeline (SQL)",
    "storage": "/Users/username/data",
    "clusters": [
      {
        "label": "default",
        "autoscale": {
          "min_workers": 1,
          "max_workers": 5
        }
      }
    ],
    "libraries": [
      {
        "notebook": {
          "path": "/Users/username/Delta Live Tables quickstart (SQL)"
        }
      }
    ],
    "target": "wikipedia_analysis",
    "continuous": false
}
Successfully created pipeline: https://<databricks-instance>/#joblist/pipelines/4ee6b5c2-7017-11ec-90d6-0242ac120003 with ID: 4ee6b5c2-7017-11ec-90d6-0242ac120003.

파이프라인 편집

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

사용

databricks pipelines edit --settings edit-pipeline.json

edit-pipeline.json:

{
    "id": "4ee6b5c2-7017-11ec-90d6-0242ac120003",
    "name": "Wikipedia pipeline (SQL)",
    "storage": "/Users/username/data",
    "clusters": [
        {
            "label": "default",
            "autoscale": {
                "min_workers": 1,
                "max_workers": 3
            }
        }
    ],
    "libraries": [
        {
            "notebook": {
                "path": "/Users/username/Delta Live Tables quickstart (SQL)"
            }
        }
    ],
    "target": "wikipedia_quickstart_data",
    "continuous": false
}
Successfully edited pipeline settings: https://<databricks-instance>/#joblist/pipelines/4ee6b5c2-7017-11ec-90d6-0242ac120003.

파이프라인 삭제

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

사용

databricks pipelines delete --pipeline-id 4ee6b5c2-7017-11ec-90d6-0242ac120003
Pipeline 4ee6b5c2-7017-11ec-90d6-0242ac120003 deleted

파이프라인에 대한 정보 가져오기

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

사용

databricks pipelines get --pipeline-id 4ee6b5c2-7017-11ec-90d6-0242ac120003
{
  "pipeline_id": "4ee6b5c2-7017-11ec-90d6-0242ac120003",
  "spec": {
    "id": "4ee6b5c2-7017-11ec-90d6-0242ac120003",
    "name": "Wikipedia pipeline (SQL)",
    "storage": "/Users/username/data",
    "clusters": [
      {
        "label": "default",
        "autoscale": {
          "min_workers": 1,
          "max_workers": 5
        }
      }
    ],
    "libraries": [
      {
        "notebook": {
          "path": "/Users/username/Delta Live Tables quickstart (SQL)"
        }
      }
    ],
    "target": "wikipedia_analysis",
    "continuous": false
  },
  "state": "IDLE",
  "name": "Wikipedia pipeline (SQL)",
  "creator_user_name": "username@databricks.com",
  "last_modified": 1641600056265
}

모든 파이프라인 및 해당 상태에 대한 정보 나열

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

사용

databricks pipelines list
[
  {
    "pipeline_id": "8a93e1b4-7024-11ec-90d6-0242ac120003",
    "state": "IDLE",
    "name": "Retail sales pipeline (SQL)",
    "latest_updates": [
      {
        "update_id": "9df03924-7024-11ec-90d6-0242ac120003",
        "state": "COMPLETED",
        "creation_time": "2021-10-29T16:18:57.982Z"
      },
      {
        "update_id": "a57e601c-7024-11ec-90d6-0242ac120003",
        "state": "COMPLETED",
        "creation_time": "2021-10-28T18:19:30.371Z"
      }
    ],
    "creator_user_name": "user@databricks.com"
  },
  {
    "pipeline_id": "b46e2670-7024-11ec-90d6-0242ac120003",
    "state": "IDLE",
    "name": "DLT quickstart (Python)",
    "latest_updates": [
      {
        "update_id": "bcd8fa2e-7024-11ec-90d6-0242ac120003",
        "state": "COMPLETED",
        "creation_time": "2021-12-16T18:19:25.827Z"
      },
      {
        "update_id": "c2c7a2c8-7024-11ec-90d6-0242ac120003",
        "state": "COMPLETED",
        "creation_time": "2021-10-29T22:22:32.586Z"
      },
      {
        "update_id": "c88d2818-7024-11ec-90d6-0242ac120003",
        "state": "COMPLETED",
        "creation_time": "2021-10-29T22:16:18.258Z"
      }
    ],
    "creator_user_name": "user@databricks.com"
  }
]

파이프라인 업데이트 시작

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

databricks pipelines start --pipeline-id 4ee6b5c2-7017-11ec-90d6-0242ac120003
Started an update c6462e2e-beb7-4c24-a9d3-962eaa19781b for pipeline 4ee6b5c2-7017-11ec-90d6-0242ac120003.

전체 새로 고침을 사용하여 파이프라인 업데이트 시작

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

사용

databricks pipelines start --pipeline-id 4ee6b5c2-7017-11ec-90d6-0242ac120003 --full-refresh
Started an update ed885d3d-4fc0-44fd-b5dd-59471c789327 with full refresh for pipeline 4ee6b5c2-7017-11ec-90d6-0242ac120003.

파이프라인 업데이트 중지

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

사용

databricks pipelines stop --pipeline-id 4ee6b5c2-7017-11ec-90d6-0242ac120003
Stopped pipeline 4ee6b5c2-7017-11ec-90d6-0242ac120003.