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

Create DB function to get all checkpoint data of a flow #187

Closed
Tracked by #180
benedeki opened this issue Apr 15, 2024 · 1 comment · Fixed by #192
Closed
Tracked by #180

Create DB function to get all checkpoint data of a flow #187

benedeki opened this issue Apr 15, 2024 · 1 comment · Fixed by #192
Assignees
Labels
DB Issues touching the Database part of the project enhancement New feature or request

Comments

@benedeki
Copy link
Contributor

benedeki commented Apr 15, 2024

Background

We need to read all the measurements across a checkpoint of certain name within a flow.

Feature

Create a DB function that will return all checkpoint and its measurements for the given flow (identified by main partitioning)

Proposed Solution

Function signature

CREATE OR REPLACE FUNCTION flows.get_flow_checkpoints(
    IN i_flow_partitioning  JSONB,
    IN i_limit             INT DEFAULT 5,
    IN i_checkpoint_name   TEXT DEFAULT NULL,
    OUT status             INTEGER,
    OUT status_text        TEXT,
    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
) RETURNS SETOF record AS

for output order by checkpoint_time and id_checkpoint

i_limit and i_checkpoint_nameare optional. IfNULL` no limit and no filter on checkpoint name.

Depends on #178

@benedeki benedeki moved this from 🆕 To groom to 🔖 Sprint in CPS small repos project Apr 15, 2024
@benedeki benedeki added enhancement New feature or request DB Issues touching the Database part of the project dependent The item depends on some other open item (Issue or PR) labels Apr 15, 2024
@benedeki benedeki changed the title Create DB function to get all checkpoint data Create DB function to get all checkpoint data of a flow Apr 15, 2024
@benedeki benedeki removed the dependent The item depends on some other open item (Issue or PR) label Apr 15, 2024
@benedeki
Copy link
Contributor Author

lsulak added a commit that referenced this issue Apr 22, 2024
lsulak added a commit that referenced this issue Apr 24, 2024
lsulak added a commit that referenced this issue Apr 24, 2024
@lsulak lsulak moved this from 🔖 Sprint to 👀 In review in CPS small repos project Apr 24, 2024
lsulak added a commit that referenced this issue Apr 24, 2024
lsulak added a commit that referenced this issue Apr 26, 2024
lsulak added a commit that referenced this issue Apr 26, 2024
Implemented DB function that gets all checkpoints for a flow
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in CPS small repos project Apr 26, 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 enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants