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

Figure out a preferable way to return checkpoints data. #177

Closed
5 tasks
Tracked by #180 ...
benedeki opened this issue Mar 18, 2024 · 2 comments
Closed
5 tasks
Tracked by #180 ...

Figure out a preferable way to return checkpoints data. #177

benedeki opened this issue Mar 18, 2024 · 2 comments
Assignees
Labels
DB Issues touching the Database part of the project question Further information is requested

Comments

@benedeki
Copy link
Contributor

Background

As each counterpoint has (potentially) multiple measurements, if multiple checkpoints are to be returned from a function what would be the best way to return them.

Questions To Answer

  1. How to return data of multiple Checkpoints

Options

  1. Each measurement in each checkpoint are returned as one row, including checkpoint identification (grouping is done on app level)
  2. Measurements are grouped by checkpoint and returned in a complex type (`ARRAY[JSON]' perhaps?)
  3. No such possibility, there would be function to return checkpoints, and then each checkpoint would need to be queried separately
  4. Something different?

Desired Outcome

The method of choice to return these data.

Tasks

Additional Info/Resources [Optional]

@benedeki benedeki added the spike Proof of concept, research and investigation tasks label Mar 18, 2024
@benedeki benedeki added the DB Issues touching the Database part of the project label Mar 18, 2024
@benedeki benedeki added this to the Atum release 0.2 milestone Mar 18, 2024
@benedeki benedeki self-assigned this Mar 21, 2024
@benedeki benedeki added question Further information is requested and removed spike Proof of concept, research and investigation tasks labels Mar 21, 2024
@benedeki
Copy link
Contributor Author

Changing it rather to Question instead of Spike.

@benedeki
Copy link
Contributor Author

benedeki commented Mar 21, 2024

After some impromptu conversation in the office we figured that the best slution, at least for now is:

    OUT id_checkpoint UUID,
    OUT checkpoint_name TEXT,
    OUT measure_name TEXT,
    OUT measure_columns TEXT[],
    OUT measurement_value JSONB,
    OUT checkpoint_time TIMESTAMP WITH TIME ZONE

always ordered by id_checkpoint first to ensure, that measurements from the same checkpoint are after each other.

@benedeki benedeki closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB Issues touching the Database part of the project question Further information is requested
Projects
Archived in project
Development

No branches or pull requests

1 participant