pub struct Table {Show 13 fields
pub name: String,
pub columns: Vec<Column>,
pub measures: Vec<Measure>,
pub partitions: Vec<Partition>,
pub refresh_policy: Option<RefreshPolicy>,
pub hierarchies: Vec<Hierarchy>,
pub calendars: Vec<Calendar>,
pub calculation_group: Option<CalculationGroup>,
pub detail_rows_expression: Option<String>,
pub is_hidden: bool,
pub is_private: bool,
pub is_local_date_table: bool,
pub is_template_date_table: bool,
}Expand description
A table and everything defined on it.
A calculation-group table carries its synthetic columns (the group’s field column
and its ordinal column) in columns like any other table; nothing distinguishes
them structurally from data columns.
Fields§
§name: StringTable name.
columns: Vec<Column>Columns in source order.
measures: Vec<Measure>Measures whose home table this is.
partitions: Vec<Partition>Partitions supplying the table’s rows.
refresh_policy: Option<RefreshPolicy>The table’s incremental refresh policy (TOM refreshPolicy), when configured.
hierarchies: Vec<Hierarchy>User-defined hierarchies.
calendars: Vec<Calendar>Calendars (TOM calendars) binding groups of the table’s columns.
calculation_group: Option<CalculationGroup>In TOM a calculation group is a property of a table.
detail_rows_expression: Option<String>DAX defaultDetailRowsDefinition (drillthrough detail rows).
Hidden from report authors; hidden objects are still live if referenced.
is_private: boolEngine-private (TOM isPrivate): reserved for the engine, never authored against. Display-only metadata — never liveness.
is_local_date_table: boolAn engine-generated auto date/time table serving one date column
(TOM annotation __PBI_LocalDateTable; name-prefix fallback). Hidden
machinery a report cannot author against directly. Display-only
metadata — never liveness; the graph layer reads it for the
auto-date/time verdict
(DependencyGraph::auto_date_time_tables).
is_template_date_table: boolThe engine-generated date table template the LocalDateTable_* family
is derived from (TOM annotation __PBI_TemplateDateTable; name-prefix
fallback). Display-only metadata — never liveness; see
Self::is_local_date_table.
Implementations§
Source§impl Table
impl Table
Sourcepub fn is_calculated(&self) -> bool
pub fn is_calculated(&self) -> bool
A calculated table is a table whose partition source is DAX.
There is no flag for this in TOM, and none here: the partition decides.
§Examples
use ripbi_core::{Partition, PartitionSource, Table};
let top_products = Table {
name: "Top Products".to_string(),
partitions: vec![Partition {
name: "Top Products".to_string(),
source: PartitionSource::Calculated {
expression: "TOPN(10, Products, Products[Sales])".to_string(),
},
}],
..Default::default()
};
assert!(top_products.is_calculated());
// An imported table is not, however it was loaded.
let imported = Table {
name: "Products".to_string(),
partitions: vec![Partition {
name: "Products".to_string(),
source: PartitionSource::M { expression: "Sql.Database(...)".to_string() },
}],
..Default::default()
};
assert!(!imported.is_calculated());Trait Implementations§
impl Eq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.