Databricks 자산 번들에 동적으로 아티팩트 설정 정의
이 문서에서는 Databricks 자산 번들의 아티팩트 설정을 재정의하는 방법을 설명합니다. Databricks 자산 번들이란?
Azure Databricks 번들 구성 파일에서 매핑의 아티팩트 설정과 최상위 artifacts
매핑의 아티팩트 설정을 targets
조인할 수 있습니다(예: 간결성을 위해 생략된 콘텐츠를 나타내는 줄임표).
# ...
artifacts:
<some-unique-programmatic-identifier-for-this-artifact>:
# Artifact settings.
targets:
<some-unique-programmatic-identifier-for-this-target>:
resources:
artifacts:
<the-matching-programmatic-identifier-for-this-artifact>:
# Any more artifact settings to join with the settings from the
# matching top-level artifacts mapping.
최상위 artifacts
매핑 및 targets
동일한 아티팩트 매핑에 아티팩트 설정이 모두 정의된 경우 매핑의 설정 targets
이 최상위 artifacts
매핑의 설정보다 우선합니다.
예제 1: 최상위 아티팩트 매핑에만 정의된 아티팩트 설정
이 작업이 실제로 작동하는 방식을 보여 주려면 다음 예제 path
에서 아티팩트의 모든 설정을 정의하는 최상위 artifacts
매핑에 정의됩니다(줄임표는 간결하게 생략된 콘텐츠를 나타낸다).
# ...
artifacts:
my-artifact:
type: whl
path: ./my_package
# ...
이 예제를 실행 databricks bundle validate
하면 결과 그래프가 표시됩니다(간결성을 위해 줄임표는 생략된 콘텐츠를 나타낸다).
{
"...": "...",
"artifacts": {
"my-artifact": {
"type": "whl",
"path": "./my_package",
"...": "..."
}
},
"...": "..."
}
예제 2: 여러 아티팩트 매핑에 정의된 충돌 아티팩트 설정
이 예제 path
에서는 최상위 artifacts
매핑과 매핑에서 artifacts
모두 정의됩니다 targets
. 이 예제 path
에서 매핑 targets
에서 artifacts
최상위 artifacts
매핑보다 path
우선적으로 아티팩트의 설정을 정의합니다(줄임표는 생략된 콘텐츠를 간결하게 표시함).
# ...
artifacts:
my-artifact:
type: whl
path: ./my_package
targets:
dev:
artifacts:
my-artifact:
path: ./my_other_package
# ...
이 예제를 실행 databricks bundle validate
하면 결과 그래프가 표시됩니다(간결성을 위해 줄임표는 생략된 콘텐츠를 나타낸다).
{
"...": "...",
"artifacts": {
"my-artifact": {
"type": "whl",
"path": "./my_other_package",
"...": "..."
}
},
"...": "..."
}