Skip to content

Add TableProvisionJob CRD and JobTemplate support for CREATE TABLE#196

Open
srnand wants to merge 3 commits intomainfrom
sthakkar/mar13_26/addTableProvisionerJob
Open

Add TableProvisionJob CRD and JobTemplate support for CREATE TABLE#196
srnand wants to merge 3 commits intomainfrom
sthakkar/mar13_26/addTableProvisionerJob

Conversation

@srnand
Copy link
Collaborator

@srnand srnand commented Mar 14, 2026

Summary

  • Adds a generic TableProvisionJob CRD for provisioning tables via job templates.
  • Extends K8sDeployerProvider to apply JobTemplate CRDs during the CREATE TABLE flow, enabling table provisioning.

Scenarios

Case 1

CREATE TABLE iceberg.namespace.table

  • When 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.

    image image

Case 2

CREATE MATERIALIZED VIEW venice.sink AS SELECT * FROM iceberg.namespace.table

  • When 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:

    • If it exists → no action is taken (no-op)
    • If it does not exist → the table is provisioned.
    image image

Case 3

CREATE MATERIALIZED VIEW iceberg.namespace.table1 AS SELECT * FROM iceberg.namespace.table2

  • When 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.

    image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants