Bruin is a unified analytics platform that enables data professionals to work end-to-end for their data pipelines. This extension is built to improve the development experience of data products on Bruin using Visual Studio Code.
-
Syntax Coloring: Applies YAML syntax coloring to Bruin code in SQL files (enclosed between
/* @bruin ... @bruin */
) and Python files (enclosed between""" @bruin ... @bruin """
). -
Folding Range Provider: Allows folding and unfolding Bruin code regions in SQL and Python files for a cleaner workspace.
-
Auto Folding: You can configure this setting by editing your through the Settings UI under Extensions > Bruin.
Important Note The Pylance extension, which provides advanced language support for Python, may affect the expected behavior of the auto-folding feature. If you encounter inconsistencies with code regions not folding as expected in python files, please review your Pylance settings. Adjusting these settings or temporarily disabling Pylance may help to resolve these issues.
-
Dynamic SQL Content Viewer: Renders SQL content within a VS Code Webview, enabling content copying, and automatically refreshing on file updates.
-
Adapting to theme changes: the SQL Content Viewer matches the vscode current theme (dark/light/Dark high contrast)
SQL Validation and Execution: Introduces SQL validation and execution capabilities, including custom messages for invalid SQL queries and the ability to run SQL with additional flags such as --downstream
and --full-refresh
as well as date inputs.
Date Inputs:
- Introduces date picker inputs for selecting start and end dates for run
command.
- Comes with Exclusive End Date
checkbox, adjusting the end date to the end of the selected day (23:59:59.999999999
).
- Open Visual Studio Code.
- Navigate to the Extensions view (Ctrl+Shift+X).
- Search for "Bruin" and click Install.
Note: Before using the new features, ensure that you have the Bruin CLI installed on your system. For guidance on installing the Bruin CLI, please refer to the official documentation link to documentation.
-
Syntax Coloring: Enclose Bruin code with delimiters:
- In SQL files
/* @bruin
and@bruin */
. - In Python files
""" @bruin
and@bruin """
.
- In SQL files
-
Folding Range: Bruin code regions are automatically foldable.
-
Dynamic SQL Content Viewer:
- Open any SQL file.
- Click the rocket icon 🚀 in the top right menu.
- A Webview will open, previewing the SQL content.
- Click the "Copy" icon to copy the content.
- The theme color of the view can match the vscode current theme (dark/light/Dark high contrast)
- The SQL Preview automatically responds to changes in checkboxes and dates, ensuring an immediate re-render.
SQL Validation and Execution:
- Validation: Click the "Validate" button to validate the current SQL. A custom notification will appear based on the validation results.
- Run with Flags: Click the "Run" button to execute the SQL command in an integrated terminal. This can include optional flags based on user input (checkboxes & date inputs).
- Start and End Dates:
1. Select start and end dates using the date picker inputs to specify the time range for the run command.
2. An "Exclusive End Date" checkbox is available. When checked, the end date is adjusted to the precise end of the selected day (23:59:59.999999999
).
3. The dates will be appended as flags directly to the Bruin run command
- Added "Validate All Pipelines" and "Validate Current Pipeline" options for flexibility.
- Introduced "Run Current Pipeline" option in the run button.
- Enhanced error alert display and error handling.
- Fix the exclusive end date function to accurately calculate the exclusive end time.
- Implemented a new panel to display the lineage of a single asset.
- The lineage updates automatically when switching between assets.
- Click the refresh button next to the tab label to update content after modifying dependencies.
- Requires CLI version update to fetch asset types for lineage display.
- Markdown rendering for AssetDetails description.
- "Exclusive End Date" checkbox defaults to checked, ensuring reactive updates.
- Fixed schedule display inconsistency in asset details.
- Added error handling for "no such file or directory" (ENOENT).
- Introduced new tab for dynamic asset details, with alert message feature.
- Clearly differentiated render errors and validation errors to eliminate confusion.
- Adjusted CSS for
run
andvalidate
buttons for improved visual coherence and usability. - Fixed extension activation issues for Snowflake, BigQuery SQL, and other languages.
- Enhanced validation error display and added expand functionality for error details.
- Resolved visual issues with icons and loading spinner within the validate button component.
- Transitioned from string-based lineage data handling to JSON parsing mechanism.
- Resized buttons and added separators for better visual hierarchy.
- Integrated dropdown menus for streamlined command execution.
- Improved SQL preview visibility in non-Bruin assets.
- Resolved functionality issues on Windows platforms.
- Updated webview with tabbed interface for General and Asset Lineage tabs.
- Added line numbers to SQL preview for better code review and debugging.
- Various fixes and improvements including rendering, responsiveness, and CSS adjustments.
- Added Windows compatibility and automatic workspace directory detection.
- Implemented SQL validation functionality with conditional flags.
- Fixed auto folding issues and improved error message handling.
- Introduced auto-folding settings and resolved compatibility issues.
- Launched with syntax coloring, code folding, and dynamic SQL content viewer.
To update to the latest version, search for "Bruin" in the Extensions Marketplace and click the Update button.