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

Breaking change: Major rework of postgresql tables and kafka data str… #655

Conversation

wagmarcel
Copy link
Member

@wagmarcel wagmarcel commented Dec 26, 2024

…uctures

The Flink SQL structure turned out to be too static to allow further developments. Therefore a redesign of Kafka Topics, database tables and Flink SQL rules were needed. After the redesign, more flexible attribute types, in particular:

  • Update of Flink SQL structures
    • removed attribute names from entity tables All attributes names are put into the same attributeValue field (instead of having dedicated object/value field depenend of attribute type. This allows adding in future GEO attributes for instance
    • Simplified Entities tables Now all entities are put into the same table (instead of having a table per entity) This allows easier SQL joins between entities and attributes
  • Database update to manage subattributes id and parentId are added to the tables to model sub and sub-sub attributes lang and unitType have been added to cover the respective NGSI-LD entities
  • Database update to manage arbitrary attribute types
    • Analogue to Flink updates the Postgresql database table attributes contains now a generic "attributeValue" field and lang and unitType fields.
  • In addition, added deleted field to entities, attribues and timescaledb tables to manage deleted attributes, entities and subelements more flexible
  • Redesign of core statementsets
    • To make the core-staementsets for forwarding ngsi-ld data to the respective alert topic
  • Update of Flink to version 1.19
  • Kafka Topic updates
    • Attributes have now explicit synced field to detect whether there is an update necessary from attributes to Scorpio broker
    • All entities are now put to iff.ngsild.entities topic
    • lang and unitType fields are added according to the NGSI-LD specification

…uctures

The Flink SQL structure turned out to be too static to allow further developments. Therefore a redesign
of Kafka Topics, database tables and Flink SQL rules were needed. After the redesign, more flexible
attribute types, in particular:

- Update of Flink SQL structures
 - removed attribute names from entity tables
   All attributes names are put into the same attributeValue field (instead of having dedicated object/value field
   depenend of attribute type. This allows adding in future GEO attributes for instance
 - Simplified Entities tables
   Now all entities are put into the same table (instead of having a table per entity)
   This allows easier SQL joins between entities and attributes
- Database update to manage subattributes
  id and parentId are added to the tables to model sub and sub-sub attributes
  lang and unitType have been added to cover the respective NGSI-LD entities
- Database update to manage arbitrary attribute types
 - Analogue to Flink updates the Postgresql database table attributes contains now a generic "attributeValue" field
   and lang and unitType fields.
 - In addition, added deleted field to entities, attribues and timescaledb tables to manage deleted attributes, entities and subelements
   more flexible
- Redesign of core statementsets
 - To make the core-staementsets for forwarding ngsi-ld data to the respective alert topic
- Update of Flink to version 1.19
- Kafka Topic updates
 - Attributes have now explicit synced field to detect whether there is an update necessary from attributes to Scorpio broker
 - All entities are now put to iff.ngsild.entities topic
 - lang and unitType fields are added according to the NGSI-LD specification

Signed-off-by: marcel <[email protected]>
@wagmarcel wagmarcel marked this pull request as ready for review December 26, 2024 22:50
@abhijith-hr abhijith-hr merged commit f84fab3 into IndustryFusion:main Dec 27, 2024
4 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.

2 participants