Skip to main content

add_sql_measure

Function add_sql_measure 

Source
pub fn add_sql_measure<C: SqlConn>(
    conn: C,
    model: &mut Model,
    spec: &ImportSpec,
) -> Result<usize>
Expand description

Register an SQL-backed input measure (records its SqlSource on the model) and populate it by running the query once. The measure’s categories must already exist or be creatable from the import; this is a convenience over import_query that also marks the measure as SQL-backed so it can be refreshed later.