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

#229 Allow passing transformer configuration to the constructor #231

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

yruslan
Copy link
Collaborator

@yruslan yruslan commented Aug 16, 2023

…instead of the full app configuration.

@@ -98,7 +98,7 @@ class OperationSplitter(conf: Config,
def createTransformation(operationDef: OperationDef,
clazz: String,
outputTable: String)(implicit spark: SparkSession): Seq[Job] = {
val transformer = ClassLoaderUtils.loadConfigurableClass[Transformer](clazz, conf)
val transformer = ClassLoaderUtils.loadEntityConfigurableClass[Transformer](clazz, operationDef.operationConf, conf)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the actual change - the rest is tooling and tests.

@github-actions
Copy link

github-actions bot commented Aug 16, 2023

Unit Test Coverage

File Coverage [93.22%] 🍏
OperationSplitter.scala 96.64% 🍏
ClassLoaderUtils.scala 86.96% 🍏
Total Project Coverage 80.03% 🍏

@yruslan yruslan marked this pull request as ready for review August 16, 2023 07:24
@yruslan yruslan requested a review from jirifilip as a code owner August 16, 2023 07:24
Copy link
Collaborator

@jirifilip jirifilip left a comment

Choose a reason for hiding this comment

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

Great, looks very useful for passing more complicated configuration to the Transformer :)

@yruslan
Copy link
Collaborator Author

yruslan commented Aug 16, 2023

Thanks a lot for reviewing!

@yruslan yruslan merged commit f31a849 into main Aug 16, 2023
@yruslan yruslan deleted the feature/229-transformer-config branch August 16, 2023 08:37
@yruslan yruslan mentioned this pull request Aug 18, 2023
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