Skip to content

Scratchpad Output

This page describes how to view the results of your queries and code in the Console and Table tabs of the output panel.

When you click Run Query in the Query Panel, or Run All in the Scratchpad panel, the results appear in the output panel. These can be the results of a query built in the Query panel or of an ad hoc query in the Scratchpad panel. View them in one of the tabs at the bottom of the Query window:

If this panel is not visible, click View, in the top left-hand corner, and toggle Output Panel to display it.

By default, the Console tab shows your results. To show them in another tab, select that tab, then run the query again: click Run Query in the Query panel, or Run All in the Scratchpad panel.

You can specify a custom timeout for queries executed in both the Query panel and the Scratchpad panel. For details, see Execution timeout.

Expand Output display

To expand the output panels to full screen:

  • Click the icon in the top right-hand corner of the output panels.

    When the panel is expanded, all other panels on the Query window are hidden.

To restore the output panel to normal size:

  • Click the icon in the top right-hand corner of the expanded window.

    This restores the view of the other panels.

The following example shows how to use the expand icon on the Table panel.

Maximize Query output table view

Console

The console is the default display for query output. Right-click in the console for additional options.

Console controls on right-click include clear and display code in console

These options are described in the following table.

Option Description
Clear Clears the console.
Toggle Source Expressions Toggles the display of the code expression in the console.

Messages written to STDOUT and STDERR also appear in the console. Refer to Scratchpad logs and console messages.

Table

The Table tab is a more structured display for query output with additional filter options. Results are paged and you can filter them.

Tabulated output of a Scratchpad query.

Setting Description
First Display the first n items. n depends on the number selected from the # of results drop-down.
Last Display the last n items. n depends on the number selected from the # of results drop-down.
Random Display a random selection of items, without replacement.
# of results drop-down Select how many first items to display (10, 100, 1,000, or 10,000).

To view results, you can either:

  • Click Run All on the Scratchpad panel
  • Press Ctrl+Enter or Ctrl+D in the main q or Python editor to execute the current line or selection

Column Filter

To sort the data in the Table view, click a column header. Click again to reverse the order.

Additional filtering options are available from the triple-bar menu, above the data.

  • Use AND/OR statements alongside operators Contains, Not contains, Equals, Not equal, Starts with, or Ends with for more comprehensive filtering.
  • For example, the following results are filtered on the neighborhood column where it Contains the value Tot. Filter criteria can be combined using AND and OR.

Column filter available on selection of "triple bar".

Next steps

Back to top