Add TableProvisionJob CRD and JobTemplate support for CREATE TABLE#196
Open
Add TableProvisionJob CRD and JobTemplate support for CREATE TABLE#196
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scenarios
Case 1
CREATE TABLE iceberg.namespace.tableWhen a table is created in Iceberg using CREATE TABLE, the system triggers both the Source Deployer and the Job Deployer for the iceberg table.
The Job Deployer then deploys a TableProvisionJob, which is responsible for ensuring the table actually exists in the infrastructure.
A custom table reconciler for the TableProvisionJob CRD may processes the job and performs the actual provisioning of the table.
Case 2
CREATE MATERIALIZED VIEW venice.sink AS SELECT * FROM iceberg.namespace.tableWhen a materialized view is created that reads from an Iceberg table and writes to a Venice sink, both the Source Deployer and the Job Deployer are triggered again for the iceberg table.
The Job Deployer creates a TableProvisionJob to ensure that the Iceberg source table exists.
The table reconciler checks whether the table is already provisioned:
Case 3
CREATE MATERIALIZED VIEW iceberg.namespace.table1 AS SELECT * FROM iceberg.namespace.table2When a materialized view writes to an Iceberg table (table1) and reads from another Iceberg table (table2), provisioning happens for both iceberg tables.
The source table (table2) is provisioned exactly like in Case 2.
The sink table (table1) triggers a separate provisioning job created during pipeline planning.
The Job Deployer (created while planning the pipeline) deploys a TableProvisionJob to verify that the sink table exists. If the sink table is missing, it is created; otherwise the operation becomes a no-op.