export DBT_PROFILE=local
# Run a specific model
uv run dbt run --select model_name
# Run with Makefile shortcut
make run-local cmd="run --select model_name"
Option 2: Execute in AWS ECS Fargate
Once your template is deployed to AWS you can run dbt in the cloud environment:
export AWS_PROFILE=<your_profile>
export ENVIRONMENT=<your_environment>
make run cmd="run"
This will trigger an ECS Fargate task to execute the specified dbt command and store results in Snowflake.
Deployment
For manual deployment:
# Set required environment variables
export AWS_PROFILE=<your_profile>
export ENVIRONMENT=<your_environment>
cd pipelines/transform
# Build and deploy
make deploy
This process:
Builds the Docker image locally
Pushes it to ECR
The next time you trigger an ECS task, it will use the latest image.
Common Commands
# Development
make run-local cmd="run" # Run dbt locally with specified command
make run-local cmd="test" # Run dbt tests locally
make run-local cmd="docs generate" # Generate dbt documentation
# Cloud Execution
make run cmd="run" # Run dbt in ECS Fargate
make run cmd="test" # Run tests in ECS Fargate
# Deployment
make build # Build Docker image
make deploy # Build and deploy to ECR