-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add table_def_changes function for lua unity exporter #8957
base: master
Are you sure you want to change the base?
Conversation
@@ -201,6 +207,35 @@ local function export_delta_log(action, table_def_names, write_object, delta_cli | |||
return response | |||
end | |||
|
|||
local function table_def_changes(table_def_names,table_descriptors_path,repository_id, source_ref, branch_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs
error("table path is required to proceed with Delta catalog export") | ||
end | ||
|
||
--if table_path is in the diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write the actual if expression
@@ -34,6 +34,18 @@ local function delta_log_entry_key_generator() | |||
end | |||
end | |||
|
|||
|
|||
-- Local function to get the table descriptor | |||
local function get_table_descriptor(repo, commit_id,table_name_yaml, table_descriptors_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit_id should instead be called ref since it can also be a branch name
Closes #8292
Change Description
Create a new method in lua:
delta_exporter.table_def_changes takes a list of all table defs and returns only the ones that have changed. This dovetails well with the delta_exporter.export_delta_log function which accepts a list of tables. This way we are only exporting the tables that have actually changed.
Background
See the reported bug
Bug Fix
If this PR is a bug fix, please let us know about:
Testing Details
How were the changes tested?