Metadata.add_field(table, field, field_type, field_subtype=None, properties=None)[source]

Add a new field to the indicated table.

  • table (str) – Table name to add the new field, it must exist.

  • field (str) – Field name to be added, it must not exist.

  • field_type (str) – Data type of field to be added. Required.

  • field_subtype (str) – Data subtype of field to be added. Optional. Defaults to None.

  • properties (dict) – Extra properties of field like: ref, format, min, max, etc. Optional. Defaults to None.


ValueError – If the table does not exist or it already contains the field.