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

Feature/multiple datasinks #308

Merged
merged 25 commits into from
Jul 26, 2024

Conversation

jannisjung
Copy link
Contributor

@jannisjung jannisjung commented Jun 14, 2024

This PR is built upon PR #300 Adds support for multiple datasinks in one route

Userstory:

As a data integrator
I want to integrate a single datasource with multiple properties
so that I can break down complex data objects into single SMEs

Rules:

  • Only one Data point per datasource is in scope (multiple datapoints from same datasource in separate outputs is not in scope)

Changes

  • reworks routes configuration
    • adds optional attribute datasinkMappingConfiguration to routes.json
    • this maps a datasink (as key) to an array of dataTransformers (as value)
    • datasinks and -transformers additionally should be defined as before seperate arrays (to avoid breaking changes)
    • If there were specifiedmore data sinks in the array than in the datasinkMappingConfiguration, these sinks receive the unmodified data from the datasource
    • If there were specifiedmore dataTransformers in the array than in the datasinkMappingConfiguration the additional data transforers are ignored.
    • If no datasinkMappingConfiguration is provided, all provided data transfoemer will be applyed equally for each datasink.

Example Configuration:

[
	{
		"datasource": "mqttSource",
		"transformers": 
		[
			"transformer1",
			"transformer2",
			"transformer3"
		],
		"datasinks":
		[
			"sink1",
			"sink2",
			"sink3"		],
		"datasinkMappingConfiguration":
		{
			"sink1": ["transformer1"],
			"sink2": ["transformer2"],
			"sink3": ["transformer2", "transformer3"]
		},
		"trigger": "event"
	}
]

Aegid1 and others added 5 commits June 14, 2024 11:42
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
…echanic for Datasink-to-Transformer-Mapping

Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
…ables Usage of new datasinkMappingConfiguration attribute * Adds Examples for handling all data transformation equally per datasink * Adds Examples for handling data transformation individually per datasink

Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert cosmetic changes


client.close();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please readd this to close the client

Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Copy link
Contributor

@aaronzi aaronzi left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍🏻
The only thing I don't agree with are the cosmetic changes (even tho we have the BaSyx formatter).
For that I am referring to our code of conduct:
https://github.com/eclipse-basyx/basyx-applications/blob/main/.github/CONTRIBUTING.md#did-you-fix-whitespace-format-code-or-make-a-purely-cosmetic-patch

Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
@jannisjung jannisjung closed this Jul 19, 2024
@jannisjung jannisjung reopened this Jul 19, 2024
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
jannisjung and others added 4 commits July 22, 2024 14:14
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
@jannisjung jannisjung requested a review from aaronzi July 26, 2024 07:42
Signed-off-by: Jannis Jung <jannis.jung@iese.fraunhofer.de>
@aaronzi aaronzi merged commit 8cfea14 into eclipse-basyx:main Jul 26, 2024
2 checks passed
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.

None yet

3 participants