Skip to content

Support custom dlt metadata table prefixes - #21

Merged
nicosuave merged 1 commit into
mainfrom
s3-tables-internal-names
Aug 14, 2026
Merged

Support custom dlt metadata table prefixes#21
nicosuave merged 1 commit into
mainfrom
s3-tables-internal-names

Conversation

@nicosuave

Copy link
Copy Markdown
Member

Adds an opt-in internal_table_prefix setting so catalogs that reject leading underscores can store dlt metadata tables as dlt_loads, dlt_version, and dlt_pipeline_state.

The default remains _dlt, preserving normal dlt physical names and behavior. Logical schema names are unchanged in both modes, and every catalog read/write/drop/location path applies the same mapping.

Validated with the full suite: 169 passed, 15 skipped.

@nicosuave
nicosuave merged commit 3e6b298 into main Aug 14, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10d8d9d151

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

prefix = self.config.internal_table_prefix.rstrip("_")
if not prefix:
raise ValueError("internal_table_prefix must contain at least one character")
return f"{prefix}_{table_name.removeprefix(logical_prefix)}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject names that collide with remapped metadata tables

When internal_table_prefix="dlt" and the pipeline has an ordinary resource named dlt_loads (similarly dlt_version or dlt_pipeline_state), both that resource and the corresponding _dlt_* metadata table resolve to the same catalog identifier. The user batch can therefore create the table first, after which metadata writes load it with an incompatible schema and fail the pipeline, or intermingle data if schemas happen to be compatible. Detect these collisions against the logical schema before loading rather than routing two logical tables to one physical name.

Useful? React with 👍 / 👎.

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.

1 participant