pub struct FactTableDeclaration {
pub name: String,
pub measures: Vec<String>,
pub dimensions: Vec<String>,
pub primary_key: String,
pub metadata: Option<FactTableDeclarationMetadata>,
}Expand description
Explicit fact table schema declaration
Allows users to explicitly declare fact table metadata instead of relying on auto-detection. Explicit declarations take precedence over auto-detected metadata.
§Example
{
"name": "tf_sales",
"measures": ["amount", "quantity", "discount"],
"dimensions": ["product_id", "region_id", "date_id"],
"primary_key": "id",
"metadata": {
"aggregation_strategy": "incremental",
"grain": ["date", "product", "region"]
}
}Fields§
§name: StringFact table name (e.g., “tf_sales”)
measures: Vec<String>Measure column names (aggregatable numeric fields)
dimensions: Vec<String>Dimension column names or paths within JSONB
primary_key: StringPrimary key column name
metadata: Option<FactTableDeclarationMetadata>Optional metadata about the fact table
Trait Implementations§
Source§impl Clone for FactTableDeclaration
impl Clone for FactTableDeclaration
Source§fn clone(&self) -> FactTableDeclaration
fn clone(&self) -> FactTableDeclaration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FactTableDeclaration
impl Debug for FactTableDeclaration
Source§impl<'de> Deserialize<'de> for FactTableDeclaration
impl<'de> Deserialize<'de> for FactTableDeclaration
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FactTableDeclaration
impl PartialEq for FactTableDeclaration
Source§impl Serialize for FactTableDeclaration
impl Serialize for FactTableDeclaration
impl StructuralPartialEq for FactTableDeclaration
Auto Trait Implementations§
impl Freeze for FactTableDeclaration
impl RefUnwindSafe for FactTableDeclaration
impl Send for FactTableDeclaration
impl Sync for FactTableDeclaration
impl Unpin for FactTableDeclaration
impl UnsafeUnpin for FactTableDeclaration
impl UnwindSafe for FactTableDeclaration
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
Mutably borrows from an owned value. Read more