pub struct QueryEntry {
pub query: Option<Loose<String>>,
pub profile: Option<Loose<String>>,
pub tab: Option<Loose<bool>>,
pub tab_name: Option<Loose<String>>,
pub anchor: Option<Loose<String>>,
pub header: Option<Loose<bool>>,
pub columns: Option<Value>,
pub on_empty: Option<Loose<OnEmpty>>,
pub secret_columns: Option<Loose<Vec<String>>>,
pub autofit: Option<Loose<bool>>,
pub style: Option<Value>,
pub unknown: UnknownKeys,
}Expand description
A query with settings, instead of just its name.
Fields§
§query: Option<Loose<String>>The name of a .sql file under reports/, without folder or extension.
profile: Option<Loose<String>>The connection this query runs on, over the report’s, Set’s, folder’s and project’s. Must agree with the profile of any source it uses. May use Jinja with var(), env_var(), run.* and target.name.
tab: Option<Loose<bool>>false runs the file only for what it does (temp tables, SETs) and discards any result, so it gets no tab.
tab_name: Option<Loose<String>>The tab (sheet) name. Default: the file’s name. Not allowed with tab: false.
anchor: Option<Loose<String>>Where the data starts on the sheet (xlsx only). Default: A1.
header: Option<Loose<bool>>Whether to write the column names as the first row (xlsx only). Default: the output’s header.
columns: Option<Value>Per-column settings for this tab, by column name (xlsx only).
on_empty: Option<Loose<OnEmpty>>When this query returns no rows: continue keeps its empty tab or section, skip leaves its tab (or per-query file) out, fail fails the run. Wins over the output’s on_empty. Default: the output decides once every query is empty.
secret_columns: Option<Loose<Vec<String>>>Columns whose values are secrets (a PDF or zip password): values of 4 or more characters are masked as ***** in the console, logs, run_results.json, rows.jsonl, --output-json and previews. Never masked in delivered files or messages.
autofit: Option<Loose<bool>>Size this tab’s columns from their content (xlsx only), over the output’s autofit. Default: the output’s, which is on.
style: Option<Value>How this tab looks (xlsx only), over the output’s style: font, header, totals, banded_rows, borders, and cell keys (bold, fill, …) for every data cell. See the xlsx plugin page.
unknown: UnknownKeysTrait Implementations§
Source§impl<'de> Deserialize<'de> for QueryEntry
impl<'de> Deserialize<'de> for QueryEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for QueryEntry
impl JsonSchema for QueryEntry
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more