Initialize a Buster Project

The buster init command guides you through setting up a new Buster project. It creates a configuration file, helps you connect to your data warehouse, and can automatically generate semantic models from your dbt catalog.

Basic Usage

buster init

Command Options

OptionDescription
--destination-path PATHSpecify the path where the buster.yml file should be created (defaults to current directory)

Configuration Process

When you run buster init, the following steps occur:

  1. Authentication Check: Verifies you’re authenticated with the Buster API (run buster auth first if not)
  2. Database Selection: Prompts you to select your database type from supported options
  3. Connection Details: Collects connection information for your chosen database
  4. Credential Verification: Tests the connection to ensure it works
  5. Project Configuration: Creates a buster.yml file with your settings
  6. Semantic Model Generation: Optionally generates initial semantic models from your dbt catalog

Supported Database Types

The init command supports connecting to:

  • Redshift
  • PostgreSQL
  • BigQuery
  • Snowflake
  • MySQL/MariaDB
  • SQL Server
  • Databricks

Each database type requires specific connection details that the command will prompt you for.

Working with dbt

The command automatically detects dbt projects by looking for a dbt_project.yml file. If found:

  • Model paths are suggested based on your dbt configuration
  • Database and schema settings are pre-populated
  • You’re offered the option to generate semantic models from your dbt catalog

Configuring Model Paths

During initialization, you’ll configure:

  • Model Paths: Directories containing your SQL models or dbt models
  • Semantic Model Paths: Where generated YAML files should be placed
    • Empty for side-by-side placement with SQL files
    • Specific directories for centralized storage

If you have a dbt project, the command will suggest paths based on your dbt configuration.

Example Output

After running the command, a buster.yml file is created with your configuration:

projects:
  - data_source_name: my_analytics
    database: my_database
    schema: analytics
    model_paths:
      - models
      - models/marts
    semantic_model_paths:
      - semantic_models

Examples

Basic Initialization

buster init

Interactively creates a buster.yml file in the current directory.

Custom Destination Path

buster init --destination-path /path/to/project

Creates the configuration in the specified directory.

Automatic .dbtignore Configuration

When generating semantic models side-by-side with your SQL files, the command automatically updates your .dbtignore file to exclude the generated YAML files from dbt processing. This prevents conflicts when running dbt commands.