Learn how to develop dbt models, Python applications, and Streamlit dashboards using the IDE with best practices and examples
Focus: Master the development workflows for different types of data applications, from dbt transformations to Python scripts and interactive Streamlit dashboards.The 5X IDE provides specialized development environments for the most common data development tasks. This guide covers practical workflows for building data models, applications, and dashboards with real examples and best practices.
Development EnvironmentThe IDE comes pre-configured with multiple Python versions, dbt environments, and development tools. No additional setup required for basic development tasks.
The IDE comes pre-installed with multiple Python versions managed through pyenv, providing flexibility for different project requirements and dependency compatibility.Available Python versions:
Python 3.9.23 - Legacy support for older projects
Python 3.10.18 - Stable version with good package compatibility
Python 3.11.13 - Default version (set by PYENV_VERSION)
Python 3.12.11 - Latest stable with performance improvements
Python 3.13.4 - Cutting-edge features and optimizations
Python virtual environments provide isolated dependency management for your projects, preventing conflicts between different project requirements.Create a virtual environment:
Copy
Ask AI
# Using Python 3.11.13 (default)/root/.pyenv/versions/3.11.13/bin/python -m venv my_project_env# Using specific Python version/root/.pyenv/versions/3.10.18/bin/python -m venv legacy_project_env
Activate and manage environments:
Copy
Ask AI
# Activate environmentsource my_project_env/bin/activate# Verify active environment (should show your env path)which python# Deactivate when finisheddeactivate
Maintain project dependencies using requirements.txt files for reproducible environments across team members and deployment targets.Create requirements.txt:
Copy
Ask AI
# Core data processingpandas==2.0.3numpy==1.24.3# API and web requests requests==2.31.0urllib3==2.0.4# Visualizationmatplotlib==3.7.2seaborn==0.12.2# Development toolsjupyter==1.0.0pytest==7.4.0
The dbt Power User extension provides the most integrated development experience, automatically using your configured dbt settings from Settings → Credentials including version selection, database connections, and target configuration.Key workflows:
Model execution
Run and test modelsExecute individual models, selections, or entire dbt projects with integrated test runner
Lineage visualization
Understand dependenciesInteractive dependency graphs showing upstream and downstream model relationships
Documentation
Generate docsCreate and view dbt documentation with integrated preview and automatic refresh
SQL compilation
Preview compiled SQLSee the actual SQL that will be executed before running models
For users preferring terminal-based workflows, the IDE provides pre-configured dbt virtual environments for each supported version.Activate dbt environment:
Copy
Ask AI
# List available dbt environmentsls /root/.venv# Activate specific dbt versionsource /root/.venv/dbt-1.8/bin/activate# Verify dbt installationdbt --version
# Navigate to your dbt project directorycd /path/to/your/dbt/project# Run entire projectdbt run# Run specific modelsdbt run --select staging.stg_customers+# Test your modelsdbt test# Generate documentationdbt docs generatedbt docs serve
Model development example:
Copy
Ask AI
-- models/staging/stg_customers.sqlSELECT customer_id::int AS customer_id, LOWER(TRIM(email)) AS email, INITCAP(first_name) AS first_name, INITCAP(last_name) AS last_name, created_at::timestamp AS created_at, CASE WHEN status = 'A' THEN 'active' WHEN status = 'I' THEN 'inactive' ELSE 'unknown' END AS statusFROM {{ source('crm', 'customers') }}WHERE customer_id IS NOT NULL
The IDE provides powerful lineage visualization capabilities that help you understand data flow and model dependencies throughout your dbt project.To view lineage:
Open any dbt model file in the editor
Navigate to the Lineage tab in the IDE interface
Explore interactive dependency graphs showing:
Upstream models and sources feeding into current model
Downstream models consuming current model output
Cross-project dependencies and external table references
Lineage features:
Interactive navigation - Click nodes to jump between related models
Dependency depth control - Adjust how many levels of dependencies to display
Impact analysis - Understand which models will be affected by changes
Visual debugging - Identify circular dependencies and optimization opportunities