odb_filter

../../_images/ODB_FILTER.png

Performs an ODB/SQL query on an Odb database (ODB-1) or file (ODB-2 or ODC). The result is always an ODB file (in ODC format).

Tip

A tutorial about using ODB in Metview can be found here.

Note

This function performs the same task as the ODB Filter icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.

odb_filter(**kwargs)

Performs an ODB/SQL query on an ODB.

Parameters
  • odb_filename (str, default: "off") – Specifies the path to the input ODB.

  • odb_data (Odb) – Specifies the input as an Odb. If both odb_data and odb_filename are specified odb_data takes precedence.

  • odb_query (str) – Specifies the ODB/SQL query.

  • odb_nb_rows (number, default: -1) – Specifies the maximum number of rows in the result. If -1 is given here the number of rows is not limited in the output.

  • fail_on_empty_output ({"yes", "no"}, default: "yes") – Controls the behaviour when the resulting Odb is empty. If it is set to “no” odb_filter() will return None, while if the value is “yes” the Python script running odb_filter() will abort.

Return type

Odb