find_feature#

dscat.queries.find_feature(cat, key, dataset, version, all_versions, table_name)[source]#

Look up features by name, table.name, or qualified id.

Parameters:
  • cat (dscat.index.Catalogue) – Open catalogue to read from.

  • key (str) – A bare variable name, a table.name, or a qualified id.

  • dataset (str or None) – Restrict to one dataset.

  • version (str or None) – Pin a version (needs dataset); the default scope is the latest.

  • all_versions (bool) – Search every version instead of only the latest.

  • table_name (str or None) – Restrict to one table.

Returns:

Every feature row matching key in scope; more than one row means the key is ambiguous.

Return type:

collections.abc.Sequence of sqlalchemy.engine.RowMapping