View YAML: Source configuration
You can extensively customise your views in YAML. Below is the schema and some examples to get you started.
Source configuration schema
| Field name | Description |
|---|---|
| source | This details the query or queries that need to be run in order to populate the view. |
| source.type | This can be either "query" (default) or "table". Optional. |
| source.connection | The 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.table | The table for the view source. This is only supported for "type: table". |
| source.query | The SQL query to run in order to populate the view. This is defined in the dialect of the database. This is only supported for "type: query". |
| source.dependencies | A list of cells that are dependencies of this view. This is only supported for "type: query". Optional. |
| source.dependencies[*].name | The name of the cell. Must be unique with the dependency list. |
| source.dependencies[*].query | The SQL or Python query that is run in order to populate the cell. |
| source.dependencies[*].language | The type of the cell. This can be one of sql or python. Optional. |
| source.dependencies[*].connection | The 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. |