Skip to main content

semantic-export

Synopsis

starlake semantic-export [options]

Description

Export the semantic models stored in metadata/semantic/ to another semantic format. Supported formats: ossie (Apache Ossie, incubating), lookml (a Looker project: one view file per table plus a model file with explores) and tmdl (a Power BI TMDL folder: database.tmdl, model.tmdl, relationships.tmdl and one tables/<table>.tmdl per table).

For ossie, Starflow-specific attributes with no Ossie counterpart are preserved in custom_extensions blocks under the STARLAKE vendor name.

For lookml, --connection sets the Looker connection name in the model file.

For tmdl, --connection names the Starflow connection used to derive each table's Power Query source; simple aggregate metrics are translated to DAX and anything else becomes a BLANK() measure carrying the original SQL in a TODO comment.

starlake semantic-export
--format tmdl
--model ecommerce_analytics
--connection snowflake_prod
--output /tmp/tmdl-models

Parameters

ParameterCardinalityDescription
--format <value>OptionalTarget format: ossie (default), lookml or tmdl
--model <value>OptionalName of a single semantic model to export (model 'name' field or file basename). All models by default
--output <value>OptionalOutput directory. Defaults to metadata/semantic/export/ with one subfolder per format
--connection <value>Optionallookml: Looker connection name written to the model file; tmdl: Starflow connection used to derive the Power Query source. Defaults to the project's connectionRef
--reportFormat <value>OptionalReport format: console, json, html