Skip to content

Getting Started

This guide will walk you through adding the PondPilot Widget to your webpage.

The widget is designed to be “drop-in”. By default, it looks for <pre> elements with the class pondpilot-snippet.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PondPilot Widget Demo</title>
</head>
<body>
<h1>My SQL Blog</h1>
<p>Here is an interactive query:</p>
<!-- 1. Create a container with the target class -->
<pre class="pondpilot-snippet">
SELECT * FROM generate_series(1, 5) AS t(n);
</pre>
<!-- 2. Load the widget script -->
<script src="https://unpkg.com/pondpilot-widget"></script>
</body>
</html>

The widget shines when querying data files like Parquet, CSV, or JSON.

You can query files directly via URL:

SELECT * FROM 'https://example.com/data.parquet' LIMIT 10;

The widget automatically resolves relative paths based on the current page URL or a configured baseUrl.

If you have a file sales.parquet in the same directory as your HTML file:

<pre class="pondpilot-snippet">
SELECT * FROM 'sales.parquet';
</pre>

Supported formats include:

  • 'data.parquet'
  • './data.parquet'
  • '/data.parquet'

If you are using a modern JavaScript framework or bundler:

  1. Install the package:

    Terminal window
    npm install pondpilot-widget
  2. Import it:

    import 'pondpilot-widget';

    The import automatically registers window.PondPilot and runs the auto-initializer (unless disabled).

  • Ctrl + Enter (or Cmd + Enter on Mac): Run the current query when the editor is focused.