Parse and Validate Semantic Models

The buster parse command validates your semantic model YAML definitions to ensure they are correctly formatted and contain all required fields. This is an essential step before deploying models to the Buster platform.

Basic Usage

buster parse

Command Options

OptionDescription
--path PATHOptional path to a specific model .yml file or directory of models to validate. If not provided, uses settings from buster.yml or the current directory.

What the Parse Command Does

When you run buster parse, the command:

  1. Searches for semantic model YAML files in the specified path or configuration
  2. Parses each file to verify its syntax and structure
  3. Validates that all required fields are present
  4. Checks for description placeholders that need to be replaced with actual content
  5. Resolves model configurations with defaults from your buster.yml file
  6. Reports any errors or warnings it encounters

Validation Checks

The command performs several types of checks:

  • Syntax validation: Ensures the YAML is correctly formatted
  • Schema validation: Verifies that models follow the Buster semantic model schema
  • Field validation: Checks that required fields are present (name, data_source_name, schema)
  • Description validation: Identifies any placeholder descriptions that need to be replaced
  • Reference validation: Ensures relationships reference valid models and dimensions

Output

The command provides a detailed report including:

  • Total files scanned
  • Files processed and excluded
  • Models successfully parsed
  • Models with errors
  • Lists of successful models and errors encountered

Examples

Validate All Models

Parse and validate all semantic models according to buster.yml configuration:

buster parse

Validate Specific File

Parse and validate a specific semantic model file:

buster parse --path models/orders.yml

Validate Models in Directory

Parse and validate all model files in a specific directory:

buster parse --path semantic_models/

Error Messages

Common error messages you might encounter:

  • Missing required field: A critical field like name, data_source_name, or schema is missing
  • Invalid format: The YAML syntax is incorrect
  • Placeholder description: A description contains "" placeholder text
  • Duplicate names: Multiple models or dimensions have the same name
  • Configuration resolution failure: Cannot resolve configurations with buster.yml defaults

Integration with Workflow

The parse command is typically used in this workflow sequence:

  1. Generate models with buster generate
  2. Validate models with buster parse
  3. Fix any validation errors
  4. Deploy models with buster deploy

Best Practices

  1. Run Before Deployment: Always run parse before deploying to catch issues early
  2. Address All Warnings: Fix placeholder descriptions and other warnings for better usability
  3. Version Control: Commit only validated model files to your repository
  4. Continuous Integration: Include the parse command in CI workflows to catch issues automatically