Export a database
Save model tables for inspection or for a later MARIO session.
Choose a format by what you plan to do next.
Excel
Inspect and edit a workbook. Convenient for small tables and manual review.
CSV or Parquet
Exchange tables with scripts. Flat layouts reduce the number of files and support parsing back into MARIO.
Save and reload#
import mario
db = mario.load_test("IOT")
db.to_parquet(path="iot_export", flows=True, flat=True)
restored = mario.parse_from_parquet(
path="iot_export", table="IOT", mode="flows", flat=True,
)
Result · Exported flow and unit files, then a new database constructed from them. This exports model tables, rather than a Python session.
Excel export
db.to_excel(path="iot_export.xlsx", flows=True, coefficients=True)
See the Excel parser for the required blocks and import options.
CSV export
db.to_txt(path="iot_export_csv", flows=True, _format="csv", flat=True)
restored = mario.parse_from_txt(
path="iot_export_csv", table="IOT", mode="flows",
_format="csv", flat=True,
)
Keep the unit file with the data file. The TXT, CSV and Parquet guide explains flat and matrix layouts.