Add source DB option to Fill from DB (BRU-4473)#757
Conversation
Adds a split button + dropdown to the Columns tab so users can fill columns from a non-destination connection. For ingestr assets, the source_connection is auto-suggested at the top of the menu. Selecting an entry forwards --connection <name> to 'bruin patch fill-columns-from-db' (CLI #2079). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adopts the same split-button styling used by the Validate button on the General tab: bg-editor-button-bg caret with -ml-px to abut the main button, and dropdown items rendered with vscode-button. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Wraps the button content in flex items-center justify-center and gives status icons (loading/success/error) explicit ml-1 mr-1.5 so they sit inset from the button's left edge with consistent spacing before the label, matching the Validate button. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The h-3 w-3 box was smaller than the 16px codicon glyph, so the icon overflowed the span and appeared misaligned at the button's left edge. Switch to text-sm mr-1 (same pattern as Materialization.vue:501) so the glyph sits centered with the label. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replaces vscode-button menu items with plain <button> so flex layout controls the inner truncation properly. Bumps menu width to w-64, truncates connection names (with title tooltip) and caps the type label at 40% width. Adds overflow-hidden + shadow-lg on the container so items can't bleed past the rounded border. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Adopts the same MenuItems positioning (left-0 xs:right-0), responsive width (w-56 xs:w-64), and item classes (text-2xs, bg-editorWidget-bg, hover:bg-editor-button-hover-bg) used by the Validate menu in AssetGeneral.vue. Items remain plain <button> instead of vscode-button so the inner flex+truncate keeps working for the name/type layout. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drops the flex justify-between layout that pushed the type to the right edge. Name and dim type label now flow inline (name + space + type), and the whole row truncates as a unit. Full string available on hover via title. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
source_connectionis auto-suggested at the top of the menu with asourcelabel.--connection <name>tobruin patch fill-columns-from-db(added upstream in bruin#2079).Closes BRU-4473.
Motivation
Users cloning a source table to e.g. MSSQL want to copy the schema exactly (nullability, columns with nulls). Today "Fill from DB" always reads from the destination, so the workaround is editing
pipeline.ymlto swap destination → source, save, fill, swap back. This PR removes that workaround.Files changed
webview-ui/src/components/asset/columns/AssetColumns.vue— split button + Headless UI menu listing connections; matches the Validate split-button styling.webview-ui/src/App.vue— passassetTypeandparametersprops toAssetColumns.src/panels/BruinPanel.ts— readconnectionfrom payload and append--connection <name>to fill-columns flags.CHANGELOG.md,README.md,package.json— 0.80.2 bump.Backwards compatibility
If a user is on a pre-#2079 bruin binary and clicks a connection from the menu, the CLI returns an unknown-flag error which is surfaced via the existing
fill-columns-messageerror path. No version gate needed.🤖 Generated with Claude Code