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

Data migration script from kvalobs and KDVH #14

Open
intarga opened this issue Feb 9, 2024 · 1 comment
Open

Data migration script from kvalobs and KDVH #14

intarga opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@intarga
Copy link
Member

intarga commented Feb 9, 2024

No description provided.

@intarga intarga added the enhancement New feature or request label Feb 9, 2024
@intarga intarga added this to the Beta testing milestone Feb 9, 2024
@lcoram
Copy link
Collaborator

lcoram commented Jun 21, 2024

https://gitlab.met.no/oda/oda/-/blob/main/tools/kdvh-importer/dataandflags.go?ref_type=heads#L105
If we look inside each of the CustomDataFunction: sections for this list of tables, you could hopefully take the information that is currently being wrapped in a oda.timeseriesdata at the end of the function and insert it appropriately into the data and flags tables.
Two alternatives:

  1. stick with the golang code, and rewrite the part that puts it into ODA to write to appropriately formated file. Then stream that in a similar way to mentioned below?
  2. understand where the dump files are, and read them in as more appropriately formated data for potentially reusing the way of using stdin.

NOTE: all data from kdvh could just be written to correct (no original value). Maybe makes more sense, since KDVH ostensibly only stores one value (and it is the corrected one)?

Validation - at least need very good error reporting / handling to ensure that we know all data we tried to write was written. Otherwise need to run through the dumps a second time, to confirm all rows now exist in the database.

@Lun4m Lun4m mentioned this issue Sep 25, 2024
2 tasks
@Lun4m Lun4m self-assigned this Oct 30, 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

3 participants