Daco
Translators

Translators

The Daco CLI can translate your OpenDPI port schemas into code and configuration for different platforms and languages. Each translator takes JSON Schema definitions and generates native type definitions or schema configurations.

Available Translators

TranslatorOutputDescription
avro.avscApache Avro schema definitions
databrickspyspark.pyDatabricks PySpark StructType definitions
databricksscala.scalaDatabricks Scala case classes
databrickssql.sqlDatabricks SQL CREATE TABLE statements
gotypes.goGo struct definitions with JSON tags
protobuf.protoProtocol Buffers message definitions
pydantic.pyPydantic model classes
pyspark.pyPySpark StructType definitions
python.pyPython dataclass definitions
scala.scalaScala case classes
sparkscala.scalaSpark Scala StructType definitions
sparksql.sqlSpark SQL CREATE TABLE statements

Usage

Use the daco ports translate command to generate code:

# Translate all ports to PySpark
daco ports translate --format pyspark

# Translate a specific port
daco ports translate daily_metrics --format gotypes

# Output to a specific directory
daco ports translate --format pydantic --output ./models

Each translator page includes:

  • Example input/output
  • Supported JSON Schema features
  • Type mappings and limitations

On this page