중요합니다
이 설명서는 사용 중지되었으며 업데이트되지 않을 수 있습니다. 이 콘텐츠에 언급된 제품, 서비스 또는 기술은 더 이상 지원되지 않습니다. Delta Lake 테이블 기능 삭제 및 테이블 프로토콜 다운그레이드를 참조하세요.
This article documents the Public Preview behavior for dropping Delta Lake table features available starting in Databricks Runtime 14.3 LTS. Databricks recommends using the generally available functionality in Databricks Runtime 16.3 and above, which replaces the legacy behavior. Delta Lake 테이블 기능 삭제 및 테이블 프로토콜 다운그레이드를 참조하세요.
Azure Databricks provides limited support for dropping table features. Dropping a table feature involves the following stages:
- Disable table properties that use the table feature.
- Remove all traces of the table feature from the data files backing the table.
- Remove transaction entries that use the table feature from the transaction log.
- Downgrade the table protocol.
중요합니다
All DROP FEATURE
operations conflict with all concurrent writes.
스트리밍 읽기는 테이블 메타데이터를 변경하는 커밋이 발생하면 실패합니다. 스트림을 계속하려면 다시 시작해야 합니다. 권장 방법은 구조적 스트리밍에 대한 프로덕션 고려 사항을 참조하세요.
How can I drop a Delta table feature?
To remove a Delta table feature, you run an ALTER TABLE <table-name> DROP FEATURE <feature-name> [TRUNCATE HISTORY]
command.
ALTER TABLE을(를) 참조하세요.
You must use Databricks Runtime 14.3 LTS or above and have MODIFY
privileges on the target Delta table.
What Delta table features can be dropped?
You can drop the following Delta table features:
-
checkConstraints
. Azure Databricks의 제약 조건을 참조하세요. -
collations-preview
. Delta Lake에 대한 정렬 지원을 참조하세요. -
columnMapping
. Delta Lake 열 매핑을 사용하여 열 이름 바꾸기 및 삭제를 참조하세요. -
deletionVectors
. 삭제 벡터란?을 참조하세요. -
typeWidening-preview
. 타입 확장을 참조하세요. -
v2Checkpoint
. 리퀴드 클러스터링이 있는 테이블의 호환성을 참조하세요.
You cannot drop other Delta table features.
중요합니다
Some Delta Lake functionality enables multiple table features. Some table features depend on other table features, and might block dropping dependent table features. Because some table features cannot be dropped, this means that enablement for some Delta Lake features cannot be rolled back.
Databricks recommends always testing dependent workloads and systems for compatibility with new functionality before enabling functionality that upgrades reader or writer protocols for production data.
Enable table features to drop legacy features
비고
This section describes a pattern that is only required in Databricks Runtime 16.0 and below.
The DROP FEATURE
command requires protocol versions that support table feature reads and writes. Delta features like columnMapping
and checkConstraints
were supported in earlier protocol versions. Depending on other features enabled on the table, you might need to upgrade protocol versions before you can drop these features.
You can use the following command to upgrade the table reader and writer versions, which allows you to drop column mapping and downgrade the protocol:
ALTER TABLE <table-name> SET TBLPROPERTIES (
'delta.minReaderVersion' = '3',
'delta.minWriterVersion' = '7'
)
How are Delta table features dropped?
Because Delta table features affect the way a table is read/written, they must be completely absent from the transaction log for full removal. The specifics of feature removal vary by feature, but the following section provides a general overview.
Dropping a feature occurs in two steps and requires time to elapse before completion.
Step 1: Prepare to drop a table feature
During the first step, you must prepare to drop the table feature. The following describes what happens during this step:
-
DROP FEATURE
명령을 실행합니다. - Table properties that specifically enable a table feature have values set to disable the feature.
- Table properties that control behaviors associated with the dropped feature have options set to default values before the feature was introduced.
- As necessary, data and metadata files are rewritten, respecting the updated table properties.
- The command finishes running and returns an error message informing you that you must wait 24 hours to proceed with feature removal.
After first disabling a feature, you can continue writing to the target table before completing the protocol downgrade, but cannot use the table feature you are removing.
비고
If you leave the table in this state, operations against the table do not use the table feature, but the protocol still supports the table feature. Until you complete the final downgrade step, the table is not readable by Delta clients that do not understand the table feature.
Step 2: Downgrade the protocol and drop a table feature
In the second step, you truncate and delete all transaction history associated with the feature. This allows you to drop the table feature and downgrade the protocol.
- After at least 24 hours have passed, you execute the
DROP FEATURE
command again with theTRUNCATE HISTORY
clause. - The client confirms that no transactions in the specified retention threshold use the table feature, then truncates the table history to that threshold.
- The protocol is downgraded, dropping the table feature.
- If the table features that are present in the table can be represented by a legacy protocol version, the
minReaderVersion
andminWriterVersion
for the table are downgraded to the lowest version that supports exactly all remaining features in use by the Delta table.
중요합니다
Running ALTER TABLE <table-name> DROP FEATURE <feature-name> TRUNCATE HISTORY
removes all transaction log data older than 24 hours. After dropping a Delta table feature, you do not have access to table history or time travel.