Skip to content

Conversation

@djudjuu
Copy link
Contributor

@djudjuu djudjuu commented Aug 5, 2025

as part of the callbacks in dlt+ I wrote some helper methods that allow to filter out dlt-tables and columns from all the changes that occured during a schema migration (TTableSchema is used in the load-package info of the trace.. Most likely the user will only care about non-dlt changes and these helpers can be used to display just those.

this pr adds a helper that can filter out dlt-tables or columns from these schema migrations, parameterizable by dlt_column and _table prefix, which could be different.

@netlify
Copy link

netlify bot commented Aug 5, 2025

Deploy Preview for dlt-hub-docs canceled.

Name Link
🔨 Latest commit 07711eb
🔍 Latest deploy log https://app.netlify.com/projects/dlt-hub-docs/deploys/68adaeb488a696000878ddb4

@djudjuu djudjuu marked this pull request as draft August 5, 2025 17:47
@djudjuu djudjuu self-assigned this Aug 12, 2025
@djudjuu djudjuu force-pushed the feat/schema/helper-to-get-update-without-dlt-changes branch from c87cb24 to db18d38 Compare August 26, 2025 12:42
@djudjuu djudjuu requested a review from rudolfix August 26, 2025 12:55
@djudjuu djudjuu marked this pull request as ready for review August 26, 2025 12:55
Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

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

we need several improvements so this PR makes sense:

  • extract a method is_dlt_table_or_column that checks if name has a prefix. I know this is simple but since we already have many places that needs it - it makes sense
  • see how it is done in Schema and replace all the checks with function above
  • extract a function that cleans single table
  • taking dictionary as input is constraining. take Iterable of table schemas
  • where is the test?

return data_tables, dlt_tables


def changes_without_dlt_changes(
Copy link
Collaborator

Choose a reason for hiding this comment

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

this name was correct in context of callback function. here it just removed "dlt entities" from a list of tables. so (1) it needs a different name (2) it makes sense to split it into many functions. see my general review

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