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

Make the Ampersand compiler read a dataset, to prepare for migration #1430

Open
stefjoosten opened this issue Jul 23, 2023 · 1 comment
Open

Comments

@stefjoosten
Copy link
Contributor

stefjoosten commented Jul 23, 2023

Problem

As a migration engineer, I want to use the population in an existing database as part of the initial population of a migrated database.

Solution

I want the compiler to read all triples from an external database, and write them to the current database.

Considerations

  1. We may be able to reuse some code that is used to validate the Haskell semantics against the database semantics (--validate). That would be the code to attach to the database and to read stuff from it.
  2. There are two tasks that can be done in parallel:
    • read the population from an existing (running) MariaDB server.
    • write the population to the current MariaDB server.
  3. For future maintainability, we will want to reuse this for reading Excel sheets, and other structured sources.
  4. To enable verifiable and maintainable code, we want to read data from the database into a structure that contains triples (i.e. a dataset).
@stefjoosten
Copy link
Contributor Author

Design choices

  1. This functionality shall be implemented as a command line command of the Ampersand compiler, so that it can be called from the migration orchestrator, a Github action, or any other external user.
  2. There will be a Haskell data structure, that implements a set of triples together with a type function for atoms (see the theory)
    data Dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants