sdk.data_type.create()

elements.sdk.api.data_type

Create a data type.

Create a new data type definition that categorically describes data sources and informs algorithms on how to process them.

Parameters

  • name (str) - The unique name of the data type
  • description (str) - A description of the data type
  • schema (str) - The schema definition for the data type
  • data_source_ids (List[str]) - List of data source IDs that produce this data type
  • sensor_type (str) - The type of sensor (e.g., "optical", "sar", "telemetry")

Returns

DataType - The created data type object

Example(s)

# Create a data type
data_type = await sdk.data_type.create(
    name="vessel_detections",
    description="Vessel detection results from maritime imagery",
    schema='{"type": "object", "properties": {"vessel_id": {"type": "string"}}}',
    data_source_ids=["sentinel-1", "planet-imagery"],
    sensor_type="optical"
)

# Output (DataType)
name: "vessel_detections"
description: "Vessel detection results from maritime imagery"
sensor_type: "optical"
data_source_ids: "sentinel-1"
data_source_ids: "planet-imagery"