Documentation Index
Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
Use this file to discover all available pages before exploring further.
- Diagnose slug mismatch errors between event types and models
- Fix timing and sequencing issues in batch generation
- Resolve data type mismatches and unit conversion errors
- Troubleshoot calculation dependency problems
Pitfall 1: Slug mismatches
The most common integration error. It happens when the datapoint slug in the event type doesn’t match what the model expects.Symptoms
Symptoms
- Model node produces no output (empty/null value)
- Batch generation validation says “missing required datapoint”
- Some batches have outputs, others don’t (inconsistent slug across events)
Diagnosis
Diagnosis
-
Open the Model Editor
and note the
data_point_typeslug for each input node - Open Data Inputs > Input Settings and check the actual slug for each datapoint in the event type
- Compare — they must be exactly identical (case-sensitive, hyphens vs. underscores)
Fix
Fix
data_point_type or the event type’s datapoint slug so they match. If you change the event type slug, existing events may need to be updated.Pitfall 2: Timing and sequencing issues
Events must fall within the accounting period for their data to be included in a batch.Symptoms
Symptoms
- Batch shows zero output even though events exist
- Some events are included in the batch but others aren’t
- Validation passes but output is unexpectedly low
Diagnosis
Diagnosis
- Check the date range of your events vs. the batch accounting period
- Verify the event’s
start_timeandend_time— do they overlap with the batch period? - Look at the show time option when generating batches — time-of-day can exclude events at period boundaries
Fix
Fix
- Adjust event date ranges to fall within the accounting period
- Use the show time option to include events at period boundaries
- For monthly data (like energy consumption), ensure the event date range covers the full month
Pitfall 3: Data type mismatches
A numeric datapoint stored as text, or a percentage stored as a decimal when the model expects a whole number.Symptoms
Symptoms
- Calculation produces wildly incorrect values (e.g., 8000% instead of 80%)
- Type errors in the model console
- Values appear correct in events but produce wrong model outputs
Diagnosis
Diagnosis
- Check the value type configured for each datapoint in the event type (number, text, date)
- Check how the model interprets the value — does it expect a fraction (0.80) or a percentage (80)?
- Look at actual event values — are they stored as the correct type?
Fix
Fix
- If the model expects a fraction but events store percentages, add a division-by-100 node in the model
- Ensure all numeric datapoints are configured as
numbertype (nottext) - Add explicit unit conversion nodes rather than assuming units match
80 (meaning 80%) but the model multiplies directly by 80 instead of 0.80. Always add an explicit division by 100 for percentage datapoints.Pitfall 4: Calculation dependency problems
A model node that depends on another node’s output but the dependency isn’t correctly wired.Symptoms
Symptoms
- Model validation error about circular dependencies
- Intermediate node shows correct value but downstream node doesn’t use it
- Output is always the same regardless of input changes
Diagnosis
Diagnosis
- In the Model Editor, trace the node tree from output back to inputs
- Verify each calculated node’s children are correctly listed
- Check that intermediate nodes are referenced by name (not recreated)
- Look for nodes with no children or orphaned nodes not connected to the tree
Fix
Fix
- Ensure each calculated node explicitly lists its children in the YAML
- Remove any duplicate nodes — each calculation should exist once and be referenced by downstream nodes
- If you see circular dependency errors, restructure the tree so data flows in one direction
Pitfall 5: Missing aggregation across events
When a model expects aggregated values (e.g., total kWh for the month) but receives individual event values.Symptoms
Symptoms
- Emission calculations use only one energy event instead of the sum
- Batch output changes depending on which event is processed first
- Total emissions don’t match the sum of all energy events
Diagnosis
Diagnosis
should_aggregate flag set. Without it, the node may only pick up a single event’s value rather than summing across all events of that type in the period.Fix
Fix
should_aggregate: true on model input nodes that need to sum values across multiple events (e.g., total electricity for the month). See the model referencefor aggregation options.Debugging workflow
When something goes wrong, follow this systematic approach:Check your understanding
What is the most common integration error and how do you diagnose it?
What is the most common integration error and how do you diagnose it?
data_point_type in the Model Editor against the actual slug in Data Inputs > Input Settings. They must be exactly identical — case-sensitive, same delimiters (hyphens vs. underscores).How do you fix the 'percentage vs. fraction' data type issue?
How do you fix the 'percentage vs. fraction' data type issue?
80 (meaning 80%), the model should include a node that divides by 100 to get 0.80 before using it in multiplication. Never assume input units — make conversions explicit and visible.You’re ready to put all of this into practice in the Module 5 Exercise: End-to-End Integration Testing.