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.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.query | The SQL query to run in order to populate the view. This is defined in the dialect of the database. |
| source.dependencies | A list of cells that are dependencies of this view. 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. |