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

Change mappings not using reserved "Source" fragment #256

Open
switschel opened this issue Sep 18, 2024 · 0 comments
Open

Change mappings not using reserved "Source" fragment #256

switschel opened this issue Sep 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@switschel
Copy link
Collaborator

Currently we use the "Source" fragment in the target template to map external IDs to C8Y, when enabled in the mapping.
The source fragment is actually reserved for the "internal C8Y ID" which is generated when a document is created.
This was working fine because the mappings are only executed by the mapper microservice who can exchange the mapped ID to source to an external ID. When mappings should be used somewhere else like thin-edge this approach is conflicting.

Suggestion:
Add a new fragment to all the target templates:
"externalSource":{"externalId":"Device4711","type":"c8y_Serial"}
This is also used by thin-edge.io already.

Map external IDs to that new fragment. Keep source in the template but use it for internal ID mappings.

This is a breaking change as we change the mapping data model, but we could provide a script to migrate.

@switschel switschel added the enhancement New feature or request label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant