pub struct DataFlowExporter;Expand description
Data Flow format exporter
Implementations§
Source§impl DataFlowExporter
impl DataFlowExporter
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Data Flow exporter instance.
§Example
use data_modelling_sdk::export::dataflow::DataFlowExporter;
let exporter = DataFlowExporter::new();Sourcepub fn export_model(model: &DataModel) -> String
pub fn export_model(model: &DataModel) -> String
Export a DataModel to Data Flow format YAML.
§Arguments
model- The DataModel to export
§Returns
A YAML string in Data Flow format.
§Example
use data_modelling_sdk::export::dataflow::DataFlowExporter;
use data_modelling_sdk::models::{DataModel, Table, Column};
let mut model = DataModel::new("test".to_string(), "/tmp".to_string(), "control.yaml".to_string());
let table = Table::new("users".to_string(), vec![Column::new("id".to_string(), "INT".to_string())]);
model.tables.push(table);
let yaml = DataFlowExporter::export_model(&model);
assert!(yaml.contains("nodes:"));Sourcepub fn export_node(table: &Table) -> String
pub fn export_node(table: &Table) -> String
Sourcepub fn export_relationship(relationship: &Relationship) -> String
pub fn export_relationship(relationship: &Relationship) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataFlowExporter
impl RefUnwindSafe for DataFlowExporter
impl Send for DataFlowExporter
impl Sync for DataFlowExporter
impl Unpin for DataFlowExporter
impl UnwindSafe for DataFlowExporter
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