Skip to content
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

[297] Refactor config classes #480

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

the-other-tim-brown
Copy link
Contributor

What is the purpose of the pull request

Aims to address #297

Brief change log

  • Pass in a Map<String, String> of client properties when initializing the source client (can be done for target client's as well if there is need) which may contain other parameters required by a specific client that are not common to multiple formats.
  • Split out PerTableConfig into a SourceTable, TargetTable, and TableSyncConfig to decouple the sync specifics from the table configurations
  • HudiSourceConfig is now derived from the client properties Map<String, String>

Verify this pull request

  • Existing tests should pass

@daragu
Copy link
Contributor

daragu commented Jul 11, 2024

Great job!

? null
: table.getNamespace().split("\\."))
.catalogConfig(icebergCatalogConfig)
.formatName(tableFormat)
Copy link
Contributor

Choose a reason for hiding this comment

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

Set .additionalProperties(targetProperties)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no targetProperties currently, what should this contain?

.tableName(table.getTableName())
Properties sourceProperties = new Properties();
if (table.getPartitionSpec() != null) {
sourceProperties.put(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This property should be needed required if the sourceFormat is Hudi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's not required if the table is non-partitioned. I have another set of changes to remove the need for this config altogether that I can open source in the future

Copy link
Contributor

@ashvina ashvina left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thanks for the PR

@the-other-tim-brown the-other-tim-brown merged commit e162b3b into main Aug 19, 2024
2 checks passed
@the-other-tim-brown the-other-tim-brown deleted the 297-properties-based-config-2 branch August 19, 2024 01:21
@vinishjail97 vinishjail97 mentioned this pull request Oct 3, 2024
2 tasks
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.

3 participants