Coder Social home page Coder Social logo

Comments (2)

nikki-t avatar nikki-t commented on August 21, 2024 1

I was able to implement the CMR query which returns a list of granule URs present in CMR for a specified time range. I started to implement the Hydrocron query but ran into some confusion around DynamoDB queries.

I would like to query the hydrocron tables in a way that returns all granuleUR with a range_start_time between a specified range which I can determine from the CMR query. So something this:

items = hydrocron_table.query(
            IndexName="GranuleURIndex",
            KeyConditionExpression=(Key("range_start_time").between(start_time, end_time))
        )

But when I try to do this the query produces an error and complains that I have not included a "key schema element" in the query:

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the Query operation: Query condition missed key schema element

From my understanding you cannot query DynamoDB on a date range only and instead would need to perform a scan which is costly.

For now I am going to query Hydrocron by granuleUR which I can get by iterating over the CMR query results to perform the query. This will allow me to automatically see what is in CMR but not in Hydrocron.

I won't be able to easily determine what is in Hydrocron but not in CMR (or overlap between the two). I think we would to set up another global secondary index on the "range_start_time" with a range key of "granuleUR" if we want to facilitate a different query. Although I am not sure that quite fits with the DynamoDB use case.

@torimcd - Does this fit with your understanding of DynamoDB queries?

Any objections to de-prioritizing determining what is in Hydrocron but not CMR since we were only going to log those results for now?

from hydrocron.

nikki-t avatar nikki-t commented on August 21, 2024 1

We will de-scope determining overlap and what exists in Hydrocron but not CMR for now. Create #206 to track future work.

from hydrocron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.