Dataset Querying#

When connected to an ODC Database, these methods are available for searching and querying:

dc = Datacube()
dc.index.datasets.{method}

get(id_[, include_sources])

Get dataset by id

search([limit, source_filter])

Perform a search, returning results as Dataset objects.

search_by_metadata(metadata)

Perform a search using arbitrary metadata, returning results as Dataset objects.

search_by_product(**query)

Perform a search, returning datasets grouped by product type.

search_eager(**query)

Perform a search, returning results as Dataset objects.

search_product_duplicates(product, *args)

Find dataset ids who have duplicates of the given set of field names.

search_returning(field_names[, limit])

Perform a search, returning only the specified fields.

search_summaries(**query)

Perform a search, returning just the search fields of each dataset.

has(id_)

Is this dataset in this index?

bulk_has(ids_)

Like has but operates on a multiple ids.

can_update(dataset[, updates_allowed])

Check if dataset can be updated.

count(**query)

Perform a search, returning count of results.

count_by_product(**query)

Perform a search, returning a count of for each matching product type.

count_by_product_through_time(period, **query)

Perform a search, returning counts for each product grouped in time slices of the given period.

count_product_through_time(period, **query)

Perform a search, returning counts for a single product grouped in time slices of the given period.

get_derived(id_)

Get all datasets derived from a dataset (NOT recursive)

get_field_names([product_name])

Get the list of possible search fields for a Product (or all products)

get_locations(id_)

Get (active) storage locations for the given dataset id

get_archived_locations(id_)

Get archived locations for a dataset

get_datasets_for_location(uri[, mode])

Find datasets that exist at the given URI