516 dynamic tables and columns#718
Draft
Simon-Will wants to merge 28 commits intoOpenEnergyPlatform:developfrom
Draft
516 dynamic tables and columns#718Simon-Will wants to merge 28 commits intoOpenEnergyPlatform:developfrom
Simon-Will wants to merge 28 commits intoOpenEnergyPlatform:developfrom
Conversation
c85c1fe to
fc5bfec
Compare
8550e9a to
f31622c
Compare
68eb2ad to
2158b8a
Compare
5 tasks
Collaborator
|
On 19.02.2026 a new public version of the Gesamtdatenexport will have a bugfix concerning attributes in the .xsd files: This will probably have no effect on what you have done already right? |
Author
|
Interesting, thanks for pointing that out, @pt-kkraemer! It shouldn't make any difference for now because we make all attributes except the primary keys nullable anyway. But I'll be sure to check out the difference in the XSD files to make sure I understand that point correctly. As for this whole PR, it's almost ready now as you can see from the checklist. If anyone already has comments on the approach, please let them be heard. I don't think I will make substantial changes to the non-testing code anymore. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A first attempt at creating tables based on the MaStR XSD files.
Checklist until this is really ready:
mastr_table_to_db_modelreturned fromMastr.generate_data_model. E.g. by adding a function that generates a Python code snippet with the SQLALchemy models/tables.Mastr.generate_data_modelreturn SQLAlchemy core tables, not ORM models. They are easy to just print and a user can then copy them to their code & modify them. They are also the best common ground. After all, some users might not use the ORM.format_mastr_table_to_db_tablethat makes printing easy for the user.utils_download_bulk.pybecause I found date handling unnecessarily complex. Add interactive download functionality for MaStR date selection #696 #697 changes the same code and adds support for retrieving available XML download dates. If Add interactive download functionality for MaStR date selection #696 #697 is merged, we have to update this retrieval logic to also retrieve the documentation download dates.Type of change (CHANGELOG.md)
Added
Mastr.generate_data_modelthat downloads the newest MaStR documentation and uses the XSD file to build SQLAlchemy models from the contained definitionsUpdated
Mastr.downloadwith two optional new argumentsmastr_table_to_db_table, with which the user can pass their own database schema, andalter_database_tables, with which the user can preventopen-mastrfrom issuing any DDL statements.Removed
Mastr.translate. The user can now get English table and column names by passingenglish=Trueto thegenerate_data_modelordownloadmethod.Workflow checklist
Automation
Closes #516
PR-Assignee
Reviewer