ColumnNameAndType

pydantic model openapi_client.models.column_name_and_type.ColumnNameAndType

Column definition used in dataset schemas and schema-update requests. For schema updates, required fields depend on SchemaOperation (addcolumn: name+type; dropcolumn: name; renamecolumn: name+renameColumnTo; updatecolumndatatype: name+type; updatespatialtype: name+spatialType).

Fields:
field name: Optional[StrictStr] = None

Column name (current name for rename/drop/update operations).

field type: Optional[StrictStr] = None

Column data type (required for addcolumn and updatecolumndatatype).

field rename_column_to: Optional[StrictStr] = None (alias 'renameColumnTo')

New column name. Required when SchemaOperation is renamecolumn (with name set to the existing column name).

field spatial_type: Optional[StrictStr] = None (alias 'spatialType')

Spatial type for the column. Required when SchemaOperation is updatespatialtype.

field is_not_null: Optional[StrictBool] = None

Indicates the column has a NOT NULL constraint. Auto-set for primary-key columns on Redshift datasets.

to_str()

Returns the string representation of the model using alias

Return type:

str

to_json()

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str)

Create an instance of ColumnNameAndType from a JSON string

Return type:

Optional[Self]

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj)

Create an instance of ColumnNameAndType from a dict

Return type:

Optional[Self]