From 2256663902c6bb6c429fcb21d78356ec32840572 Mon Sep 17 00:00:00 2001 From: Russell Spitzer Date: Fri, 24 Jan 2025 11:50:02 -0600 Subject: [PATCH] Spec, OpenAPI: Adds EnableRowLineage Metadata Update (#12050) --- open-api/rest-catalog-open-api.py | 5 +++++ open-api/rest-catalog-open-api.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/open-api/rest-catalog-open-api.py b/open-api/rest-catalog-open-api.py index c3ec276b9e8b..f5632ad3ffb4 100644 --- a/open-api/rest-catalog-open-api.py +++ b/open-api/rest-catalog-open-api.py @@ -390,6 +390,10 @@ class RemovePartitionSpecsUpdate(BaseUpdate): spec_ids: List[int] = Field(..., alias='spec-ids') +class EnableRowLineageUpdate(BaseUpdate): + action: str = Field('enable-row-lineage', const=True) + + class TableRequirement(BaseModel): type: str @@ -1173,6 +1177,7 @@ class TableUpdate(BaseModel): SetStatisticsUpdate, RemoveStatisticsUpdate, RemovePartitionSpecsUpdate, + EnableRowLineageUpdate, ] diff --git a/open-api/rest-catalog-open-api.yaml b/open-api/rest-catalog-open-api.yaml index e5a4b8dbbc1e..6a651d2b06a6 100644 --- a/open-api/rest-catalog-open-api.yaml +++ b/open-api/rest-catalog-open-api.yaml @@ -2648,6 +2648,7 @@ components: set-partition-statistics: '#/components/schemas/SetPartitionStatisticsUpdate' remove-partition-statistics: '#/components/schemas/RemovePartitionStatisticsUpdate' remove-partition-specs: '#/components/schemas/RemovePartitionSpecsUpdate' + enable-row-lineage: '#/components/schemas/EnableRowLineageUpdate' type: object required: - action @@ -2949,6 +2950,15 @@ components: items: type: integer + # Disabling Row Lineage is Forbidden + EnableRowLineageUpdate: + allOf: + - $ref: '#/components/schemas/BaseUpdate' + properties: + action: + type: string + const: "enable-row-lineage" + TableUpdate: anyOf: - $ref: '#/components/schemas/AssignUUIDUpdate' @@ -2969,6 +2979,7 @@ components: - $ref: '#/components/schemas/SetStatisticsUpdate' - $ref: '#/components/schemas/RemoveStatisticsUpdate' - $ref: '#/components/schemas/RemovePartitionSpecsUpdate' + - $ref: '#/components/schemas/EnableRowLineageUpdate' ViewUpdate: anyOf: