Converts the data contract into any custom format using a Jinja template. Specify the template path with --template.
datacontract export custom --template template.txt orders.odcs.yaml
You can use the ODCS object directly. data_contract is an OpenDataContractStandard instance; top-level fields include name, id, version, schema_ (the list of schemas), servers, team, etc.
Given this template.txt:
title:
schemas:
Running it against the example orders contract produces:
title: Orders
schemas:
- name: orders
- name: line_items
Add --schema-name to render a single schema. The template then also receives:
schema_name (str)schema (the SchemaObject from ODCS)datacontract export custom datacontract.odcs.yaml --template template.sql --schema-name orders