Initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
//! Data lineage information types.
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use super::types::TransformationType;
|
||||
use crate::DataValue;
|
||||
|
||||
/// Data lineage information for a specific record or dataset
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct DataLineage {
|
||||
/// Lineage identifier
|
||||
pub lineage_id: String,
|
||||
/// Source dataset/record
|
||||
pub source: String,
|
||||
/// Target dataset/record
|
||||
pub target: String,
|
||||
/// Transformation steps
|
||||
pub transformations: Vec<TransformationStep>,
|
||||
/// Lineage timestamp
|
||||
pub timestamp: DateTime<Utc>,
|
||||
/// Lineage metadata
|
||||
pub metadata: HashMap<String, DataValue>,
|
||||
}
|
||||
|
||||
/// Individual transformation step in lineage
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TransformationStep {
|
||||
/// Step identifier
|
||||
pub step_id: String,
|
||||
/// Step name
|
||||
pub name: String,
|
||||
/// Transformation type
|
||||
pub transformation_type: TransformationType,
|
||||
/// Input datasets
|
||||
pub inputs: Vec<String>,
|
||||
/// Output datasets
|
||||
pub outputs: Vec<String>,
|
||||
/// Transformation logic
|
||||
pub logic: Option<String>,
|
||||
/// Step timestamp
|
||||
pub timestamp: DateTime<Utc>,
|
||||
}
|
||||
Reference in New Issue
Block a user