Skip to content

Ensure collection_name query parameter returns SWOT data for child collections #292

@nikki-t

Description

@nikki-t

It looks like there is an error when trying to retrieve Prior Lake Version D data from sub-collection: https://soto.podaac.earthdatacloud.nasa.gov/hydrocron/v1/timeseries?collection_name=SWOT_L2_HR_LakeSP_prior_D&feature=PriorLake&feature_id=7230381002&start_time=2022-01-01T00:00:00%2b00:00&end_time=2025-10-31T00:00:00%2b00:00&fields=lake_id,time_str,wse

The same for River Nodes and Reaches. I think the code to connect child collections to the parent collection name and then query the Hydrocron tables needs to be adjusted.

Child collections:

  • SWOT_L2_HR_RiverSP_reach_D,
  • SWOT_L2_HR_RiverSP_node_D,
  • SWOT_L2_HR_LakeSP_prior_D

I think we should take a look at the API query code to see if/how the child collection table names are determined:

for table_info in constants.TABLE_COLLECTION_INFO:
if (table_info['collection_name'] in collection_name) & (table_info['api_feature_type'].lower() == feature_type.lower()):
table_name = table_info['table_name']
partition_key = table_info['partition_key']
sort_key = table_info['sort_key']
break
else:
return {'Items': []}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    needs:triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions