Skip to main content

Export: Avro IDL

Converts the data contract to Avro IDL.

datacontract export avro-idl orders.odcs.yaml --output orders.avdl

Running this against the example orders contract produces:

/** Tracks customer orders and their line items for analytics and reporting. */
protocol Orders {
/** One row per customer order. */
record orders {
/** Unique identifier of the order. */
string order_id;
/** Timestamp when the order was placed. */
string order_timestamp;
/** Reference to the customer who placed the order. */
string customer_id;
/** Total amount of the order in cents. */
double order_total;
/** Current fulfilment status of the order. */
string status;
}
/** One row per line item within an order. */
record line_items {
/** Unique identifier of the line item. */
string line_item_id;
/** Reference to the parent order. */
string order_id;
/** Stock keeping unit of the purchased product. */
string sku;
/** Number of units purchased. */
int quantity;
}
}