Skip to content

v0.9.5 - Service Pack 1

Latest

Choose a tag to compare

@Peter-L-SVK Peter-L-SVK released this 09 Oct 23:01
· 16 commits to main since this release
6d8859b

What's New in v0.9.5 SP1

Keboola Integration (New)

Full end-to-end integration with the Keboola data platform for cloud
transformation pipelines. Upload a raw CSV, run a BigQuery or Snowflake
transformation, and download the cleaned result — all from within the app.

Pipeline flow

  • Upload raw CSV to Keboola Storage, automatically replacing any existing
    table with the same display name (no manual cleanup between runs).
  • Transform — creates or updates the transformation config in Keboola
    (BigQuery and Snowflake supported; DuckDB planned).
  • Trigger the transformation job via the Queue API.
  • Wait for completion with configurable timeout (default 300s).
  • Download the cleaned output table as CSV into a configurable directory.

Pipeline cancellation

  • Cancel button in the runner dialog. Stops within one poll cycle (~2s).
  • Sends a server-side kill to the Queue API so the Keboola job doesn't
    continue running after cancellation.
  • Correctly handled during any step (upload, transform, trigger, wait).

Editor bridge

  • SQL transformations are edited in the studio's main editor (full syntax
    highlighting, autocomplete, find/replace).
  • A magic keboola://<profile>/sql URI routes Ctrl+S back to the profile
    instead of a file on disk.

Profile management

  • Multiple profiles (one per dataset or engine) stored as JSON in
    ~/.config/sql-schema-studio/.
  • API tokens stored in the system keyring, never in JSON.

Schema Cache

A new in-memory cache for table structures eliminates redundant
information_schema.columns queries.

  • TTL-based expiry (default 5 minutes) — self-heals if a change happens
    outside the app.
  • DDL invalidation — CREATE/ALTER/DROP/TRUNCATE/RENAME clears
    the cache immediately. INSERT/UPDATE/DELETE do not, since table
    structure is unchanged.
  • Observable behavior — cache hit/miss logged at DEBUG level for tuning.

Query History Improvements

  • Category filter — All / SELECT / INSERT / UPDATE / DELETE / DDL / Other.
  • Refresh Entry — re-save an old query to the database if it's been
    pushed out of the default window.
  • Robust Load — loading a query no longer fails for entries outside the
    default 50-entry window; all 1000 most recent are visible and loadable.
  • Clear History now asks for confirmation.

Theme Mode Split

Editor and terminal color schemes now have independent light/dark modes.

  • Editor theme mode — Auto / Light / Dark. Filters the editor color
    scheme dropdown to matching variants.
  • Terminal theme mode — Auto / Light / Dark. Completely independent of
    the editor, so you can have a dark editor for code readability and a light
    terminal for daylight output.
  • Auto follows the system gtk-application-prefer-dark-theme setting at
    dialog-open time.

Better Table Preview

Double-clicking a table in the browser now mirrors DBeaver's behavior:

  • No auto-execution — the preview query is inserted into the editor but
    not run. Press F5 to execute.
  • Reuses empty tabs — if the active tab is empty, the preview replaces
    its content. Otherwise a new tab opens.
  • Status bar hint — "Preview for schema.table loaded. Press F5 to run."

Aligned Results Tables

Query result tables now use symmetric cell padding, so the │ separators
line up perfectly under monospace fonts. Long values are truncated with an
ellipsis at 40 characters to keep the layout intact.

Also added format_data_type() — a static helper that shortens verbose
PostgreSQL type names for display:

  • character varying(50) → varchar(50)
  • timestamp without time zone → timestamp
  • numeric(10, 2) → numeric(10,2)

Download Filename Fix

Keboola's export_to_file names the downloaded file after the table, but
whether it includes a .csv suffix depends on the API version. The
downloader now tries four glob patterns in order and renames the file to
.csv if needed, so the result is immediately usable by file managers,
Excel, and pandas.

Log Tab Fix

The Log tab in the results panel was empty because LogHandler.emit()
called a _log() method that had been dropped, and the handler was attached
to the root logger (whose level is WARNING) instead of the application
logger. Both are fixed — the Log tab now shows all application logs
(connection, cache miss/hit, preview loads, query execution) in real time.

Bug Fixes

Connection Dialog

  • UnboundLocalError on non-SSH failure — testing a non-SSH connection
    that fails referenced tunnel in the except block before it was assigned.
    Moved tunnel = None before the try and used a finally clause.

Python Hook Executor

  • load_hook always raised ValueError — the raise statement was outside
    the validation if-block. Moved it into the failure path so valid hooks
    return their instance properly.

Query Executor

  • Missing async wrapper — DatabaseConnector.execute() was called by
    QueryExecutor but never defined. Added an async wrapper that runs the
    blocking execute_sync() in a thread pool executor.

