Debugging Queries

hibase provides built-in debug windows that let you test your queries without running the full workflow. Parameters are automatically calculated from the workflow context, and results are displayed directly in the browser.

SQL Query Debug Window

Every SQL-based step has a Test Query button (🐞) that opens the SQL debug window. This window lets you:

  1. Edit the SQL in a full Monaco editor with syntax highlighting
  2. See auto-calculated parameters: if the step has a parameter query or step params, the debug window automatically parses and resolves them, pre-filling the query params JSON field
  3. Run the query: executes against the step's database and shows results in a paginated table (50 rows per page with navigation controls)
  4. Compile the query: see the fully interpolated SQL — all {{ }} templates resolved with actual parameter values. The raw and compiled editors are scroll-synced side by side.
  5. Copy compiled SQL: click the copy icon next to the compiled query label to copy the resolved SQL to your clipboard

The debug window has a timeout. If a query takes too long, it's automatically aborted and a timeout error is shown.

Auto-Parameter Resolution

When a step has parameter sources configured (parameter query, step params, or workflow-level params), the debug window resolves them automatically:

  • Parameter query SQL is executed first to produce parameters
  • Step params JSON is parsed, with hibase templating language expressions evaluated
  • Multiple parameter sources are chained: each source's output feeds into the next as interpolation context
  • If parameter iteration is configured, you can navigate between parameter sets with Previous / Next buttons

Connector Query Debug Window

For connector-based steps, the debug window works similarly but is adapted for API calls:

  1. Endpoint parameters: configure the API call parameters inline
  2. Query params: same auto-resolution as SQL queries
  3. Run the query: executes the API call and shows results in a table
  4. Streaming error logs: if the API call fails, the error response logs are streamed directly to your browser in a log viewer dialog, showing the full request/response trace with timestamps

Record limit: there is a fixed limit on the number of records returned by debug queries. This is shown in a helper note next to the endpoint configuration.

Connector Query Limit

Connector queries support a Limit field that controls how many records are fetched. As the inline documentation explains:

"You can limit the result of the query to a fixed or dynamic value. You can also set a boolean limit trigger based on the incoming data, for example: {{ $element.created_at < $today }}"

This dynamic limit is useful for incremental API fetching — you can stop paginating once you've reached records you've already processed.


Streaming Logs

The Logs button on the workflow edit page opens a real-time log viewer. Logs are organized by execution group and update live as the workflow runs:

  • Log groups: each workflow execution creates a log group, showing start time and error count
  • Live streaming: as the workflow executes, log lines appear in real time
  • Error highlighting: error-level log entries are visually distinguished
  • Historical logs: browse through past executions' log groups to investigate issues

The logs viewer is also automatically opened when you hit Run now — it subscribes to the new execution's log group immediately so you can watch the workflow execute in real time.