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

Option to download all reach and node data for a given reach using one call #255

Open
Travis-Simmons opened this issue Oct 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Travis-Simmons
Copy link

Right now, we are grabbing the features we need for a reach, then doing separate calls to grab those features for each node in the reach. It would be great for the number of calls, speed, and AWS costs on our end to be able to submit a request and get all of the reach and node data back. Please comment if this is not the standard format for feature requests and I will update the issue.

@torimcd
Copy link
Collaborator

torimcd commented Oct 23, 2024

Thanks @Travis-Simmons - I can see this being possible in two ways, curious what you expect/prefer to see:

  1. both the reach feature and the node features returned together in the same featurecollection (are you using geoJSON or CSV output type)? This would likely be a change to the feature=Reach behavior to maybe have a flag or a special field that indicates 'return all nodes for this reach as well as the reach specified'
  2. an option when querying nodes to query by reach_id instead of node_id? (A change to the feature=Node behavior, would not return the reach data so would still require 2 queries on your end)

@nikki-t I think both options would require setting up another GSI on the nodes table to allow querying by reach_id, though it looks like node_id contains the reach_id of the associated reach, so maybe there's some tricky ways around this by doing something like using the granuleUR output from the reach query to find the associated node granule, and filtering to the right node features by allowing a partial node_id to be entered. We'll need to do a feature analysis to sort out the details.

@torimcd torimcd added the enhancement New feature or request label Oct 23, 2024
@Travis-Simmons
Copy link
Author

The first option is exactly what I am looking for! If I could do the equivalent of something like feature=Reach&Node and get the csv (we are using csv) returned for all of the nodes and the reach that would be perfect.

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

2 participants