Settings

  • State leak via shallow copy — _load() used DEFAULTS.copy() (a
    shallow copy) before passing to _deep_merge(), which writes into nested
    dicts. This permanently mutated DEFAULTS['editor']['tab_width'] if any
    loaded settings file had a different value. Replaced with
    copy.deepcopy(DEFAULTS).

Schema Designer

  • Undo/redo action loss — _get_current_state() did not preserve the
    action name, so redo always logged "Redo: unknown". The action name is now
    carried across the stack swap.

Editor

  • New tabs ignored user color scheme — _setup_sql_language()
    hardcoded a fallback scheme list and always picked "classic" first,
    causing a visible flicker before _apply_settings_to_tab() applied the
    user's choice. Now reads from Settings directly.

Browser

  • REFRESH_TRIGGER_COMMANDS included DML — a 1000-row bulk import
    would trigger 1000 browser refreshes. Removed the constant; only DDL
    triggers a refresh (which it already did correctly).

Actions

  • _on_copy crash on missing focus — added guard for None focus
    widgets.

Tests

The test suite grew from 71 to 212 unit tests, all passing:

Suite Tests
Connection dialog 5
DB connector 16
Models 12
Query executor 3
Keboola (client, profiles) 20
Keboola pipeline 14
Schema cache 19
Schema parser 33
Settings 14
Query history 36
DataBridge (Python ↔ Perl) 16
Results panel formatting 20
Total 212

The new test_settings suite caught the DEFAULTS.copy() state leak.
The new test_schema_parser suite verified the parser handles comments,
CHECK constraints, composite keys, schema-qualified tables, and real-world
schemas without silently dropping columns or FKs.

Documentation

  • CONTRIBUTING.md, ROADMAP.md, and README.md updated for v0.9.5.
  • Fixed RGB tuple corruption from the version-bump script ((0.3, 0.5, 0.9) was being mangled into (0.3, 0.5, 0.9.5) in SCHEMA_COLORS).

Deferred to v0.9.9 (SP2)

  • FK Editor dialog (direction, ON DELETE / ON UPDATE rules)
  • Bidirectional FK arrows in the schema designer
  • Lazy loading in the database browser
  • Migration generator (up/down SQL diffs)
  • Schema comparison (live DB vs designer)
  • pg_dump / GraphQL export

Upgrading from v0.9.5

No database migration needed. Existing ~/.config/sql-schema-studio/settings.json
and keboola_profiles.json are forward-compatible. The theme_mode setting
is replaced by theme_mode_editor and theme_mode_terminal; the old value
is ignored and both default to "auto".

What's Changed

  • fix(connection): resolve UnboundLocalError in test connection by @Peter-L-SVK
  • fix(hooks): load_hook always raised ValueError by @Peter-L-SVK
  • feat(core): add async execute() wrapper to DatabaseConnector by @Peter-L-SVK
  • fix(keboola): align client import between hook and config dialog by @Peter-L-SVK
  • feat(keboola): phase 1 — client, profiles, engines by @Peter-L-SVK
  • feat(keboola): phase 2 — transformation pipeline + hook integration by @Peter-L-SVK
  • feat(keboola): phase 3 — UI integration by @Peter-L-SVK
  • fix(keboola): resolve five API integration bugs by @Peter-L-SVK
  • feat(browser): add schema cache and safer table preview by @Peter-L-SVK
  • fix(results): align table columns, shorten types, fix Log tab by @Peter-L-SVK
  • test(core): add SchemaCache unit tests by @Peter-L-SVK
  • test(core): add SchemaParser unit tests by @Peter-L-SVK
  • test(utils): add Settings unit tests by @Peter-L-SVK
  • test(core): add QueryHistory unit tests by @Peter-L-SVK
  • test: add DataBridge and ResultsPanel.format_data_type tests by @Peter-L-SVK
  • fix(utils): use deepcopy of DEFAULTS in Settings._load by @Peter-L-SVK
  • fix(schema_designer): preserve action name through undo/redo by @Peter-L-SVK
  • chore(config): remove unused REFRESH_TRIGGER_COMMANDS by @Peter-L-SVK
  • fix(editor): new tabs respect user's color scheme by @Peter-L-SVK
  • feat(preferences): split theme mode into editor and terminal by @Peter-L-SVK
  • fix(query_history): robust load, category filter, refresh entry by @Peter-L-SVK
  • feat(keboola): add pipeline cancellation by @Peter-L-SVK
  • fix(keboola): delete existing table before upload by @Peter-L-SVK
  • fix(keboola): ensure downloaded CSV has .csv extension by @Peter-L-SVK

Full Changelog: v0.9..1...v0.9.5-SP1

What's Changed

Full Changelog: v0.9.1...v0.9.5-SP1