Skip to main content
Interactive console to execute SQL against your ResinKit-managed Flink SQL Gateway with live, streaming results.

Prerequisites

  • ResinKit API reachable (default http://localhost:8602)
  • JupyterLab/Notebook with Panel installed
  • Optional: personal access token or session cookie
import panel as pn
pn.extension("tabulator", "codeeditor")

Launch the UI

import resinkit as rsk
ui = rsk.show_flink_sql_ui()
ui.show()

Features

  • Automatic session: creates an initial Flink session on load and maintains it via periodic heartbeats
  • SQL editor: code editor with history dropdown and adjustable height
  • Max time: limit execution duration; set 0 for unlimited
  • Streaming results: each query opens a new tab with a live-updating table and query info
  • Cancel/Close: cancel running query; open/close sessions on demand

Workflow

1

Start or reuse a session

An initial Flink session is auto-created and maintained by heartbeats.
2

Enter SQL and submit

Use the editor to write SQL and click Submit.
3

Inspect streaming results

Each query opens a tab with live-updating rows, columns, and row counts.
4

Manage execution

Use Cancel to stop long-running queries or Close Session to end the session.

Tips

  • History menu reflects statements executed in the current session
  • Use the Max Time control to bound streaming jobs
  • Each streaming tab keeps up to 1000 visible rows by default
For exploratory work, keep Max Time small to avoid long-running jobs.

Programmatic notes

The UI is built on FlinkSQLManager and FlinkSQLResults:
  • FlinkSQLManager.create_session(session_name) opens a session
  • FlinkSQLManager.execute_sql_streaming(session_id, sql) yields server-sent JSON frames
  • FlinkSQLResults.add_query_result(query_id, result) stores frames for later inspection
If you need pandas DataFrames from Flink column metadata, use create_dataframe(data, columns).

Troubleshooting

  • If the kernel already has an event loop, Panel handles scheduling. Ensure you called pn.extension(...)
  • Session timeouts are handled via heartbeats; if expired, create a new session from the header controls
  • Auth or connectivity errors surface in the status bar