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

Get Resources at a Time #820

Merged
merged 2 commits into from
Mar 30, 2023
Merged

Get Resources at a Time #820

merged 2 commits into from
Mar 30, 2023

Conversation

Mythicaeda
Copy link
Contributor

Description

Added Hasura Function: get_resources_at_start_offset, which can be called as a query in GraphQL like:

query GetResources {
  getResourcesAtStartOffset(args: {_dataset_id: 1, _start_offset: "24:00:00"}) {
    id
    dataset_id
    dynamics
    is_gap
    name
    start_offset
    type
  }
}

Verification

The test getResourcesAtTimeFetchesLatestData was added to MerlinDBTests.

Additionally, the dataset/profile/event/topic tests were lightly refactored by moving the commonly repeated INSERT INTO X SQL calls into insertX methods.

Documentation

NASA-AMMOS/aerie-docs#21 has been updated to include adding this query to its tasks.

@Mythicaeda Mythicaeda added feature A new feature or feature request database Anything related to the database labels Mar 28, 2023
@Mythicaeda Mythicaeda requested a review from mattdailis March 28, 2023 16:17
@Mythicaeda Mythicaeda requested a review from a team as a code owner March 28, 2023 16:17
@Mythicaeda Mythicaeda self-assigned this Mar 28, 2023
@Mythicaeda Mythicaeda changed the title Feat/get resources at time Get Resources at a Time Mar 28, 2023
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 28, 2023 16:19 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 28, 2023 16:19 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 28, 2023 16:19 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda force-pushed the feat/get-resources-at-time branch from 62078f7 to ade754d Compare March 29, 2023 20:31
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 29, 2023 20:31 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 29, 2023 20:31 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 29, 2023 20:31 — with GitHub Actions Inactive
Copy link
Member

@camargo camargo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, LGTM!

* Add new test
* Add missing `fail`s on try-catches
* Removed `statement` parameter from `allocateDataset`
* Created `insertTopic`, `insertEvent`, `insertProfile`, `insertProfileSegment` methods
@Mythicaeda Mythicaeda force-pushed the feat/get-resources-at-time branch from ade754d to d668745 Compare March 30, 2023 17:10
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 30, 2023 17:10 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 30, 2023 17:10 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda temporarily deployed to e2e-test March 30, 2023 17:10 — with GitHub Actions Inactive
@Mythicaeda Mythicaeda merged commit 337107c into develop Mar 30, 2023
@Mythicaeda Mythicaeda deleted the feat/get-resources-at-time branch March 30, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Anything related to the database feature A new feature or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API for fetching all resources at a time
2 participants