-
Notifications
You must be signed in to change notification settings - Fork 50
feat(QTDI-1060): db mappings #1017
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
...st/java/org/talend/sdk/component/design/extension/repository/RepositoryModelBuilderTest.java
Outdated
Show resolved
Hide resolved
...runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/ComponentManager.java
Outdated
Show resolved
Hide resolved
...runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/ComponentManager.java
Outdated
Show resolved
Hide resolved
...nent-server-model/src/main/java/org/talend/sdk/component/server/front/model/ComponentId.java
Outdated
Show resolved
Hide resolved
component-tools/src/main/java/org/talend/sdk/component/tools/validator/ActionValidator.java
Outdated
Show resolved
Hide resolved
documentation/src/main/antora/modules/ROOT/pages/_partials/generated_actions.adoc
Outdated
Show resolved
Hide resolved
...src/main/java/org/talend/sdk/component/sample/feature/databasemapping/service/UIService.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
# Conflicts: # component-tools/src/main/java/org/talend/sdk/component/tools/validator/ActionValidator.java # sample-parent/sample-features/pom.xml
This comment has been minimized.
This comment has been minimized.
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.
I'm worried that we put such specific action inside the core of Component.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
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.
Pull Request Overview
This PR adds support for dynamic database schema mappings throughout the component tooling, runtime, and server layers.
- Introduces the
@DatabaseSchemaMapping
service annotation with validation logic inActionValidator
and corresponding unit tests. - Extends the TaCoKit schema guesser to capture an
ORIGIN_TYPE
property and updates tests to assertsourceType
in output columns. - Propagates database mapping metadata to the component index via
ComponentSchemaEnricher
and adds server‐side tests for mapping metadata exposure.
Reviewed Changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
component-tools/.../ActionValidator.java | Added findDatabaseMappingsErrors to validate annotated methods |
component-tools/.../ActionValidatorTest.java | New unit tests for valid/invalid database mapping actions |
component-runtime-di/.../TaCoKitGuessSchema.java | Emit sourceType from ORIGIN_TYPE schema property |
component-runtime-di/.../TaCoKitGuessSchemaTest.java | Updated test to expect sourceType in JSON output |
component-runtime-manager/.../ComponentSchemaEnricher.java | Enrich component metadata with database mapping keys |
component-runtime-manager/.../ComponentSchemaEnricherTest.java | Tests for mapping metadata on components |
component-server/.../ComponentResourceImplTest.java | Test for retrieving mapping metadata via REST API |
component-api/.../DatabaseSchemaMapping.java | New service annotation definition |
component-api/.../DatabaseMapping.java | Added to component API for static mapping declarations |
Comments suppressed due to low confidence (2)
component-tools/src/main/java/org/talend/sdk/component/tools/validator/ActionValidator.java:259
- [nitpick] Variable name
optionParameter
is ambiguous. Consider renaming tooptionParameterErrors
to clarify this stream holds validation error messages.
final Stream<String> optionParameter = finder
component-tools/src/test/java/org/talend/sdk/component/tools/validator/ActionValidatorTest.java:101
- This test uses
Arrays.asList
andCollectors.toList()
but the imports forjava.util.Arrays
,java.util.List
, andjava.util.stream.Collectors
may be missing. Add them to ensure the test compiles.
final List<String> errors = validator.validate(finder, Arrays.asList(ActionDatabaseMappingKO.class))
component-tools/src/main/java/org/talend/sdk/component/tools/validator/ActionValidator.java
Show resolved
Hide resolved
...rc/main/java/org/talend/sdk/component/runtime/manager/extension/ComponentSchemaEnricher.java
Outdated
Show resolved
Hide resolved
...ent-api/src/main/java/org/talend/sdk/component/api/service/schema/DatabaseSchemaMapping.java
Outdated
Show resolved
Hide resolved
...est/java/org/talend/sdk/component/runtime/manager/extension/ComponentSchemaEnricherTest.java
Show resolved
Hide resolved
The implementation is still too specific to the studio. It uses Studio's implementation of file mapping as a core element. |
Analysis Details1 IssueCoverage and DuplicationsProject ID: org.talend.sdk.component:component-runtime |
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.
Contacted Yves.
Looks like the implementation approach was agreed.
It's studio specific.
Maybe if we find smth better in future, we would be able to deprecate this one and replace it with a new one.
Conceptually this project becomes less and less public and universal =)
Issues
Related pull requests
build pr