Skip to main content

Quick Start

Get up and running with Strata CLI in minutes.

Prerequisites

  • Ruby 3.4.4+ installed
  • Git installed

Install

gem install strata-cli

Workflow

1. Initialize a Project

Create a new Strata project directory with configuration files.

strata init PROJECT_NAME
  • PROJECT_NAME — Name of your project (creates a directory with this name)

Example:

strata init sales-analytics
# Creates a new project directory called "sales-analytics"
cd sales-analytics

2. Add a Datasource

Connect your project to a database.

strata datasource add ADAPTER
  • ADAPTER — Database type: postgres, snowflake, mysql, duckdb, athena, trino, sqlserver, druid

Example:

strata datasource add postgres
# Prompts for connection details and adds a PostgreSQL datasource

3. Test Datasource Connection

Verify the datasource connects successfully.

strata datasource test DATASOURCE_KEY
  • DATASOURCE_KEY — The key you assigned when adding the datasource

Example:

strata datasource test warehouse
# Tests connection to the datasource named "warehouse"

4. Create a Table Model

Generate a semantic table model from a physical database table.

strata create table PATH/TABLE_NAME
  • PATH — Folder path within models/ (e.g., common, store, catalog)
  • TABLE_NAME — Name for the semantic table model

Example:

strata create table common/customers
# Creates models/common/tbl.customers.yml

5. Create a Relationship

Define how tables join together.

strata create relation PATH/RELATION_NAME
  • PATH — Folder path within models/
  • RELATION_NAME — Name for the relationship file

Example:

strata create relation store/sales
# Creates models/store/rel.sales.yml

6. Audit the Model

Validate your semantic model before deployment.

strata audit

Example:

strata audit
# Checks YAML syntax, table definitions, relationships, and datasource connectivity

7. Deploy

Push your semantic model to the Strata server.

strata deploy

Example:

strata deploy
# Uploads validated model to your Strata server instance

Command Reference

CommandSyntaxDescription
initstrata init PROJECT_NAMEInitialize a new project
datasource addstrata datasource add ADAPTERAdd a datasource connection
datasource teststrata datasource test DATASOURCE_KEYTest datasource connectivity
datasource tablesstrata datasource tables DATASOURCE_KEYList tables in datasource
datasource metastrata datasource meta DATASOURCE_KEY TABLEShow table schema
create tablestrata create table PATH/TABLE_NAMECreate a semantic table model
create relationstrata create relation PATH/RELATION_NAMECreate a relationship file
table liststrata table listList defined table models
auditstrata auditValidate semantic model
deploystrata deployDeploy to Strata server

Next Steps