Init
How to use the init command to set up Buster projects
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
Command Options
Option | Description |
---|---|
--destination-path PATH | Specify 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:
- Authentication Check: Verifies you’re authenticated with the Buster API (run
buster auth
first if not) - Database Selection: Prompts you to select your database type from supported options
- Connection Details: Collects connection information for your chosen database
- Credential Verification: Tests the connection to ensure it works
- Project Configuration: Creates a buster.yml file with your settings
- 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:
Examples
Basic Initialization
Interactively creates a buster.yml
file in the current directory.
Custom Destination Path
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.