FieldConstraint · Python
Describe a field name, its type and whether it is required.
In this guide
Purpose and lifecycle
Node stores readonly name, fieldType and required properties. Python wraps a native constraint and exposes properties.
DatasetSchema.addField/add_field accepts these three values directly; it does not accept a FieldConstraint object.
Definition and availability
Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.
Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.
class FieldConstraintMembers
| Member | Kind | Return / value type | Source status |
|---|---|---|---|
| __init__ | method | Not annotated; see behavior notes | Present in source |
| name | property | str | Present in source |
| field_type | property | FieldType | Present in source |
| required | property | bool | Present in source |
__init__()
Store a field name, FieldType and required flag. Pass those values to DatasetSchema.addField/add_field to apply validation.
Returns / value: Not annotated; see behavior notes.
def __init__(self, name: str, field_type: FieldType, required: bool)| Parameter | Type | Required / default | Meaning |
|---|---|---|---|
| name | str | Required | Field, header or attribute name for this operation. |
| field_type | FieldType | Required | A FieldType enum member. |
| required | bool | Required | Whether an empty or missing field is rejected. |
name
Unique field name or context-specific item name.
Returns / value: str.
def name(self) -> strfield_type
Read the declared value. Its exact type is shown in the signature.
Returns / value: FieldType.
def field_type(self) -> FieldTyperequired
Reject empty/whitespace-only required fields; default false for job fields.
Returns / value: bool.
def required(self) -> boolErrors and operational limits
Invalid native type arguments may raise a binding error.
Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.