Table options

With Databricks table visualizations you can manually reorder, hide, and format data. This article describes how you can control data presentation in table visualizations.

A table visualization can be manipulated independently of the original cell results table.

You can:

  • Reorder columns by dragging them up or down using the Column Handle handle

  • Hide columns by toggling the Visibility Icon icon

  • Format columns using the format settings

Format columns

You can format some common data types–text, numbers, dates, and Booleans. Databricks also has special support for non-standard column types like images, JSON documents, and links. To display type-specific formatting options, select the type in the Display as field.

Conditionally format column colors

You can configure the font colors for column results to a static color or a range of colors based on comparing the column value to a threshold.

  1. Edit the visualization.

  2. Optionally, set the default font color to a non-default value.

  3. Under Font Conditions, click + Add condition.

  4. Select the column, the threshold, the comparator, and the font color if the comparison succeeds.

    The threshold can be a numeric type, string, or date. For the comparison to succeed, the threshold must be the same data type as the column. For example, to colorize results whose values exceed the numeric value 500000, create the threshold > 500000, rather than > 500,000. Numeric types, strings, and dates are supported.

  5. Optionally add more conditions.

Common data types

You can control how data is displayed. For example, you can:

  • Display floats out to three decimal places

  • Show only the month and year of a date column

  • Zero-pad integers

  • Prepend or append text to your number fields

Text

The Allow HTML content field has the following behavior:

  • Enabled: HTML content is run through an HTML sanitizer and the column is rendered as HTML.

  • Disabled: The content is displayed without rendering the HTML.

Numeric and date-time

For reference information on formatting numeric and date and time data types, see:

Special data types

Databricks supports the following special data types: image, JSON, and link.

Image

If a field in your database contains links to images, select Image to display the images inline with your table results. This is especially useful for dashboards. In the following dashboard, the Customer Image field is a link to an image that Databricks displays in-place.

Dashboard with images

JSON

If your data returns JSON formatted text, select JSON. This lets you collapse and expand elements in a clean format.