Customizing Views

Views provide a structured way to organize and manage data, but they are also highly customizable. Within the Catalog Builder, the Schema on the right-hand side offers a range of options to edit and refine your View YAML.

These customizations allow you to improve usability, enhance data clarity, and provide stakeholders with flexible analysis options—all without writing additional SQL.

Schema

The schema displays a list of available customization options you can use in the view YAML file. We've broken these down into:

  • Descriptive fields
  • Source configuration
  • Caching
  • Fields and field formatting

Descriptive fields

See descriptive field YAML examples here.

Field nameDescription
nameThe name of the view. This must be unique within the catalog. Defaults to the file name. Optional.
labelA user-friendly label for the view. This is what is displayed in the UI, and defaults to the name. Optional.
descriptionA description of the view. Optional.

Source configuration

See source configuration YAML examples here.

Field nameDescription
sourceThis details the query or queries that need to be run in order to populate the view.
source.connectionThe connection key to use when running the query (or null to use DuckDB). This must be a connection that is available in the catalog.
source.queryThe SQL query to run in order to populate the view. This is defined in the dialect of the database.
source.dependenciesA list of cells that are dependencies of this view. Optional.
source.dependencies[*].nameThe name of the cell. Must be unique with the dependency list.
source.dependencies[*].queryThe SQL or Python query that is run in order to populate the cell.
source.dependencies[*].languageThe type of the cell. This can be one of sql or python. Optional.
source.dependencies[*].connectionThe connection key to use when running the query (or null to use DuckDB). This must be a connection that is available in the catalog. This is ignored for Python cells. Defaults to the connection of the view. Optional.

Caching

See caching YAML examples here.

Field nameDescription
cachingCaching settings for source dependencies attached to a connection. Optional.
caching.durationHow long source dependency results are cached (in seconds).
caching.scheduleA cron expression for the source dependency refresh schedule. This value may need to be enclosed in single quotation marks. Optional.

Fields formatting

See fields and field formatting YAML examples here.

Field nameDescription
fieldsA list of fields that are available in the view.
fields[*].nameThe name of the field. Must be unique within this view.
fields[*].labelA user-friendly label for the field. This is what is displayed in the UI, and defaults to the name. Optional.
fields[*].descriptionA description of the field. This is shown in the UI when the field is hovered over. Optional.
fields[*].expressionThe SQL expression that defines the field, defined in the dialect detailed here. Defaults to the name of the field. Optional.
fields[*].typeThe type of the field. This can be one of string, number, integer, date, or boolean. If unspecified, this defaults to string. Optional.
fields[*].groupPlaces the field within a group of this name in the UI. Optional.
fields[*].primary_keyWhether or not the field is a primary key. Optional.
fields[*].hiddenWhether or not the field is hidden. Useful for joining keys you don't want to expose in the UI. Optional.
fields[*].aggregatesA list of aggregates to apply to the field: count, count_distinct, sum, avg, median, mode, max, min, stddev_pop, stddev_samp, var_pop, var_samp, null (where null means no function is applied). These will appear as a collapsible group in the UI. Optional.
fields[*].timeframesA list of timeframes by which to group the field: year_trunc, quarter_trunc, month_trunc, week_trunc, day_trunc, hour_trunc, minute_trunc, second_trunc, year, quarter, month, week, day_of_year, day_of_month, day_of_week, hour, minute, second, null (where null means no function is applied). These will appear as a collapsible group in the UI. Optional.
fields[*].formatThe default format for this field when used in visualizations. Optional.
fields[*].format.typeThe format type. This can be one of raw, currency, number, percentage, scientific, long_date, short_date, or custom_date.
fields[*].format.currencySpecifies the currency to use when formatting numbers as currency (e.g., USD, EUR, GBP, AUD, CAD, CHF, JPY, CNY). For a full list of currency codes see here. Optional.
fields[*].format.display_unitsAllows display units like thousands, millions, billions, or trillions. Optional.
fields[*].format.negative_valuesDefines the style for negative numbers, either accounting or standard. Optional.
fields[*].format.thousand_separatorA boolean indicating whether to use a thousand separator. Optional.
fields[*].format.decimalsSets the number of decimal places for numeric values. Optional.
fields[*].format.prefixAdds a prefix to the formatted value. Optional.
fields[*].format.suffixAdds a suffix to the formatted value. Optional.
fields[*].format.yearDetermines the year format, either numeric or 2-digit. Optional.
fields[*].format.quarterSpecifies the quarter format, which can be long, short, or numeric. Optional.
fields[*].format.monthDefines the format for month, options include numeric, 2-digit, long, short, or narrow. Optional.
fields[*].format.dayDetermines the format for day, either numeric or 2-digit. Optional.
fields[*].format.weekdayDefines the weekday format, either long, short, or narrow. Optional.
fields[*].format.hourSets the hour format, either numeric or 2-digit. Optional.
fields[*].format.minuteSpecifies the minute format, either numeric or 2-digit. Optional.
fields[*].format.secondSets the second format, either numeric or 2-digit. Optional.
fields[*].format.fractional_second_digitsSpecifies the number of fractional seconds (1, 2, or 3). Optional.
Loading...